Is there a difference between authentication and authorization?

Viewed 55662

I see these two terms bandied about quite a bit (specifically in web-based scenarios but I suppose it's not limited to that) and I was wondering whether or not there was a difference.

It appears to me that they both mean you're allowed to be doing what you're doing. So is this just a nomenclature thing, or is there a basic difference in meaning?

16 Answers

Compared to the rest of the responses which try to explicitly specify the definition or technology. I'll submit an example can be more valuable.

Here's some an article that makes a great analogy to a passport versus a lock and key

When speaking about authentication (also called AuthN), think about identity. Authentication tries to answer “is this person who they say they are?” It’s a software equivalent of a passport or national ID check. Or to put it in more realistic terms, authentication is a similar process to that moment when you look at another person’s face to recognize that this is your friend from college and not your annoying second floor neighbor.

On the other hand, authorization (also called AuthZ) is all about permissions. Authorization answers a question “what is this person allowed to do in this space?” You can think of it as your house key or office badge. Can you open your front door? Can your annoying neighbor enter your apartment at will? And more, once in your apartment, who can use the toilet? Who can eat from your secret stash of cookies tucked away in your kitchen cupboard?

Authentication:

It is the process of validating if an identity is true or false. In other words, verifying that a user is indeed the one he or she claims himself/herself to be.

Authentication types:

  1. Username + password type of authentication
  2. Authentication using social accounts
  3. Passwordless authentication
  4. Multifactor authentication
  5. Fingerprint or retina based authentication etc

OpenID is an open standard for authentication.

Authorization

The technique that determines which resources are accessible to a user with a given identity or role.

OAuth is an open standard for authorization.

Authentication: An application needs to know who is accessing the application. So authentication is related to word who. Application will check it by a login form. User will enter user name and password and these inputs will be validated by the application. Once the validation is successful, user is declared as authenticated.

Authorization is to check whether user can access the application or not or what user can access and what user can not access. Source: Authentcation Vs Authorization

Related