OAuth 2.0 DiscoveryMicrosoftmbj@microsoft.comhttp://self-issued.info/Nomura Research Institute, Ltd.n-sakimura@nri.co.jphttp://nat.sakimura.org/Ping Identityve7jtb@ve7jtb.comhttp://www.thread-safe.com/
Security
OAuth Working GroupOAuthDiscoveryAuthorization ServerConfiguration InformationMetadataWebFingerJavaScript Object NotationJSONJSON Web TokenJWT
This specification defines a mechanism for an OAuth 2.0 client
to discover the resource owner's OAuth 2.0 authorization server
and obtain information needed to interact with it,
including its OAuth 2.0 endpoint locations and authorization server capabilities.
This specification generalizes the discovery mechanisms defined by
"OpenID Connect Discovery 1.0"
in a way that is compatible with OpenID Connect Discovery,
while being applicable to a wider set of OAuth 2.0 use cases.
This is intentionally parallel to the way that the
"OAuth 2.0 Dynamic Client Registration Protocol"
specification generalized the dynamic client registration mechanisms defined by
"OpenID Connect Dynamic Client Registration 1.0"
in a way that was compatible with it.
In order for an OAuth client to utilize OAuth 2.0 services for
a resource owner, the client needs to know where the OAuth 2.0 authorization server is.
This specification uses WebFinger to locate
the authorization server for an resource owner.
This process is described in .
Once the authorization server has been identified,
the configuration information for that authorization server
is retrieved from a well-known location as a JSON document,
including its OAuth 2.0 endpoint locations and authorization server capabilities.
This process is described in .
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119.
All uses of JSON Web Signature (JWS)
and JSON Web Encryption (JWE)
data structures in this specification utilize
the JWS Compact Serialization or the JWE Compact Serialization;
the JWS JSON Serialization and the JWE JSON Serialization are not used.
This specification uses the terms "Access Token", "Authorization Code",
"Authorization Endpoint", "Authorization Grant", "Authorization Server",
"Client", "Client Authentication", "Client Identifier", "Client Secret",
"Grant Type", "Protected Resource", "Redirection URI", "Refresh Token",
"Resource Owner", "Resource Server", "Response Type", and "Token Endpoint"
defined by OAuth 2.0,
the terms "Claim Name", "Claim Value", and "JSON Web Token (JWT)"
defined by JSON Web Token (JWT),
and the term "Response Mode" defined by
OAuth 2.0 Multiple Response Type Encoding Practices.
This specification also defines the following terms:
Entity that is the target of a request in WebFinger.
Server where a WebFinger service is hosted.
Authorization server WebFinger discovery is a means of determining
the location of the authorization server's configuration information.
WebFinger discovery is OPTIONAL; if a client knows the
authorization server's configuration information location through an out-of-band mechanism,
it can skip this step and proceed to .
WebFinger discovery requires the following information to make a
discovery request:
Identifier for the target resource owner that is the
subject of the discovery request.
Server where the WebFinger service is hosted.
URI identifying the type of service whose location is being requested.
OAuth discovery uses the following
rel value in
WebFinger:
Rel TypeURIOAuth 2.0 Configuration Information Location URLhttp://openid.net/specs/connect/1.0/issuer
To start discovery of OAuth 2.0 configuration information,
the resource owner supplies a URI to the client
that can be used to discover the corresponding authorization server.
In some cases, the client may know this URI
without involvement of the resource owner.
This URI might, for instance, be an e-mail address, an account identifier,
a profile URL, or a service or tenant URL.
The host to which the WebFinger request will be made is obtained from the URI.
The client then makes an HTTP GET request to the host's
WebFinger
endpoint using the URI as the resource parameter
value and the rel value
http://openid.net/specs/connect/1.0/issuer
to obtain the authorization server's configuration information location.
The configuration information location MUST be returned in the WebFinger response
as the value of the href member of
a links array element
with rel member value
http://openid.net/specs/connect/1.0/issuer.
As described in , despite the identifier
http://openid.net/specs/connect/1.0/issuer
appearing to be OpenID-specific,
its usage in this specification is actually referring to
a general OAuth 2.0 feature that is not specific to OpenID Connect.
(Per Section 7 of WebFinger, obtaining the
WebFinger response may first involve following some redirects.)
The returned configuration information location MUST be a URI RFC 3986
with a scheme component that MUST be https,
a host component, and optionally, port and path components
and no query or fragment components.
Note that the WebFinger response can return
a configuration information location value using a completely different
scheme, host, port, and path from any contained in the input URI,
and no relationship can be assumed between the input URI
and the resulting configuration information location.
An example WebFinger discovery request follows.
To find the authorization server's configuration information location
for the account identified using
the e-mail address syntax joe@example.com and
corresponding account URI acct:joe@example.com,
the WebFinger parameters are as follows:
WebFinger ParameterValueresourceacct:joe@example.comhostexample.comrelhttp://openid.net/specs/connect/1.0/issuer
The discovered authorization server configuration information location is
https://server.example.com.
Authorization servers can have metadata describing their configuration.
These authorization server metadata values are used by this specification:
REQUIRED.
URL of the authorization server's configuration information location,
which uses the https scheme and has no query or fragment components.
This is the location where
.well-knownRFC 5785 resources
containing information about the authorization server are published,
and in particular, the /.well-known/openid-configuration resource
defined in .
If WebFinger discovery is supported (see ),
this value MUST be identical to the configuration information location value returned by WebFinger.
REQUIRED.
URL of the authorization server's authorization endpoint .
URL of the authorization server's token endpoint .
This is REQUIRED unless only the implicit grant type is used.
REQUIRED.
URL of the authorization server's JWK Set document.
This contains the signing key(s) the client uses to validate signatures from the authorization server.
The JWK Set MAY also contain the Server's encryption key(s),
which are used by RPs to encrypt requests to the Server.
When both signing and encryption keys are made available,
a use (public key use) parameter
value is REQUIRED for all keys in the referenced JWK Set
to indicate each key's intended usage.
Although some algorithms allow the same key to be used for
both signatures and encryption, doing so is
NOT RECOMMENDED, as it is less secure.
The JWK x5c parameter MAY be used
to provide X.509 representations of keys provided. When used, the bare key
values MUST still be present and MUST match those in the certificate.
RECOMMENDED.
URL of the authorization server's OAuth 2.0 Dynamic Client Registration endpoint .
RECOMMENDED.
JSON array containing a list of the OAuth 2.0scope values that this authorization server supports.
Servers MAY choose not to advertise some supported scope values
even when this parameter is used.
REQUIRED.
JSON array containing a list of the OAuth 2.0
response_type values that this
authorization server supports.
OPTIONAL.
JSON array containing a list of the OAuth 2.0
response_mode values that this
authorization server supports, as specified in
OAuth 2.0 Multiple Response Type Encoding Practices.
If omitted, the default is
["query", "fragment"].
The response mode value form_post is also defined in
OAuth 2.0 Form Post Response Mode.
OPTIONAL.
JSON array containing a list of the OAuth 2.0
grant type values that this
authorization server supports.
If omitted, the default value is
["authorization_code", "implicit"].
OPTIONAL.
JSON array containing a list of client authentication methods
supported by this token endpoint.
Client authentication method values are used in the
token_endpoint_auth_method
parameter defined in Section 2 of .
If omitted, the default is client_secret_basic --
the HTTP Basic Authentication Scheme specified in
Section 2.3.1 of OAuth 2.0.
OPTIONAL.
JSON array containing a list of the JWS signing algorithms
(alg values)
supported by the token endpoint for the signature on
the JWT used to authenticate the client
at the token endpoint for the private_key_jwt
and client_secret_jwt authentication methods.
Servers SHOULD support RS256.
The value none MUST NOT be used.
OPTIONAL.
URL of a page containing human-readable information that
developers might want or need to know when using the authorization server.
In particular, if the authorization server does not support Dynamic Client Registration,
then information on how to register clients needs to be provided in this documentation.
OPTIONAL.
Languages and scripts supported for the user interface,
represented as a JSON array of
BCP47 language tag values.
OPTIONAL.
URL that the authorization server provides to the person registering
the client to read about the authorization server's requirements on how
the client can use the data provided by the authorization server.
The registration process SHOULD display this
URL to the person registering the client if it is given.
As described in , despite the identifier
op_policy_uri,
appearing to be OpenID-specific,
its usage in this specification is actually referring to
a general OAuth 2.0 feature that is not specific to OpenID Connect.
OPTIONAL.
URL that the authorization server provides to the person registering
the client to read about authorization server's terms of service.
The registration process SHOULD display this
URL to the person registering the client if it is given.
As described in , despite the identifier
op_tos_uri,
appearing to be OpenID-specific,
its usage in this specification is actually referring to
a general OAuth 2.0 feature that is not specific to OpenID Connect.
OPTIONAL.
URL of the authorization server's OAuth 2.0 revocation endpoint .
OPTIONAL.
URL of the authorization server's OAuth 2.0 introspection endpoint .
Additional authorization server metadata parameters MAY also be used.
Some are defined by other specifications,
such as
OpenID Connect Discovery 1.0.
Using the configuration information location discovered
as described in or by other means,
the authorization server's configuration information can be retrieved.
Authorization servers supporting discovery
MUST make a JSON document available at the path formed by
concatenating the string
/.well-known/openid-configuration to the
configuration information location.
The syntax and semantics of .well-known are defined in RFC 5785 and apply to the configuration information location value
when it contains no path component. openid-configuration
MUST point to a JSON document compliant with this specification and
MUST be returned using the application/json content type.
As described in , despite the identifier
/.well-known/openid-configuration,
appearing to be OpenID-specific,
its usage in this specification is actually referring to
a general OAuth 2.0 feature that is not specific to OpenID Connect.
An authorization server configuration information document MUST be queried using an HTTP
GET request at the previously specified path.
The client would make the following request to the
configuration information location https://example.com
to obtain its configuration information,
since the configuration information location contains no path component:
If the
configuration information location value contains a path component, any terminating
/ MUST be removed before appending
/.well-known/openid-configuration.
The client would make the following request to the
configuration information location https://example.com/issuer1
to obtain its configuration information,
since the configuration information location contains a path component:
Using path components enables supporting multiple issuers per host.
This is required in some multi-tenant hosting configurations.
This use of .well-known is for supporting
multiple issuers per host; unlike its use in
RFC 5785, it does not provide
general information about the host.
The response is a set of claims about the authorization server's
configuration, including all necessary endpoints and
public key location information.
A successful response MUST use the 200 OK HTTP status code and return
a JSON object using the application/json content type
that contains a set of claims as its members
that are a subset of the metadata values defined in
.
Other claims MAY also be returned.
Claims that return multiple values are represented as JSON arrays.
Claims with zero elements MUST be omitted from the response.
An error response uses the applicable HTTP status code value.
If any of the validation procedures defined in this specification fail, any operations requiring
the information that failed to correctly validate MUST be aborted and
the information that failed to validate MUST NOT be used.
The issuer value returned MUST be identical to
the configuration information location URL that was directly used to retrieve the configuration information.
Processing some OAuth 2.0 messages requires comparing
values in the messages to known values. For example, the
member names in the configuration information response might be
compared to specific member names such as issuer. Comparing Unicode strings,
however, has significant security implications.
Therefore, comparisons between JSON strings and other Unicode
strings MUST be performed as specified below:
Remove any JSON applied escaping to produce an array of
Unicode code points.
Unicode Normalization MUST NOT
be applied at any point to either the JSON string or to
the string it is to be compared against.
Comparisons between the two strings MUST be performed as a
Unicode code point to code point equality comparison.
The identifiers
/.well-known/openid-configuration,
http://openid.net/specs/connect/1.0/issuer,
op_policy_uri,
and op_tos_uri
contain strings referring to the
OpenID Connect family of specifications
that were originally defined by
"OpenID Connect Discovery 1.0".
Despite the reuse of these identifiers that appear to be OpenID-specific,
their usage in this specification is actually referring to
general OAuth 2.0 features that are not specific to OpenID Connect.
Implementations MUST support TLS.
Which version(s) ought to be implemented will vary over
time, and depend on the widespread deployment and known
security vulnerabilities at the time of implementation.
The authorization server MUST support
TLS version 1.2
and MAY support additional transport-layer security mechanisms meeting its security requirements.
When using TLS, the client MUST perform a TLS/SSL server certificate check,
per RFC 6125.
Implementation security considerations can be found in
Recommendations for Secure Use of TLS and DTLS.
To protect against information disclosure and tampering,
confidentiality protection MUST be applied using TLS
with a ciphersuite that provides confidentiality and
integrity protection.
TLS certificate checking MUST be performed by the client,
as described in ,
when making an authorization server configuration information request.
Checking that the server certificate is valid for the configuration information location URL
prevents man-in-middle and DNS-based attacks.
These attacks could cause a client to be tricked into using an attacker's
keys and endpoints, which would enable impersonation of the legitimate authorization server.
If an attacker can accomplish this, they can access the resources
that the affected client has access to
using the authorization server that they are impersonating.
An attacker may also attempt to impersonate an authorization server by publishing
a discovery document that contains an issuer claim
using the configuration information location URL of the authorization server being impersonated,
but with its own endpoints and signing keys.
This would enable it to impersonate that authorization server, if accepted by the client.
To prevent this, RPs MUST ensure that the configuration information location URL they are using
for the configuration information request exactly matches the value of
the issuer metadata value
in the authorization server configuration information document received by the client.
The following registration procedure is used for the
registry established by this specification.
Values are registered on a Specification Required
basis after a two-week review period on the oauth-ext-review@ietf.org
mailing list, on the advice of one or more Designated Experts.
However, to allow for the allocation of values prior to publication,
the Designated Experts may approve registration once they are satisfied
that such a specification will be published.
Registration requests sent to the mailing list for review should use
an appropriate subject
(e.g., "Request to register OAuth Discovery Metadata: example").
Within the review period, the Designated Experts will either approve or
deny the registration request, communicating this decision to the review list and IANA.
Denials should include an explanation and, if applicable, suggestions as to how to make
the request successful.
Registration requests that are undetermined for
a period longer than 21 days can be brought to the IESG's attention
(using the iesg@ietf.org mailing list) for resolution.
Criteria that should be applied by the Designated Experts includes
determining whether the proposed registration duplicates existing functionality,
determining whether it is likely to be of general applicability
or whether it is useful only for a single application,
and whether the registration makes sense.
IANA must only accept registry updates from the Designated Experts and should direct
all requests for registration to the review mailing list.
It is suggested that multiple Designated Experts be appointed who are able to
represent the perspectives of different applications using this specification,
in order to enable broadly-informed review of registration decisions.
In cases where a registration decision could be perceived as
creating a conflict of interest for a particular Expert,
that Expert should defer to the judgment of the other Experts.
This specification establishes the
IANA "OAuth Discovery Metadata" registry
for OAuth 2.0 authorization server metadata names.
The registry records the authorization server metadata member
and a reference to the specification that defines it.
The name requested (e.g., "issuer").
This name is case-sensitive.
Names may not match other registered names in a case-insensitive manner
unless the Designated Experts state that there is a compelling reason
to allow an exception.
Brief description of the discovery metadata (e.g., "Issuer URL").
For Standards Track RFCs, list the "IESG".
For others, give the name of the responsible party.
Other details (e.g., postal address, email address, home page URI) may also be included.
Reference to the document or documents that specify the parameter,
preferably including URIs that
can be used to retrieve copies of the documents.
An indication of the relevant
sections may also be included but is not required.
Discovery Metadata Name: issuer
Discovery Metadata Description:
URL of the authorization server's configuration information location
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: authorization_endpoint
Discovery Metadata Description:
URL of the authorization server's authorization endpoint
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: token_endpoint
Discovery Metadata Description:
URL of the authorization server's token endpoint
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: jwks_uri
Discovery Metadata Description:
URL of the authorization server's JWK Set document
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: registration_endpoint
Discovery Metadata Description:
URL of the authorization server's OAuth 2.0 Dynamic Client Registration Endpoint
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: scopes_supported
Discovery Metadata Description:
JSON array containing a list of the OAuth 2.0
scope values that this authorization server supports
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: response_types_supported
Discovery Metadata Description:
JSON array containing a list of the OAuth 2.0
response_type values that this
authorization server supports
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: response_modes_supported
Discovery Metadata Description:
JSON array containing a list of the OAuth 2.0
response_mode values that this
authorization server supports
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: grant_types_supported
Discovery Metadata Description:
JSON array containing a list of the OAuth 2.0
grant type values that this
authorization server supports
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: token_endpoint_auth_methods_supported
Discovery Metadata Description:
JSON array containing a list of client authentication methods
supported by this token endpoint
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: token_endpoint_auth_signing_alg_values_supported
Discovery Metadata Description:
JSON array containing a list of the JWS signing algorithms
supported by the token endpoint for the signature on
the JWT used to authenticate the client
at the token endpoint
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: service_documentation
Discovery Metadata Description:
URL of a page containing human-readable information that
developers might want or need to know when using the authorization server
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: ui_locales_supported
Discovery Metadata Description:
Languages and scripts supported for the user interface,
represented as a JSON array of
BCP47 language tag values
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: op_policy_uri
Discovery Metadata Description:
URL that the authorization server provides to the person registering
the client to read about the authorization server's requirements on how
the client can use the data provided by the authorization server
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: op_tos_uri
Discovery Metadata Description:
URL that the authorization server provides to the person registering
the client to read about authorization server's terms of service
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: revocation_endpoint
Discovery Metadata Description:
URL of the authorization server's OAuth 2.0 revocation endpoint
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Discovery Metadata Name: introspection_endpoint
Discovery Metadata Description:
URL of the authorization server's OAuth 2.0 introspection endpoint
Change Controller: IESG
Specification Document(s): of [[ this specification ]]
Recommendations for Secure Use of Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) are widely used to protect data exchanged over application protocols such as HTTP, SMTP, IMAP, POP, SIP, and XMPP. Over the last few years, several serious attacks on TLS have emerged, including attacks on its most commonly used cipher suites and their modes of operation. This document provides recommendations for improving the security of deployed services that use TLS and DTLS. The recommendations are applicable to the majority of use cases.Unicode Normalization FormsJSON Web Token (JWT)MicrosoftPing IdentityNomura Research Institute, Ltd.JSON Web Signature (JWS)MicrosoftPing IdentityNomura Research Institute, Ltd.JSON Web Encryption (JWE)MicrosoftCisco Systems, Inc.JSON Web Algorithms (JWA)MicrosoftJSON Web Key (JWK)MicrosoftOAuth 2.0 Multiple Response Type Encoding PracticesGoogleGoogle FacebookMicrosoftOAuth 2.0 Form Post Response ModeMicrosoftPing IdentityWell-Known URIsIANAThe Unicode StandardThe Unicode ConsortiumOpenID Connect Core 1.0Nomura Research Institute, Ltd.Ping IdentityMicrosoftGoogleSalesforceOpenID Connect Discovery 1.0Nomura Research Institute,
Ltd.Ping IdentityMicrosoftIllumilaOpenID Connect Dynamic Client Registration 1.0Nomura Research Institute, Ltd.Ping IdentityMicrosoft
This specification is based on the OpenID Connect Discovery 1.0 specification,
which was produced by the OpenID Connect working group of the OpenID Foundation.
[[ to be removed by the RFC Editor before publication as an RFC ]]
-00
Created the initial version based on OpenID Connect Discovery 1.0 draft 26.