The phrase comes from the English translation of Ali Baba and the Forty Thieves. In that story, Ali Baba discovers that the thieves kept their treasure in a cave that’s protected by a magical door. In order to open the door, one must only utter the phrase “Open Sesame”.
Ali Baba uses this information in order to steal treasure from the cave, and thus begins the story as Ali Baba and the tribe of thieves plan revenge upon one another. Although the Forty Thieves didn’t realize it at the time, the real problem they faced was that their magic door had poor proof of identity. The security for the door relied on a shared secret, and thus freely let in unauthorized people who learned of the magic words.
It would have been far better and more secure if the door didn’t rely on shared secrets at all, and rather used a secret specific to each person as well as require proof that the user had the rights to use said...