Internet-Draft | The XAuth Protocol | January 2020 |
Hardt | Expires 1 August 2020 | [Page] |
Client software often desires resources or identity claims that are managed independent of the client. This protocol allows a user and/or resource owner to delegate resource authorization and/or release of identity claims to an authorization server. Client software can then request access to resources and/or identity claims by calling the authorization server. The authorization server acquires consent and authorization from the user and/or resource owner if required, and then returns the authorization and identity claims that were approved. This protocol can be extended to support alternative client authentication mechanisms, authorizations, claims, and interactions.¶
[Editor: suggestions on how to improve this are welcome!]¶
[Editor: suggestions for other names than XAuth are welcome!]¶
Source for this draft and an issue tracker can be found at https://github.com/dickhardt/hardt-xauth-protocol.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 1 August 2020.¶
Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.¶
This protocol supports the widely deployed use cases supported by OAuth 2.0 [RFC6749] & [RFC6750], and OpenID Connect [OIDC], an extension of OAuth 2.0, as well as other extensions, and other use cases that are not supported, such as requesting multiple authorizations in one request. This protocol also addresses many of the security issues in OAuth 2.0 by having parameters securely sent directly between parties, rather than via a browser redirection.¶
The technology landscape has changed since OAuth 2.0 was initially drafted. More interactions happen on mobile devices than PCs. Modern browsers now directly support asymetric cryptographic functions. Standards have emerged for signing and encrypting tokens with rich payloads (JOSE) that are widely deployed.¶
Additional use cases are now being served with extensions to OAuth 2.0: OpenID Connect added support for authentication and releasing identity claims; [RFC8252] added support for native apps; [RFC8628] added support for smart devices; and support for [browser_based_apps] is being worked on. There are numerous efforts on adding proof-of-possession to resource access.¶
This protocol simplifies the overall architectural model, takes advantage of today's technology landscape, provides support for all the widely deployed use cases, and offers numerous extension points.¶
The¶
While this protocol is not backwards compatible with OAuth 2.0, it strives to minimize the migration effort.¶
Handles are strings issued by the AS to the Client that are opaque to the Client.¶
When presenting any of the above handles, the Client always proves possession of its key.¶
Sequence Diagram¶
+--------+ +---------------+ | |<-(1)------- Discovery ------------------->| Authorization | | | | Server | | |--(2)------- AS Request ------------------>| | | | | (3) Request | | | | Evaluation | | |<-(4)------- Interaction Response ---------| | | | | | | |--(5)------- Authorization Request ------->| -------+ | | | or | | | | |--(6)------- Authentication Request ------>| ---+ | | | | | | | | | | +--------+ | | | | | |--(7)--------->| User |<------------(8)--| | | | | | Interaction +--------+ Authentication | | | | | Client | | | | | | | | | | | | |<-(9)------- Authentication Response ------|<---+ | | | | | | | | |--(10)------ AS Request 2 ---------------->| -------+ | | | | | | | | +--------+ | | | | |<-(12)---------| User |<-----------(11)--| | | | | Redirect | / RO | Authorization | | | | | +--------+ | | | | | | | | | |<-(13)------ AS Response ------------------|<-------+ | | | | | | | +----------+ | | | |--(14)-- Resource Request -->| Resource | | | | |<------ Resource Response ---| Server | | | | | +----------+ | | | | | | | |--(15)------- Refresh Request ------------>| | | |<----------- Refresh Response -------------| | +--------+ +---------------+¶
Following is a non-normative JSON [RFC8259] document example where the Client wants to interact with the User with a popup and is requesting identity claims about the User and read access to the User's contacts:¶
Example 1 { "as" :"https://as.example", "iat" :"1579046092", "nonce" :"f6a60810-3d07-41ac-81e7-b958c0dd21e4", "client": { "display": { "name" :"SPA Display Name", "uri" :"https://spa.example/about" }, "interaction": { "type" :"popup" } }, "authorizations": { "type" :"oauth_scope", "scope" :"read_contacts" }, "claims": { "oidc": { "id_token" : { "email" : { "essential" : true }, "email_verified" : { "essential" : true } }, "userinfo" : { "name" : { "essential" : true }, "picture" : null } } } }¶
Following is a non-normative example where the Client has previously authenticated the User, and is requesting additional authorization:¶
Example 2 { "as" :"https://as.example", "iat" :"1579046092", "nonce" :"0d1998d8-fbfa-4879-b942-85a88bff1f3b", "client": { "id" : "di3872h34dkJW", "interaction": { "type" : "redirect", "uri" : "https://web.example/return" } }, "user": { "identifiers": { "oidc": { "iss" :"https://as.example", "sub" :"123456789" } } }, "authorizations": { "type" :"oauth_scope", "scope" :"read_calendar write_calendar" } }¶
Following is a non-normative example where the Client is requesting authorization first:¶
Example 3 { "as" :"https://as.example", "iat" :"1579046092", "nonce" :"5c9360a5-9065-4f7b-a330-5713909e06c6", "client": { "id" : "di3872h34dkJW", "interaction": { "type" : "redirect", "uri" : "https://web.example/return" } }, "authentication": { "first": true }, "claims": { "oidc": { "id_token" : {} } } }¶
Following is a non-normative example where the Client previously requested authorization first (Example 3), the response was a new User, and now makes the following AS Request:¶
Example 4 { "as" :"https://as.example", "iat" :"1579046092", "nonce" :"0a74f51f-514a-4821-b71f-01c252223f2f", "authentication": { "handle": "eyJhb958.example.authentication.handle.9yf3szM" }, "claims": { "oidc": { "userinfo" : { "email" : { "essential" : true }, "phone_number" : { "essential" : true }, "name" : { "essential" : true }, "picture" : null } } } }¶
as - the unique string identifier for the AS. This attribute is REQUIRED.¶
iat - the time of the request as a NumericDate.¶
nonce - a unique identifier for this request. This attribute is REQUIRED. Note the AS Response MUST contain a matching nonce attribute.¶
The client object MUST contain either the client_id attribute for Registered Clients, or the display object for Dynamic Clients. If the Client can interact with the User, then an interaction object MUST be included. If there is an authentication handle, then the client object MUST not be included.¶
client_id - the identifier the AS has for the Registered Client.¶
display - the display object contains the following attributes:¶
[Editor: a max length for the name?]¶
[Editor: a max length for the URI?]¶
The name and uri will be displayed by the AS when prompting for authorization.¶
interaction - the interaction object contains the type of interaction the Client will provide the User. Other attributes are dependent on the interaction type value.¶
[Editor: do we need max pixels or max chars for qrcode interaction? Either passed to AS, or max specified values here?]¶
[Editor: other possible interaction models could be a "webview", where the Client can display a web page, or just a "message", where the client can only display a text message]¶
[Editor: we may need to include interaction types for iOS and Android as the mobile OS APIs evolve.]¶
[Editor: does the Client include parameters if it wants the AS Response signed and/or encrypted?]¶
The user object is optional.¶
identifiers - the identifiers object contains one or more of the following identifiers for the User:¶
The user and identifiers objects MAY be included to improve the user experience by the AS. The AS MUST authenticate the User independent of these values. The user object MUST not be included if there is an authentication handle.¶
discovery - MUST contain the JSON true value. Indicates the Client requests the AS to return a "discovered" attribute in the Interaction Response if the AS has a User at the AS with one or more of the identifiers. This attribute is OPTIONAL. Support of the discovery attribute by the AS is OPTIONAL. The AS MAY return the [TBD] error if discovery is not supported, or ignore the request.¶
This OPTIONAL object MUST contain one of the following attributes:¶
A non-normative example of an Interaction Response follows:¶
{ "user": { "discovered": true }, "interaction": { "type" : "popup", "uri" : "https://as.example/endpoint/ey5gs32..." }, "authorization": { "handle" : "eyJhb958.example.authorization.handle.9yf3szM", "uri" : "https://as.example/authorization/ey7snHGs", "wait" : "10" } }¶
MUST contain one of "authorization" object, or "authentication" object.¶
[Editor: reference a security consideration for this functionality.]¶
If the AS wants the Client to start the interaction, the AS MUST select one of the interaction mechanisms provided by the Client in the AS Request, and include the matching attribute in the interaction object:¶
[Editor: do we specify a maximum length for the uri and message so that a device knows the maximum it needs to support? A smart device may have limited screen real estate.]¶
Returned if the Client requested authentication first. The authentication object has the following attributes:¶
If the AS wants the Client to initiate the interaction with the User, then the AS will return an interaction object Section 4.2 so that the Client can can hand off interactions with the User to the AS. The Client will initiate the interaction with the User in one of the following ways:¶
The Client will create a new popup child browser window containing the value of the uri attribute of the interaction object. [Editor: more details on how to do this]¶
The AS will close the window when the interactions with the User are complete. [Editor: confirm AS can do this still on all browsers, or does Client need to close]¶
The AS MAY respond to an outstanding Authorization Request Section 8.13 before the popup window has been closed.¶
The Client will redirect the User to the value of the uri attribute of the interaction object. When the AS interactions with the User are complete, the AS will redirect the User to the redirect_uri the Client provided in the AS Request.¶
If the Client made a Authorization Request when starting the interaction, the AS MAY respond to the Authorization Request Section 8.13 before the User has been redirected back to the Client.¶
The Client will create a [QR_Code] of the uri attribute of the interaction object and display the resulting graphic and the message attribute of the interaction object as a text string.¶
Example non-normative AS Response JSON document for Example 1 in Section 3:¶
{ "iat":"15790460234", "nonce":"f6a60810-3d07-41ac-81e7-b958c0dd21e4", "authorizations": { "type" : "oauth_scope", "scope" : "read_contacts", "expires_in" : "3600", "method" : "bearer", "token" : "eyJJ2D6.example.access.token.mZf9p" }, "claims": { "oidc": { "id_token" : "eyJhbUzI1N.example.id.token.YRw5DFdbW", "userinfo" : { "name" : "John Doe", "picture" : "https://photos.example/p/eyJzdkiO" } } } }¶
Example non-normative AS Response JSON document for Example 2 in Section 3:¶
{ "iat" :"15790460234", "nonce" :"0d1998d8-fbfa-4879-b942-85a88bff1f3b", "authorizations": { "type" : "oauth_scope", "scope" : "read_calendar write_calendar", "expires_in" : "3600", "method" : "pop", "access": { "handle" : "ey.example.access.handle.9yf3szM", "jwk": { "x5u" : "https://as.example/jwk/VBUEOIQA82" } }, "refresh": { "handle" : "ey.example.refresh.handle.Jl4FzM", "uri" : "https://as.example/refresh/eyj34" } } }¶
Details of the JSON document:¶
iat - the time of the response as a NumericDate.¶
nonce - the nonce that was included in the AS Request JSON Section 3.¶
There is an authorizations object in the AS Response if there was an authorizations object in the AS Request.¶
refresh - an optional object containing parameters required to refresh an access token or handle. See refresh request Section 8.18.¶
access - an object containing the parameters needed to access resources requiring proof-of-possession. Included if the access method is "pop".¶
There is a claims object in the AS Response if there was a claims object in the AS Request.¶
oidc¶
vc¶
The verified claims the user consented to be released. [Editor: details TBD]¶
The are three different methods for the Client to access an RS:¶
In the AS Response, the AS will return the method the Client MUST use when accessing the RS.¶
The Client obtains the following metadata about the AS prior to initiating a request:¶
Endpoint - the endpoint of the AS.¶
"as" - the unique string identifier for the AS.¶
Algorithms - the asymetric cryptographic algorithms supported by the AS.¶
Authorizations - the authorizations the Client may request, if any.¶
Identity Claims - the identity claims the Client may request, if any, and what public keys the claims will be signed with.¶
The client may also obtain information about how the AS will sign and/or encrypt the AS Response, as well as any other metadata required for extensions to this protocol, as defined in those extension specifications.¶
The default mechanism for the Client to authenticate to the AS and the RS is signing a JSON document with JWS per [RFC7515]. The resulting tokens always use compact serialization.¶
It is expected that extensions to this protocol that specify a different mechanism for the Client to authenticate, would over ride this section.¶
The Authorization Request JSON is signed with JWS and passed as the body of the POST.¶
The authorization, refresh, and access handles are signed with JWS resulting in authorization request, refresh, and access tokens respectively. These JOSE tokens are passed in the HTTP Authorization header with the "JOSE" parameter per Section 8.6.¶
The Client will use the same private key to create all tokens.¶
The Client and the AS MUST both use HTTP/2 ([RFC7540]) or later, and TLS 1.3 ([RFC8446]) or later, when communicating with each other.¶
[Editor: too aggressive to mandate HTTP/2 and TLS 1.3?]¶
A non-normative example of a JOSE header for a Registered Client using a key id to identify the Client's public key:¶
{ "alg":"ES256", "typ":"JOSE", "kid":"1" }¶
A non-normative example of a JOSE header for a Registered Client using a certificate to assert the Client's public key:¶
{ "alg":"ES256", "typ":"JOSE", "jwk": {"kty":"RSA", "use":"sig", "kid":"1b94c", "n":"vrjOfz9Ccdgx5nQudyhdoR17V-IubWMeOZCwX_jj0hgAsz2J_pqYW08 PLbK_PdiVGKPrqzmDIsLI7sA25VEnHU1uCLNwBuUiCO11_-7dYbsr4iJmG0Q u2j8DsVyT1azpJC_NG84Ty5KKthuCaPod7iI7w0LK9orSMhBEwwZDCxTWq4a YWAchc8t-emd9qOvWtVMDC2BXksRngh6X5bUYLy6AyHKvj-nUy1wgzjYQDwH MTplCoLtU-o-8SNnZ1tmRoGE9uJkBLdh5gFENabWnU5m1ZqZPdwS-qo-meMv VfJb6jJVWRpl2SUtCnYG2C32qvbWbjZ_jBPD5eunqsIo1vQ", "e":"AQAB", "x5c": ["MIIDQjCCAiqgAwIBAgIGATz/FuLiMA0GCSqGSIb3DQEBBQUAMGIxCzAJB gNVBAYTAlVTMQswCQYDVQQIEwJDTzEPMA0GA1UEBxMGRGVudmVyMRwwGgYD VQQKExNQaW5nIElkZW50aXR5IENvcnAuMRcwFQYDVQQDEw5CcmlhbiBDYW1 wYmVsbDAeFw0xMzAyMjEyMzI5MTVaFw0xODA4MTQyMjI5MTVaMGIxCzAJBg NVBAYTAlVTMQswCQYDVQQIEwJDTzEPMA0GA1UEBxMGRGVudmVyMRwwGgYDV QQKExNQaW5nIElkZW50aXR5IENvcnAuMRcwFQYDVQQDEw5CcmlhbiBDYW1w YmVsbDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL64zn8/QnH YMeZ0LncoXaEde1fiLm1jHjmQsF/449IYALM9if6amFtPDy2yvz3YlRij66 s5gyLCyO7ANuVRJx1NbgizcAblIgjtdf/u3WG7K+IiZhtELto/A7Fck9Ws6 SQvzRvOE8uSirYbgmj6He4iO8NCyvaK0jIQRMMGQwsU1quGmFgHIXPLfnpn fajr1rVTAwtgV5LEZ4Iel+W1GC8ugMhyr4/p1MtcIM42EA8BzE6ZQqC7VPq PvEjZ2dbZkaBhPbiZAS3YeYBRDWm1p1OZtWamT3cEvqqPpnjL1XyW+oyVVk aZdklLQp2Btgt9qr21m42f4wTw+Xrp6rCKNb0CAwEAATANBgkqhkiG9w0BA QUFAAOCAQEAh8zGlfSlcI0o3rYDPBB07aXNswb4ECNIKG0CETTUxmXl9KUL +9gGlqCz5iWLOgWsnrcKcY0vXPG9J1r9AqBNTqNgHq2G03X09266X5CpOe1 zFo+Owb1zxtp3PehFdfQJ610CDLEaS9V9Rqp17hCyybEpOGVwe8fnk+fbEL 2Bo3UPGrpsHzUoaGpDftmWssZkhpBJKVMJyf/RuP2SmmaIzmnw9JiSlYhzo 4tpzd5rFXhjRbg4zW9C+2qok+2+qDM1iJ684gPHMIY8aLWrdgQTxkumGmTq gawR+N5MDtdPTEQ0XfIBc2cJEUyMTY5MPvACWpkA6SdS4xSvdXK3IVfOWA=="] } }¶
[Editor: the jwk above was copy and pasted from the JWK example. Replace? ]¶
The certificate could be signed by the AS, allowing the AS to verify the signature using the AS public key, or the certificate could be signed by a private key the AS has bound to the Registered Client, allowing each instance of the Registered Client to have its own asymetric key pair.¶
A non-normative example of a JOSE header for a Dynamic Client including the public key generated by the Client that matches its its private key:¶
{ "alg":"ES256", "typ":"JOSE", "jwk":{ "kty":"EC", "crv":"P-256", "x":"Kgl5DJSgLyV-G32osmLhFKxJ97FoMW0dZVEqDG-Cwo4", "y":"GsL4mOM4x2e6iON8BHvRDQ6AgXAPnw0m0SfdlREV7i4" } }¶
A non-normative example of a JOSE header for a JOSE access token for a Client accessing an RS that requires proof-of-possession:¶
{ "alg":"ES256", "typ":"JOSE", "jwk":{ "x5u":"https://as.example/jwk/VBUEOIQA82" } }¶
The "jwk" object in a JOSE access token Section 8.5 MUST be the AS jwk object the AS provided with the access handle.¶
This decouples how the AS communicates the Client's public key to the RS from how the AS asserts the Client's public key. The RS can have a consistent mechanism assert the Client's public key across all Clients.¶
One advantage of this is the AS can create a certificate of a Dynamic Client's public key, and pass it by value or reference to the Client to present to the RS.¶
All JOSE headers MUST have: + the "alg" attribute. + the "typ" attribute set to "jose". + either a "kid" or "jwk" attribute.¶
[Editor: should we use indicate the type of token (authorization, refresh, access) using "typ" or "cty"?]¶
A non-normative example of a payload follows:¶
{ "as" :"https://as.example", "type" :"authentication", "iat" :"1579046092", "jti" :"f6d72254-4f23-417f-b55e-14ad323b1dc1", "handle":"eyJhb958.example.authentication.handle.9yf3szM" }¶
The payload of the authentication token contains:¶
as - the unique string identifier for the AS.¶
type - the string "authentication", indicating the type of token.¶
iat - the time the authentication token was created as a NumericDate.¶
jti - a unique identifier for the authentication token per [RFC7519] section 4.1.7.¶
handle the authentication handle the AS provided the Client in the Interaction Response Section 4.¶
A non-normative example of a payload follows:¶
{ "as" :"https://as.example", "type" :"authorization", "iat" :"1579046092", "jti" :"f6d72254-4f23-417f-b55e-14ad323b1dc1", "handle":"eyJhb958.example.authorization.handle.9yf3szM" }¶
The payload of the authorization token contains:¶
as - the unique string identifier for the AS.¶
type - the string "authorization", indicating the type of token.¶
iat - the time the authorization token was created as a NumericDate.¶
jti - a unique identifier for the authorization token per [RFC7519] section 4.1.7.¶
handle the authorization handle the AS provided the Client in the Interaction Response Section 4.¶
A non-normative example of a payload follows:¶
{ "as" :"https://as.example", "type" :"refresh", "iat" :"1579049876", "jti" :"4342046d-83c4-4725-8c72-e9a49245f791", "handle":"eyJhb958.example.refresh.handle.9yf3szM" }¶
The payload of the authorization token contains:¶
as - the unique string identifier for the AS.¶
type - the string "refresh", indicating the type of token.¶
iat - the time the refresh request token was created as a NumericDate.¶
jti - a unique identifier for the refresh request token.¶
handle the refresh handle the AS provided the Client in the AS Response Section 6 or access refresh response Section 8.18.¶
The "jwk" object in a JOSE access token header MUST be set to the "jwk" value the AS provided for the access handle.¶
A non-normative example of a payload follows:¶
{ "type" :"access", "iat" :"1579046092", "jti" :"5ef47057-08f9-4763-be8d-162824d43dfb", "handle":"eyJhb958.example.access.handle.9yf3szM" }¶
The payload of the JOSE access token contains:¶
type - the string "access", indicating the type of token.¶
iat - the time the JOSE access token was created as a NumericDate.¶
jti - a unique identifier for the JOSE access token.¶
handle the access handle the AS provided the Client in the AS Response Section 6 or access refresh response Section 8.18.¶
[Editor: should we include the called URI in the token?]¶
The Client authenticates requests by setting the HTTP Authorization header to include the "JOSE" parameter, followed by one or more space characters, followed by the appropriate JOSE token.¶
A non-normative example:¶
Authorization: JOSE eyJhb.example.authorization.token.haDwskpFDBW¶
The authorization request token, refresh request token, and the JOSE access token are all passed in this manner.¶
The Client creates a JSON document per Section 3, signs it using JWS [RFC7515], and sends the JWS token to the AS end point using HTTP POST, with a content-type of application/jose.¶
The AS may require the AS Request to be encrypted. If so, the JWS token is encrypted per JWE [RFC7516] using the public key and algorithm specified by the AS.¶
If the Client set the authenticate_first flag, the response includes an authentication object, otherwise it includes an authorization object. If the AS wants the Client to initiate the User interaction, it sends an interaction object.¶
If no interaction is required the AS will return an AS Response per Section 8.14, otherwise the AS will return an Interaction Response per Section 4.¶
If the AS wants the Client to start the interaction, an interaction object will be returned in the response.¶
The AS MAY respond with one of the following errors defined in Section 9:¶
TBD¶
The Client MAY delete an outstanding request using the authorization token by making an HTTP DELETE call to the authorization uri, setting the HTTP Authorization header per Section 8.6 with the authorization request token.¶
A non-normative deletion request example:¶
DELETE /authorization/ey7snHGs HTTP/2 Host: as.example Authorization: JOSE eyJhb.example.authorization.token.haDwskpFDBW¶
The AS MAY respond with one of the following errors defined in Section 9:¶
TBD¶
The Client makes an HTTP GET call to the authorization uri, setting the HTTP Authorization header per Section 8.6 with the authorization request token.¶
A non-normative Authorization Request example:¶
GET /authorization/ey7snHGs HTTP/2 Host: as.example Authorization: JOSE eyJhb.example.authorization.token.haDwskpFDBW¶
The AS verifies the authorization request token, and then provides a response according to what the User and/or RO have authorized if required. If no signature or encryption was required, the AS will respond with a JSON document with content-type set to application/json.¶
The AS MAY sign the response with a JWS per [RFC7515] and the private key matching the public key the AS defined as its AS Response signing key. The AS will respond with the content-type set to application/jose.¶
The AS MAY encrypt the response using the public key provided by the Client, using JWE per [RFC7516]. The AS will respond with the content-type set to application/jose.¶
The AS MAY respond with one of the following errors defined in Section 9:¶
TBD¶
If the access method in the AS Response authorizations object Section 6.2 was "bearer", then the Client accesses the RS per Section 2.1 of [RFC6750]¶
A non-normative example of the HTTP request headers follows:¶
GET /calendar HTTP/2 Host: calendar.example Authorization: bearer eyJJ2D6.example.access.token.mZf9pTSpA¶
TBD¶
If the access method in the AS Response authorizations object Section 6.2 was "pop", then the Client creates a JOSE access token per Section 8.5 for each call to the RS, setting the HTTP Authorization header per Section 8.6 with the JOSE access token.¶
A non-normative example of the HTTP request headers follows:¶
GET /calendar HTTP/2 Host: calendar.example Authorization: JOSE eyJhbG.example.JOSE.access.token.kwwQb958¶
TBD¶
If the access method in the AS Response authorizations object Section 6.2 was "pop_body", then the Client creates a JOSE access token per Section 8.5 for each call to the RS, setting the HTTP Authorization header per Section 8.6 with the JOSE access token.¶
The Client creates a JSON document per the RS requirements. The document MUST include the access handle. The CLient then signs the document using JWS [RFC7515], and sends the resulting compact notation JWS token to the RS end point using HTTP POST, with a content-type of application/jose. Note this is similar to the AS Request Section 8.8.¶
[Editor: any isues here? Anything missing that MUST be in the payload? Would an HTTP Authorization header make sense?]¶
If the Client received a refresh handle and uri from the AS in the Interaction Response, and it wants a fresh access token or handle, it creates a refresh request token per Section 8.4. setting the HTTP Authorization header per Section 8.6 with the refresh request token. The AS will then respond with a refresh response.¶
A non-normative example refresh response with an access handle:¶
{ "type" : "oauth_scope", "scope" : "read_calendar write_calendar", "expires_in" : "3600", "method" : "pop", "access": { "handle" : "ey.example.access.handle.9yf3iWszM", "jwk": { "x5u" : "https://as.example/jwk/VBUEOIQA82" } }, "refresh": { "handle" : "ey.example.refresh.handle.4SkjIi", "uri" : "https://as.example/refresh/eyJl4FzM" } }¶
The refresh response is the same as the authorizations object Section 6.2 in the AS Response.¶
If a new refresh handle and/or refresh uri is returned, the Client MUST use the new refresh handle and/or refresh uri¶
[Editor: are there other results relevant for [RAR]?]¶
The AS MAY respond with one of the following errors defined in Section 9:¶
TBD¶
[Editor: return "wait" time in AS Response when AS wants Client to wait before retying a Authorization Request. The Client MUST generate a fresh authorization token when retrying the Authorization Request. ]¶
TBD¶
[Editor: AS initiated flows have been challenging to implement as OAuth 2.0 did not directly support them, so deployments bounced back and forth between the Client and AS to create a Client initiated flow. Here is a proposal to support AS initiated: authentication; just-in-time (JIT) provisioning; and authorization]¶
In this sequence the User starts at the AS, and then based on User input, the AS redirects the User to a Client, passing an initiation token Section 10.1, and then the Client retrieves authorizations and/or identity claims about the User. The Client MUST be a Registered Client. The sequence follows:¶
The Client now has the User identity claims and/or authorizations. If Client policy permits, the Client can perform JIT provisioning if the User is new to the Client.¶
AS Initiated Sequence Diagram¶
+--------+ +-------------+ +---------------+ | | | | | | | | | User |-------(1)-->| | | | | | | | | | +-------------+ | (2) | | | /\ | | | Client |<--- initiation ---/ \-------------(3)---| Authorization | | | token | Server | | (4) | | | | | | | | |--(5)------- Authorization Request ------>| | | | | | | |<-(6)------- AS Response -----------------| | | | | | +--------+ +---------------+¶
A non-normative example of an initiation token payload follows:¶
{ "as": "https://as.example", "authorization": { "handle" : "eyJhb958.example.authorization.handle.9yf3szM", "uri" : "https://as.example/authorization/ey7snHGs" } }¶
authorization - the authorization object has the following attributes:¶
The initiation token is signed with JWS and uses the compact serialization.¶
This standard can be extended in a number of areas:¶
An extension could define other mechanisms for the Client to authenticate and replace JOSE in Section 8 with Mutual TLS or HTTP Signing. Constrained environments could use CBOR [RFC7049] instead of JSON, and COSE [RFC8152] instead of JOSE, and CoAP [RFC8323] instead of HTTP/2.¶
An additional top level object could be added to the AS Request payload if the AS can manage delegations other than authorizations or claims, or some other functionality.¶
Additional information about the Client that the AS would require related to an extension.¶
Additional information about the Client that the AS would require related to an extension.¶
Additional types of authorizations in addition to OAuth 2.0 scopes and RAR.¶
Additional types of identity claims in addition to OpenID Connect claims and Verified Credentials.¶
Additional mechanisms for the Client to start an interaction with the User.¶
Additional mechanisms for the Client to present authorization to a resource.¶
An extension could define a new handle for the Client to use to regularly provide continuous authentication signals and receive responses.¶
[Editor: do we specify access token / handle introspection in this document, or leave that to an extension?]¶
[Editor: do we specify access token / handle revocation in this document, or leave that to an extension?]¶
Why is there only one mechanism for the Client to authenticate with the AS? Why not support other mechanisms?¶
Having choices requires implementers to understand which choice is preferable for them. Having one default mechanism in the document for the Client to authenticate simplifies most implementations. Extensions can specify other mechanisms that are preferable in specific environments.¶
Why is the default Client authentication JOSE rather than MTLS?¶
MTLS cannot be used today by a Dynamic Client. MTLS requires the application to have access below what is typically the application layer, that is often not available on some platforms. JOSE is done at the application layer. Many AS deployments will be an application behind a proxy performing TLS, and there are risks in the proxy passing on the results of MTLS.¶
Why is the default Client authentication JOSE rather than HTTP signing?¶
There is currently no widely deployed open standard for HTTP signing. Additionally, HTTP signing requires passing all the relevant parts of the HTTP request to downstream services within an AS that may need to independently verify the Client identity.¶
What are the advantages of using JOSE for the Client to authenticate to the AS and a resource?¶
Both Registered Clients and Dynamic Clients can have a private key, eliminating the public Client issues in OAuth 2.0, as a Dynamic Client can create an ephemeral key pair. Using asymetric cryptography also allows each instance of a Registered Client to have its own private key if it can obtain a certificate binding its public key to the public key the AS has for the Client. Signed tokens can be passed to downstream components in a AS or RS to enable independent verification of the Client and its request. The AS Initiated Sequence Section 10 requires a URL safe parameter, and JOSE is URL safe.¶
Why does the AS not return parameters to the Client in the redirect url?¶
Passing parameters via a browser redirection is the source of many of the security risks in OAuth 2.0. It also presents a challenge for smart devices. In this protocol, the redirection from the Client to the AS is to enable the AS to interact with the User, and the redirection back to the Client is to hand back interaction control to the Client if the redirection was a full browser redirect. Unlike OAuth 2.0, the identity of the Client is independent of the URI the AS redirects to.¶
Why is there not a UserInfo endpoint as there is with OpenID Connect?¶
In OpenID Connect, obtaining claims over the redirect or the Token Endpoint are problematic. The redirect is limited in size, and is not secure. The Token Endpoint is intended to return tokens, and is limited by the "application/x-www-form-urlencoded" format. A UserInfo endpoint returns "application/json", and can return rich claims, just as the authorization uri in this protocol.¶
[Editor: is there some other reason to have the UserInfo endpoint? What are industry best practices now? ]¶
Why is there still a Client ID? Could we not use a fingerprint of the public key to identify the Client?¶
Some AS deployments do not allow calls from Registered Clients, and provide different functionality to different Clients. A permanent identifier for the Client is needed for the Client developer and the AS admin to ensure they are referring to the same Client. The Client ID was used in OAuth 2.0, and it served the same purpose.¶
Why have both claims and authorizations?¶
There are use cases for each that are independent: authenticating a user vs granting access to a resource. A request for an authorization returns an access token or handle, while a request for a claim returns the claim.¶
Why specify HTTP/2 or later and TLS 1.3 or later for Client and AS communication in ?Section 8¶
Knowing the AS supports HTTP/2 enables a Client to set up a connection faster. HTTP/2 will be more efficient when Clients have large numbers of access tokens and are frequently refreshing them at the AS as there will be less network traffic. Mandating TLS 1.3 similarly improves the performance and security of Clients and AS when setting up a TLS connection.¶
Why do some of the JSON objects only have one child, such as the identifiers object in the user object in the AS Request?¶
It is difficult to forecast future use cases. Having more resolution may mean the difference between a simple extension, and a convoluted extension.¶
Why is the "iss" included in the "oidc" identifier object? Would the "sub" not be enough for the AS to identify the User?¶
The AS may use another AS to authenticate Users. The "iss" and "sub" combination is required to uniquely identify the User for any AS.¶
Why complicate the sequence with authentication first?¶
A common pattern is to use an AS to authenticate the User at the Client. The Client does not know a priori if the User is a new User, or a returning User. Asking a returning User to consent releasing identity claims and/or authorizations they have already provided is a poor User experience, as is sending the User back to the AS. The Client requesting identity first enables the Client to get a response from the AS while the AS is still interacting with the User, so that the Client can request any identity claims/or authorizations required or desired.¶
Why is there a JOSE Body access method for the Client?Section 8.17¶
There are numerous use cases where the RS wants non-repudiation and providence of API calls. For example, the UAS Service Supplier Framework for Authentication and Authorization [UTM].¶
This draft derives many of its concepts from Justin Richer's Transactional Authorization draft [TxAuth].¶
Additional thanks to Justin Richer for his strong critique of earlier drafts.¶
[ JOSE parameter for Authorization HTTP header ]¶
TBD¶
Changed Features¶
The major differences between this protocol and OAuth 2.0 and OpenID Connect are:¶
Preserved Features¶