DEV Community

Cover image for Best analogy for Authentication vs Authorization I've found so far
Ovidiu Miu
Ovidiu Miu

Posted on • Edited on

9 1

Best analogy for Authentication vs Authorization I've found so far

After some thinking and some google searches I think I've found a very good analogy for representing authentication vs authorization. I'll stick to this, seems like a good mental model.

The analogy is found here: https://www.okta.com/identity-101/authentication-vs-authorization/

It roughly goes like this:

  • You go visit your neighbor. You knock at his door.

  • He looks through the peephole, and then he recognizes you (authentication).

  • He opens the door and invites you in.

  • You talk to him and start feeling comfortable, so you go sit on the sofa. He has no problem with this (you are authorized to do this).

  • You even use his toilet (still authorized).

  • After some time you feel hungry and try to open his fridge to have a look. He stops you and says that you are not allowed to do this (not authorized). Maybe his best friend is allowed... (he might be authorized)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay