Open authorization (OAuth) is an open-standard authorization framework that grants applications access to an end user’s protected resources—such as their photos, calendars or social media posts—without requiring the login or password to the user’s account.
Websites and third-party applications that ask users to “Sign in with Google?” or “Allow access to your account information?” are common use cases for OAuth. The OAuth protocol enables users to easily grant these applications access to their account data without sharing their user credentials.
In addition to web applications, OAuth can also grant resource access to APIs, server-side applications, OS native apps, mobile apps and devices such as smart TVs and appliances. In some instances, there is no human user involved as OAuth can authorize application access on behalf of an organization or business account.
OAuth offers important access management benefits to users, developers and businesses by keeping login data inaccessible and limiting access to other sensitive information. It also makes it easier for applications to access necessary account information without the security vulnerabilities of sharing user credentials.
By simplifying secure access, OAuth can help organizions address some of their biggest security challenges. For example, an IBM Institute for Business Value study found that 52% of executives say complexity is the biggest impediment to their cybersecurity operations.
A small team of software developers released OAuth 1.0 in 2007. This first version of the protocol was designed as an alternative to web-based authentication, which required users to share their usernames and passwords with third-party services. However, OAuth 1.0 provided authorization flows for websites only.
In 2012, the Internet Engineering Task Force (IETF) released OAuth 2.0 as RFC 6749 and RFC 6750. An RFC (Request for Comments) is an IETF document that describes internet communication protocols. RFC 6749 is the core framework for OAuth 2.0, and RFC 6750 defines how the framework uses access tokens.
This updated version of OAuth expanded the protocol beyond web browsers to include authorization capabilities for applications, APIs and devices. OAuth 2.0 replaced OAuth 1.0 and is now the industry standard.
Unlike other frameworks that rely on usernames and passwords, OAuth is an authorization protocol that is based on access tokens. Access tokens are pieces of information that determine the specific resources an application is allowed to access. The OAuth protocol defines how each component in an authorization request process approves, defines and manages access tokens.
OAuth tokens commonly use the JSON Web Token (JWT) standard because of its ability to transmit data securely.
The primary components of the OAuth framework are:
This is the end user that owns the account the application seeks to access, such as a Facebook or Google account. The resource owner provides consent for the application to access certain protected resources in that account, such as photos or personal data. In some cases, the resource owner might be a company or business account.
This is the server that stores the protected resources on behalf of the user. The resource server accepts and validates OAuth tokens it receives from the client, then provides the user data that the resource owner has consented to release.
The client is the application, website, API or device that requests access. It requests authorization from the authorization server by presenting a client ID. Then, after the resource owner provides consent, the client receives an access token it can use to access protected resources on the resource server.
This is the primary server that drives the OAuth protocol. It operates two endpoints to grant access to the resource server.
The authorization endpoint prompts the resource owner to provide consent for specific protected resources. The token endpoint then receives the token request from the OAuth client and generates new access tokens that grant access to the resources.
Scopes are the access parameters for protected resources on the resource server.
For instance, the resource owner may be asked to provide consent for access to data such as emails, files or photos. The scope restricts client access to those items only.
Here is a basic overview of how an OAuth flow might work:
The procedure for providing an access token to an application is called an authorization grant or authorization flow. There are different grant types and OAuth flows that can be used for different types of applications, devices or APIs, such as:
This grant type is typically used for web applications and mobile apps. In an authorization code flow, the authorization server provides a one-time authorization code to the client. The client can then exchange that authorization code for an access token from the authorization server’s token endpoint.
This flow adds extra security to the authorization code grant to protect apps from code injection attacks. These types of attacks can trick apps into running malicious code that changes how they operate.
PKCE adds a “client secret” that authenticates the client with the authorization server before an access token is issued. Because only the legitimate client has the secret, malicious actors cannot pretend to be the client and introduce malicious code.
This grant type is designed for situations where no human user is involved, such as automated processes, machine to machine interactions and microservices.
Applications are granted access to system resources that they need to carry out functions, but are not given access to end user resources. For example, a client credentials grant might allow a weather app to access an API to retrieve data on the latest forecast.
This grant type provides a simpler flow for JavaScript web applications. Unlike the authorization code grant, the implicit flow does not require an authorization code before an access token is issued.
Instead, after the user provides consent, the access token is included in the redirect Uniform Resource Identifier (URI) that returns the user to the application requesting accessing. The app obtains the access token from the URI.
If an access token has expired, this grant type provides the application with a refresh token that can be exchanged for a new access token. Without a refresh token, the end user would have to once again provide consent in order for the application to receive a new access token.
The fundamental difference is that single sign-on (SSO) is a user authentication protocol and OAuth is an authorization protocol.
SSO often uses an identity provider (IdP) and the Security Assertion Markup Language (SAML), which is based on Extensible Markup Language (XML), to authenticate the digital identities of users through usernames and passwords.
OAuth does not authenticate users, but it does authorize them to access system resources. SSO solutions sometimes use OAuth to provide authenticated users with easy access to applications and services across an enterprise.
OpenID Connect (OIDC) is an authentication protocol that is built on top of OAuth 2.0. Working together, OpenID Connect can verify the identity of a user, then OAuth can authorize that user to access resources and services.
Learn about the customer identity and access management (CIAM) landscape and current trends in the market.
Discover how to reduce the complexity of identity management with IBM’s product-agnostic approach to identity fabric orchestration.
Get a clear definition of identity fabric and learn how an identity fabric enables continuous control and visibility.
Data breach costs have hit a new high. Get essential insights to help your security and IT teams better manage risk and limit potential losses.
IBM web domains
ibm.com, ibm.org, ibm-zcouncil.com, insights-on-business.com, jazz.net, mobilebusinessinsights.com, promontory.com, proveit.com, ptech.org, s81c.com, securityintelligence.com, skillsbuild.org, softlayer.com, storagecommunity.org, think-exchange.com, thoughtsoncloud.com, alphaevents.webcasts.com, ibm-cloud.github.io, ibmbigdatahub.com, bluemix.net, mybluemix.net, ibm.net, ibmcloud.com, galasa.dev, blueworkslive.com, swiss-quantum.ch, blueworkslive.com, cloudant.com, ibm.ie, ibm.fr, ibm.com.br, ibm.co, ibm.ca, community.watsonanalytics.com, datapower.com, skills.yourlearning.ibm.com, bluewolf.com, carbondesignsystem.com