DEV Community

Dan Schnau
Dan Schnau

Posted on • Originally published at danschnau.com on

Authentication vs Authorization

Authentication and Authorization (AuthN and AuthZ) are terms that refer to discrete, specific concepts that can easily be confused.

Authentication is the process of proving that someone is who they claim to be.

Authorization is the process of granting access to a resource.

For instance, to buy alcohol, I must be at least 21 years old, as per legal requirements. When I try to make the purchase, the sales clerk will likely request my driver's license. By examining the photo on the license and confirming it to be of me, the sales clerk is performing Authentication. I have presented evidence that I am Dan Schnau, and provided a government-issued document with a photograph and other relevant facts, verifying my identity.

However, at this moment, the sales clerk has not allowed me access to the resource- alcohol. After proving my identity, the sales clerk will perform Authorization. The clerk will verify my date of birth on the driver's license, which will enable them to grant access, knowing that I have already proved who I am (via photo ID) and that I am authorized based on my age.

In summary, Authentication verifies identities, and Authorization grants access to resources based on those identities. It is critical to implement both measures for safe systems.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS Security LIVE!

Hosted by security experts, AWS Security LIVE! showcases AWS Partners tackling real-world security challenges. Join live and get your security questions answered.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️