Network Working Group | L. Howard |
Internet-Draft | PADL |
Intended status: Experimental | N. Williams |
Expires: October 17, 2013 | Cryptonector |
April 15, 2013 |
A SASL and GSS-API Mechanism for the BrowserID Authentication Protocol
draft-howard-gss-browserid-02.txt
This document defines protocols, procedures and conventions for a Generic Security Service Application Program Interface (GSS-API) security mechanism based on the BrowserID authentication mechanism. Through the GS2 family of mechanisms defined in RFC 5801, these protocols also define how Simple Authentication and Security Layer (SASL, RFC 4422) applications may use BrowserID.
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 http://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 October 17, 2013.
Copyright (c) 2013 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 (http://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.
[BrowserID] is a web-based three-party security protocol by which user agents can present to a Relying Party (RP) a signed assertion of e-mail address ownership. BrowserID was intended to be used for web authentication. We find BrowserID to be useful in general, therefore we define herein how to use it in many more applications.
The Simple Authentication and Security Layer (SASL) [RFC4422] is a framework for providing authentication and message protection services via pluggable mechanisms. Protocols that support it include IMAP, SMTP, and XMPP.
The Generic Security Service Application Program Interface (GSS-API) [RFC2743] provides a framework for authentication and message protection services through a common programming interface. This document conforms to the SASL and GSS-API bridge specified in [RFC5801], so it defines both a SASL and GSS-API mechanism.
The BrowserID mechanism described in this document reuses the existing web-based BrowserID protocol, but profiles it for use in applications that support SASL or GSS-API, adding features such as key agreement, mutual authentication, and fast re-authentication.
The following diagram illustrates the interactions between the three parties in the GSS BrowserID protocol. Note that the terms client, initiator and user agent (UA) are used interchangeably in this document, as are server, acceptor and relying party (RP).
+------------+ | BrowserID | | identity | | provider | +------------+ // \\ // \\ // \\ // \\ make signed // \\ fetch IdP public certificate // \\ key over HTTPS for user's // \\ (RP may cache) public key // \\ // \\ // \\ // \\ |/ \| +-------------+ +-------------+ | SASL or GSS | GSS BrowserID | SASL or GSS | | client/UA |<------------------->| server/RP | | (initiator) | | (acceptor) | +-------------+ +-------------+
Figure 1: Interworking Architecture
The means of discovering GSS-API peers and their supported mechanisms is out of this specification's scope. They may use SASL [RFC4422] or the Simple and Protected Negotiation mechanism (SPNEGO) [RFC4178].
Discovery of a BrowserID identity provider (IdP) for a user is described in the BrowserID specification. A domain publishes a document containing their public key and URIs for authenticating and provisioning users, or pointer to an authority containing such a document.
The GSS-API protocol involves a client, known as the initiator, sending an initial security context token of a chosen GSS-API security mechanism to a peer, known as the acceptor. The two peers subsequently exchange, synchronously, as many security context tokens as necessary to complete the authentication or fail. The specific number of context tokens exchanged varies by security mechanism: in the case of the BrowserID mechanism, it is typically two (i.e. a single round trip), however it can be more in some cases. Once authentication is complete, the initiator and acceptor share a security context which identifies the peers and can optionally be used for integrity or confidentiality protecting subsequent application messages.
The original BrowserID protocol, as defined outside this document, specifies a bearer token authentication protocol for web applications. The user agent generates a short-term key pair, the public key of which is signed by the user's IdP. (The user must have already authenticated to the IdP; how this is done is not specified by BrowserID, but forms-based authentication is common.) The IdP returns a certificate for the user which may be cached by the user's browser. When authenticating to a Relying Party (RP), the browser generates an identity assertion containing the RP domain and an expiration time. The user agent signs this and presents both the assertion and certificate to the RP. (The combination of an assertion and zero or more certificates is termed a “backed assertion”.) The RP fetches the public key for the IdP, validates the user's certificate (and those of any intermediate certifying parties) and then verifies the assertion.
The GSS BrowserID protocol extends this by having the RP always send back a response to the user agent, which at a minimum provides key confirmation (this is needed for some key agreement methods) and indicates the lifetime of the established security context. The key confirmation token is also required for mutual authentication, when the initiator application requests that feature.
GSS-API provides a number of a message protection services:
These services may be used with security contexts that have a shared session key, to protect application-layer messages.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
The reader is assumed to be familiar with the terms used in the BrowserID specification.
The GSS-API provides a rich security principal naming model. At its most basic the query forms of names consist of a user-entered/displayable string and a “name-type”. Name-types are constants with names prefixed with “GSS_C_NT_” in the GSS-API. Names may also have attributes [RFC6680].
This name may contain an e-mail address, or a service principal name identifying an acceptor. The encoding of service principal names is intended to be somewhat compatible with the Kerberos [RFC4120] security protocol (without the realm name).
The following ABNF defines the 'name' rule that names of this type must match.
char-normal = %x00-2E/%x30-3F/%x41-5B/%x5D-FF char-escaped = "\" %x2F / "\" %x40 / "\" %x5C name-char = char-normal / char-escaped name-string = 1*name-char user = name-string domain = name-string email = user "@" domain service-name = name-string service-host = name-string service-specific = name-string service-specifics = service-specific 0*("/" service-specifics) spn = service-name ["/" service-host [ "/" service-specifics]] name = email / spn
This name is implicitly converted to a GSS_C_NT_BROWSERID_PRINCIPAL. A default domain may be appended when importing names of this type.
This name is transformed by replacing the “@” symbol with a “/”, and then implicitly converted to a GSS_C_NT_BROWSERID_PRINCIPAL.
[RFC5178] domain-based service names are transformed into a GSS_C_NT_BROWSERID_PRINCIPAL as follows:
If the initiator principal's leaf certificate does not contain a “principal” claim, then the initiator name has this name type.
A GSS-API service name is encoded into a BrowserID audience URL with the following syntax, where spn is defined above:
audience = "urn:x-gss:" spn
The BrowserID GSS-API mechanism performs no name canonicalization. The mechanism's GSS_Canonicalize_name() returns an MN whose display form is the same as the query form. Of course, the principal named obtained from a CREDENTIAL HANDLE may be canonical in that the IdP might only issue credentials for canonical names, but credential acquisition is out of scope here.
The exported name token format for the BrowserID GSS-API mechanism is the same as the query form, plus the standard exported name token format header mandated by the GSS-API [RFC2743].
The acceptor MAY surface attributes from the assertion and any certificates using GSS_Get_name_attribute() (see [RFC6680]). The URN prefix is "urn:<TBD>:params:gss:jwt". If a SAML assertion is present in the "saml" parameter of the leaf certificate, it may be surfaced using the URN prefix "urn:<TBD>:params:gss:federated-saml-attribute".
Attributes from the assertion MUST be marked as unauthenticated unless otherwise validated by the acceptor (e.g. the audience).
Attributes from certificates SHOULD be marked as authenticated.
All context tokens include a two-byte token identifier followed by a backed BrowserID assertion. This document defines the following token IDs:
Section | Token ID | ASCII | Description |
---|---|---|---|
4.1.1 | 0x632C | c, | Initiator context token |
4.1.2 | 0x432C | C, | Acceptor context token |
0x442C | D, | Context deletion token | |
4.2.4 | 0x6D2C | m, | Initiator metadata token |
4.2.4 | 0x4D2C | M, | Acceptor metadata token |
The token ID has a human-readable ASCII encoding for the benefit of pure SASL implementations of this mechanism.
The initial context token is framed per Section 1 of [RFC2743]:
GSS-API DEFINITIONS ::= BEGIN MechType ::= OBJECT IDENTIFIER -- representing BrowserID mechanism GSSAPI-Token ::= [APPLICATION 0] IMPLICIT SEQUENCE { thisMech MechType, innerToken ANY DEFINED BY thisMech -- token ID and backed assertion } END
Unlike many other GSS-API mechanisms such as Kerberos, this token framing is not used by subsequent context or by [I-D.zhu-negoex] metadata tokens. As such, pure SASL implementations of this mechanism do not need to deal with DER encoding the mechanism object identifier.
GSS BrowserID is a family of mechanisms, where the last element in the OID arc indicates the [RFC4121] encryption type supported for message protection services. The OID prefix is 1.3.6.1.4.1.5322.24.1. The NULL encryption type is valid, in which case services that require a key are not available.
The innerToken consists of the initiator context token ID concatenated with a backed assertion for the audience corresponding to the target name passed into GSS_Init_sec_context(). In addition, the assertion MAY contain the additional claims, which are described later in this document:
The call to GSS_Init_sec_context() returns GSS_C_CONTINUE_NEEDED to indicate that a subsequent context token from the acceptor is expected.
Upon receiving a context token from the initiator, the acceptor validates that the token is well formed and contains a valid BrowserID mechanism OID and the initiator context token ID.
The acceptor then verifies the backed identity assertion per the BrowserID specification. This includes validating the expiry times, audience, certificate chain, and assertion signature. The acceptor then verifies the channel binding token, if present, and any other GSS-specific claims in the assertion. In case of failure, a response assertion containing GSS major and minor status codes SHOULD be returned.
If the [RFC3961] encryption type for the selected mechanism is not ENCTYPE_NULL, the acceptor generates a ECDH public key using the parameters received from the client (see Section 6.2.2), and from it derives the RP Response Key (RRK) (see Section 7.3). The acceptor then generates a response assertion containing its ECDH public key and context expiration time (note that the context expiration time is a purely informational quantity). The response assertion will be:
The response assertion is encoded as a backed assertion, prefixed with the acceptor context token ID. It SHALL have a certificate count of zero.
Finally, the Context Root Key (CRK) (see Section 7.4) is derived from the ECDH shared secret (if present) and GSS_S_COMPLETE is returned, along with the initiator name from the verified assertion. If the CRK is available, the replay_det_state (GSS_C_REPLAY_FLAG), sequence_state (GSS_C_SEQUENCE_FLAG), conf_avail (GSS_C_CONF_FLAG) and integ_avail (GSS_C_INTEG_FLAG) security context flags are set to TRUE.
Other assertion/certificate properties MAY be made available via GSS_Get_name_attribute().
Upon receiving the acceptor context token, the initiator unpacks the response assertion and, if applicable, computes the ECDH shared secret and RRK. The RRK is used to verify the response assertion unless mutual authentication is available, in which case the acceptor's public key will be used.
The initiator sets the context expiry time with that received in the response assertion, if present; otherwise, the context expires when the initiator principal's certificate expires.
The CRK is derived from the ECDH shared secret and GSS_S_COMPLETE is returned to indicate the initiator is authenticated and the context is ready for use. No output token is emitted. Security context flags are set as for the acceptor context.
Mutual authentication allows the acceptor to be authenticated to the initiator. The mechanism SHALL set the mutual_state security context flag (GSS_C_MUTUAL_FLAG) to TRUE if mutual authentication succeeded. Support for mutual authentication is OPTIONAL.
The base protocol is extended as follows to support this:
If the initiator requested the mutual_state flag, a nonce (see Section 6.1.7) is included in the assertion to bind the initiator and acceptor tokens. The presence of a nonce in a certificate-signed assertion indicates that mutual authentication is desired.
If the acceptor has a private key and certificate available and received a nonce in the initiator assertion, it signs the response using a private key rather than the RP Response Key (RRK). The response includes the nonce from the initiator's assertion, to bind the two.
While the response is a backed assertion, in order to take advantage of existing keying infrastructures BrowserID certificates MUST NOT be included in the backed assertion. Rather, an X.509 certificate SHALL be included as a value for the "x5c" header property in the assertion (see [I-D.ietf-jose-json-web-signature] 4.1.6). The certificate MUST be valid for signing.
The initiator verifies the assertion signature and that the nonce matches, and validates the certificate chain. Trust anchors SHOULD be configurable both system-wide and specifically for the BrowserID mechanism.
If the initiator policy requires the acceptor service name to be validated in addition to the acceptor host name, the service name MUST be validated against one of the following:
If the initiator policy only requires the acceptor host name to be authenticated, or an EKU binding is used (rather than the id-pkinit-san or URI SAN, which contain a host name), then the host component of the service name (service-host) MUST be present as a value for the dNSName SAN or as the least significant Common Name RDN.
If the acceptor name contains a service-specific component and the initiator policy requires this to be authenticated, note only the id-pkinit-san or URI SANs provide this binding.
[I-D.zhu-negoex] may be used to advertise acceptor certificates.
If the acceptor supports mutual authentication, it MAY include its certificate and any additional certificates inside a backed assertion with an empty payload as output for GSS_Query_meta_data(). The "assertion" is prefixed with the two byte token identifier “M,”.
Upon receiving this, the initiator MAY validate the certificate or fingerprint, or present either to the initiator before committing to authenticate.
The NegoEx signing key is the output of GSS_Pseudo_random() (see Section 7.7) with an input of GSS_C_PRF_KEY_FULL and "gss-browserid-negoex-initiator" or "gss-browserid-negoex-acceptor" (without quotes), depending on the party generating the signature.
The NegoEx authentication scheme is the binary encoding of the following hexadecimal string:
535538008647F5BC624BD8076949F0
where the third byte (zero above) is set to the [RFC3961] encryption type for the selected mechanism. The authentication scheme for encryption types greater than 255 is not specified here.
There is currently no initiator-sent metadata defined and acceptors should ignore any sent. The metadata is advisory and the initiator is free to ignore it.
Fast re-authentication allows a security context to be established using a secret key derived from the initial certificate-signed ECDH key agreement.
The re-authentication assertion is signed with a HMAC using the Authenticator Root Key (ARK) (see Section 7.5), rather than a initiator principal's BrowserID certificate.
Support for fast re-authentication is OPTIONAL and is indicated by the acceptor returning a ticket in the response assertion.
If the acceptor supports re-authentication, the following steps are added to Section 4.1.2:
The acceptor must be able to use the ticket identifier to securely retrieve the subject, issuer, audience, expiry time, ARK and any other relevant properties of the original security context. One implementation choice may be to use the ticket identifier as a key into a dictionary containing this information. Another would be to encrypt this information in a long-term secret only known to the acceptor and encode the resulting cipher-text in the opaque ticket identifier.
The ticket expiry time by default SHOULD match the initiator's certificate expiry, however it MAY be configurable so the ticket expires before or after the certificate.
The initiator MAY cache tickets, along with the ARK, received from the acceptor in order to re-authenticate to it at a future time.
The initiator looks in its ticket cache for an unexpired ticket for the desired acceptor. If none is found, the normal certificate-based authentication flow is performed, otherwise:
If the ticket cannot be found, or the authentication fails, the acceptor SHOULD return a REAUTH_FAILED error, permitting the initiator to recover and fallback to generating a BrowserID assertion. It MAY also include its local timestamp (see Section 6.2.1) so that the initiator can perform clock skew compensation.
The mutual authentication state of a re-authenticated context is transitive. The initiator MUST NOT set the mutual_state flag for a re-authenticated context unless the original context was mutually authenticated.
As such, the initiator's ticket cache must store the mutual authentication state of the original context.
Normally, re-authentication tickets are only issued when the initiator authenticated with a certificate-signed assertion. Acceptors MAY issue a new ticket with an expiry beyond the ticket lifetime when the initiator used a re-authentication assertion. The issuing of new tickets MUST be subject to a policy that prevents them from being renewed indefinitely.
The extra round-trip (XRT) option adds an additional round trip to the context token exchange. It allows the initiator to prove knowledge of the Context Master Key (CMK) (see Section 7.2) by sending an additional token signed in a key derived from the CMK and an acceptor-issued challenge. Support for the XRT option is OPTIONAL in the acceptor and REQUIRED in the initiator. The initiator is allowed to not request it, but MUST perform XRT if the acceptor requires it.
(Note that the term “extra round trip” is something of a misnomer; it only adds an additional token to the context token exchange. It is anticipated however that this mechanism will most commonly be used with pseudo-mechanisms or application protocols that require an even number of tokens.)
The initiator may advertise to the acceptor that it desires the XRT option by sending in its request assertion an “opts” claim (see Section 6.1.9) containing the “xrt” value. This option MUST be set if the caller requested GSS_C_DCE_STYLE (see [RFC4757]). Otherwise, the setting of this option is implementation dependent.
If the initiator requested the XRT option and the acceptor supports it, or the acceptor requires it, the acceptor sends a “jti” claim (see Section 6.2.6) in the response assertion containing a random base 64 URL encoded value. This value MUST be at least 64 bits in length. The acceptor then returns GSS_C_CONTINUE_NEEDED to indicate that an additional context token is expected from the initiator.
(Note that this top-level “jti” claim is unrelated to the “nonce” claim or to the “jti” ticket identifier claim.)
If the acceptor indicated support for the XRT option by including a “jti” claim in its response, then the initiator sends an additional context token to the acceptor. This token contains the initiator context token ID concatenated with a backed assertion with zero certificates and an empty payload, signed using the XRTK (see Section 7.6.1).
The acceptor MUST validate the XRT context token by first validating the context token ID, and then verifying the assertion signature with the XRTK. The acceptor SHOULD reject XRT context tokens with a certificate count greater than zero. Unknown claims in the assertion payload MUST be ignored. The acceptor then returns GSS_C_COMPLETE to the caller.
The acceptor MAY avoid using a replay cache when this option is in effect.
When the XRT option is in effect, the XRTK is used instead of the CMK to derive the Context Root Key (CRK) (see Section 7.4). Per-message tokens MUST have the AcceptorSubkey flag set (see [RFC4121] Section 4.2.2).
The expiry and, if present, issued-at and not-before times of all elements in a backed assertion, MUST be validated. This applies equally to re-authentication assertions, public key assertions, and the entire certificate chain. If the expiry time is absent, the issued-at time MUST be present, and the JWT implicitly expires a short, implementation-defined interval after the issued-at time. (A suggested interval is five minutes.)
The GSS context lifetime SHOULD NOT exceed the lifetime of the initiator principal's certificate.
The lifetime of a re-authentication ticket SHOULD NOT exceed the lifetime of the initiator principal's certificate. The acceptor MUST validate the ticket expiry time when performing re-authentication.
Message protections services such as GSS_Wrap() SHOULD be available beyond the GSS context lifetime for maximum application compatibility.
If the credential passed to GSS_Accept_sec_context() is not for GSS_C_NO_NAME, then its string representation as a BrowserID principal MUST match the unencoded audience (that is, the audience without the URN prefix defined in Section 3.2).
GSS-API channel binding is a protected facility for naming an enclosing channel between the initiator and acceptor. If the acceptor passed in channel bindings to GSS_Accept_sec_context(), the assertion MUST contain a matching channel binding claim. (Only the application_data component is validated.)
The acceptor SHOULD accept any channel binding provided by the initiator if NULL channel bindings are passed to GSS_Accept_sec_context().
The initiator MUST choose an ECDH curve with an equivalent strength to the negotiated [RFC4121] encryption type. Appropriate curves are given in Section 10.1.
The curve strength MUST be verified by the acceptor. A stronger than required curve MAY be selected by the initiator.
Signature validation on assertions is the same as for the web usage of BrowserID, with the addition that response assertions may and re-authentication assertions must be signed with a symmetric key. In this case the HMAC algorithm associated with the mechanism OID is used, and there are no certificates in the backed assertion.
If the XRT option is not in effect, the acceptor MUST maintain a cache of received assertions in order to guard against replay attacks.
The initiator and acceptor should set the returned flags as follows:
These claims are included in the assertion sent to the acceptor and are authenticated by the initiator's private key and certificate chain (directly, or in the case of re-authentication assertions, transitively). Claims not specified here MUST be ignored by the acceptor.
Here is an example assertion containing Elliptic Curve Diffie-Hellman parameters, along with a nonce indicating that mutual authentication is desired:
{ "exp": 1360158396188, "ecdh": { "crv": "P-256", "x": "JR5UPDgMLFPZwOGaKKSF24658tB1DccM1_oHPbCHeZg", "y": "S45Esx_6DfE5-xdB3X7sIIJ16MwO0Y_RiDc-i5ZTLQ8" }, "nonce": "GnK2IBA42iQ", "aud": "urn:x-gss:imap/mail.example.com" }
The following claims are permitted in the request assertion:
The audience, formatted as a URN containing the acceptor's principal name (see Section 3.2). This claim is REQUIRED.
This contains the time when the assertion expires, in milliseconds since January 1, 1970. At least one of “exp” or “iat” MUST be present.
This contains the time the assertion was issued (in milliseconds since January 1, 1970). If present, the acceptor MUST validate that the assertion was recently issued. At least one of “exp” or “iat” MUST be present.
This contains the time, in milliseconds since January 1, 1970, from which the assertion begins to be valid. This claim is OPTIONAL.
These contain ECDH key parameters for deriving a shared session key with the relying party: "crv" contains the curve, "x" the X coordinate and "y" the Y coordinate (see [I-D.ietf-oauth-json-web-token] Section 5.2).
The “ecdh” claim is REQUIRED unless the associated encryption type is ENCTYPE_NULL, or there is already a prior session key (as is the case for re-authentication assertions).
This contains channel binding information for binding the GSS context to an outer channel (e.g. see [RFC5929]). Its value is the base64 URL encoding of the application-specific data component of the channel bindings passed to GSS_Init_sec_context() or GSS_Accept_sec_context(). This claim is OPTIONAL.
This is a random quantity of at least 64 bits, base 64 URL encoded, which is used to bind the request and response assertions in the case a freshly agreed key is not used to sign the response assertion. This claim is REQUIRED if mutual authentication is desired and the assertion is signed using a certificate, or if re-authentication is being performed.
This is an opaque ticket identifier, when the assertion is being used for fast re-authentication. This matches the “jti” value sent back in the response assertion ticket. This claim is REQUIRED for re-authentication assertions, otherwise it the assertion MUST be rejected.
This contains a JSON array of string values indicating various protocol options that are supported by the initiator. Unknown options MUST be ignored by the acceptor. This document defines the following extensions:
Name | Description |
---|---|
xrt | The initiator supports the extra round trip option (see Section 4.4) |
dce | The initiator requested GSS_C_DCE_STYLE (see RFC4757 Section 7.1) |
ify | The initiator requested GSS_C_IDENTIFY_FLAG (see RFC4757 Section 7.1) |
The response assertion is sent from the acceptor to the initiator to provide key agreement, and either key confirmation or mutual authentication. It is formatted as a backed assertion, however in the current specification it consists of a single assertion with zero certificates; that is, it is "unbacked". (It is encoded as a backed assertion in order to provide future support for mutual authentication using native BrowserID certificates. Such support is not specified here.)
In the case of a key successfully being negotiated, the response assertion is signed with the RP Response Key (RRK) (see Section 7.3). Alternatively, it may be signed with the acceptor's private RSA or DSA key. In this case, the acceptor's X.509 certificate is included in the "x5c" property of the JWT header.
The HMAC-SHA256 (HS256) algorithm MUST be supported by implementors of this specification.
If the [RFC3961] encryption type for the mechanism is ENCTYPE_NULL, then the signature is absent and the value of the "alg" header claim is "none". No signature verification is required in this case.
Claims not specified here MUST be ignored by the initiator.
Here is an example response assertion:
{ "exp": 1362960258000, "nonce": "bbqT10Gyx3s", "ecdh": { "x": "bvNF6V1rpMeQyGOKCj0kBaOaSh3tlhUcbffaji4uCEI", "y": "Iuqs650FXzXFUD9kHknETfbqiB8XBbCHlJXoysx3rvw" }, "tkt": { "jti": "Jgg7vKX2sEKlCWBfmLTg_n4qz3NVZxOU-a2B4qYMkXI", "exp": 1362992660000 } }
The following claims are permitted in the response assertion:
The current acceptor time, in milliseconds since January 1, 1970. This allows the initiator to compensate for clock differences when generating assertions. This claim is OPTIONAL.
This contains a JSON object containing the coordinates of the acceptor's ECDH public key: "x" contains the X coordinate and "y" the Y coordinate (see [I-D.ietf-oauth-json-web-token] Section 5.2). This claim is REQUIRED unless the associated encryption type is ENCTYPE_NULL, or there is already an established session key, as is the case for re-authentication assertions.
The “crv” property MUST NOT be present; it is determined by the initiator.
This contains the time when the context expires, in milliseconds since January 1, 1970. This claim is OPTIONAL; the initiator should use the certificate or ticket expiry time if absent.
The nonce as received from the initiator. This MUST NOT be present unless a nonce was received from the initiator, and the acceptor is signing the assertion with a private key.
This contains a JSON object that may be used for re-authenticating to the acceptor without acquiring an assertion. Its usage is optional. It has two properties: “jti”, an opaque identifier to be presented in a re-authentication assertion; and “exp”, the expiry time of the ticket. This claim is OPTIONAL.
This contains a base64 URL encoded random value of at least 64 bits that is used to uniquely identify the acceptor response, in the case that the extra round trip option is used. It SHOULD not be present unless the initiator requested the extra round trip option.
Error assertions are backed assertions containing any or all of the following claims. In addition, they MUST have the “iat” claim, for initiator clock skew correction. All other response assertion claims are OPTIONAL or not applicable in error assertions. Conversely, the claims listed below MUST NOT be present in a non-error response assertion.
The error assertion MAY be signed if a key is available, otherwise the signature is absent and the value of the "alg" header claim is "none".
This contains a GSS major status code represented as a number.
This contains a GSS minor status code represented as a number.
If REAUTH_FAILED is received, the initiator SHOULD attempt to send another initial context token containing a fresh assertion.
The following protocol minor status codes are defined. Note that the API representation of these status codes is implementation dependent. Status codes with the high bit set are GSS BrowserID protocol errors; the remainder are BrowserID protocol errors.
Error | Protocol | Description |
---|---|---|
INVALID_JSON | 8 | Invalid JSON encoding |
INVALID_BASE64 | 9 | Invalid Base64 encoding |
INVALID_ASSERTION | 10 | Invalid assertion |
TOO_MANY_CERTS | 13 | Too many certificates |
UNTRUSTED_ISSUER | 14 | Untrusted issuer |
INVALID_ISSUER | 15 | Invalid issuer |
MISSING_ISSUER | 16 | Missing issuer |
MISSING_AUDIENCE | 17 | Missing audience |
BAD_AUDIENCE | 18 | Bad audience |
EXPIRED_ASSERTION | 19 | Assertion expired |
ASSERTION_NOT_YET_VALID | 20 | Assertion not yet valid |
EXPIRED_CERT | 21 | Certificate expired |
CERT_NOT_YET_VALID | 22 | Certificate not yet valid |
INVALID_SIGNATURE | 23 | Invalid signature |
MISSING_ALGORITHM | 24 | Missing JWS algorithm |
UNKNOWN_ALGORITHM | 25 | Unknown JWS algorithm |
MISSING_PRINCIPAL | 34 | Missing principal attribute |
UNKNOWN_PRINCIPAL_TYPE | 35 | Unknown principal type |
MISSING_CERT | 36 | Missing certificate |
MISSING_CHANNEL_BINDINGS | 38 | Missing channel bindings |
CHANNEL_BINDINGS_MISMATCH | 39 | Channel bindings do not match |
NOT_REAUTH_ASSERTION | 70 | Not a re-authentication assertion |
BAD_SUBJECT | 71 | Bad subject name |
MISMATCHED_RP_RESPONSE | 72 | Mismatched RP response token |
REFLECTED_RP_RESPOSNE | 73 | Reflected RP response token |
UNKNOWN_EC_CURVE | 77 | Unknown ECC curve |
INVALID_EC_CURVE | 78 | Invalid ECC curve |
MISSING_NONCE | 79 | Missing nonce |
WRONG_SIZE | 0x80000001 | Buffer is incorrect size |
WRONG_MECH | 0x80000002 | Mechanism OID is incorrect |
BAD_TOK_HEADER | 0x80000003 | Token header is malformed or corrupt |
TOK_TRUNC | 0x80000004 | Token is missing data |
BAD_DIRECTION | 0x80000005 | Packet was replayed in wrong direction |
WRONG_TOK_ID | 0x80000006 | Received token ID does not match expected |
KEY_UNAVAILABLE | 0x80000007 | Key unavailable |
KEY_TOO_SHORT | 0x80000008 | Key too weak |
CONTEXT_ESTABLISHED | 0x80000009 | Context already established |
CONTEXT_INCOMPLETE | 0x8000000A | Context incomplete |
BAD_CONTEXT_TOKEN | 0x8000000B | Context token malformed or corrupt |
BAD_ERROR_TOKEN | 0x8000000C | Error token malformed or corrupt |
BAD_CONTEXT_OPTION | 0x8000000D | Bad context option |
REAUTH_FAILED | 0x8000000E | Re-authentication failure |
No claims are presently defined for the extra round trip assertion. Unknown claims MUST be ignored by the acceptor.
The following function is used as the base algorithm for deriving keys:
browserid-derive-key(K, usage) = HMAC(K, "BrowserID" || K || usage || 0x01)
The HMAC hash algorithm for all currently specified key lengths is SHA-256. Note that the inclusion of K in the HMAC input is for interoperability with some crypto implementations.
This key is the shared secret resulting from the ECDH exchange. Its length corresponds to the selected EC curve. It is never used without derivation and thus may be used with implementations that do not expose the ECDH value directly.
This is the Diffie-Hellman Key (DHK) for all initially authenticated contexts and the Authenticator Session Key (ASK) for re-authenticated contexts.
If mutual authentication without a fast re-authentication ticket is performed then the response assertion will be signed with a public key signature using the private key for the acceptor's certificate.
Otherwise a symmetric RP Response Key (RRK) is derived as follows:
RRK = browserid-derive-key(CMK, "RRK")
The Context Root Key (CRK) is used for [RFC4121] message protection services, e.g. GSS_Wrap() and GSS_Get_MIC(). If the extra round-trip option is in effect, it is derived as follows:
CRK = random-to-key(browserid-derive-key(XRTK, "CRK"))
Otherwise, the CMK is used:
CRK = random-to-key(browserid-derive-key(CMK, “CRK”))
The random-to-key function is defined in [RFC3961].
The Authenticator Root Key (ARK) is used to sign assertions used for fast re-authentication. (The term “authenticator” is equivalent to “re-authentication assertion” and exists for historical reasons.) It is derived as follows:
ARK = browserid-derive-key(CMK, "ARK")
The Authenticator Session Key (ASK) is used instead of the DHK for re-authenticated contexts. It is derived as follows:
ASK = browserid-derive-key(ARK, nonce-binary)
The usage (nonce-binary) is the base64 URL decoding of the initiator “nonce” claim.
The Extra Round Trip Key (XRTK) is used to sign the extra round trip token, and also as the master key for the CRK when the extra round trip option is used.
XRTK = browserid-derive-key(CMK, acceptor-jti-binary)
The usage (acceptor-jti-binary) is the base64 URL decoding of the acceptor “jti” claim.
The BrowserID mechanism shares the same Pseudo-Random Function (PRF) as the Kerberos GSS mechanism, defined in [RFC4402]. GSS_C_PRF_KEY_FULL and GSS_C_PRF_KEY_PARTIAL are equivalent. The protocol key to be used for GSS_Pseudo_random() SHALL by the Context Root Key (CRK).
Suppose a mail user agent for the principal lukeh@lukktone.com wishes to authenticate to an IMAP server rand.mit.de.padl.com. They do not have a re-authentication ticket. The mail user agent would display a dialog box in which the principal would sign in to their IdP and request a fresh assertion be generated.
C: <connects to IMAP port> S: * OK C: C1 CAPABILITY S: * CAPABILITY IMAP4rev1 SASL-IR SORT [...] AUTH=BROWSERID-AES128 S: C1 OK Capability Completed C: C2 AUTHENTICATE BROWSERID-AES128 biwsYyxleUpoYkdjaU9pSlNVekkxTmlKOS5leUp3ZFdKc2FXTXRhMlY 1SWpwN0ltRnNaMjl5YVhSb2JTSTZJa1JUSWl3aWVTSTZJak01TVRObE 9EZ3laRGhqTXpWa01qSm1ObVEwTURZNVkyVTJNREJrWW1OallqTTVOR 0ZqWVdGaFl6WTBPV1prTjJZNVptTmtObU0wTVRJME5tWTFOakk1TUdW bU1HTmpNemMwTnpaaE1EUmhOREU0WXpGbE9ETXhPV0kxTkdJeFpXTml ObVkyWTJWaE56VTBOR1kyWlRFMU5qTmxaR05sWkdNNU1EWmtOamcwTT JRd01XSmpaVFJtTjJFMVpqY3dOMk5tWVRZd1lXTTVNVE0yWm1GbU5qS m1aR0ZtTkRoa09HRTVPRGxoWVdGbE5EUXdOMlZrTmpjeU56ZGhNVGM0 TW1WallXRXhOVFppWkdOaFpXRXhOamRtTWpZek56STFaR1UyTTJWa09 HWXlPR0UyTUROaU5tWm1OVEV3WmpRNE1ESmtOelJrTjJWaFpUZGhZbU 15WldJaUxDSndJam9pWm1ZMk1EQTBPRE5rWWpaaFltWmpOV0kwTldWa FlqYzROVGswWWpNMU16TmtOVFV3WkRsbU1XSm1NbUU1T1RKaE4yRTRa R0ZoTm1Sak16Um1PREEwTldGa05HVTJaVEJqTkRJNVpETXpOR1ZsWld GaFpXWmtOMlV5TTJRME9ERXdZbVV3TUdVMFkyTXhORGt5WTJKaE16ST FZbUU0TVdabU1tUTFZVFZpTXpBMVlUaGtNVGRsWWpOaVpqUmhNRFpoT XpRNVpETTVNbVV3TUdRek1qazNORFJoTlRFM09UTTR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5ZDViY2NhZDRmMzg5YWYxZDdhNGJkMTM5OGJkMDcyZGZmYTg5NjIzMzM5N2 EifSwicHJpbmNpcGFsIjp7ImVtYWlsIjoibHVrZWhAbHVra3RvbmUuY29tI n0sImlhdCI6MTM2Mjk2MTA5NjEyMiwiZXhwIjoxMzYyOTY0Njk2MTIyLCJp c3MiOiJsb2dpbi5wZXJzb25hLm9yZyJ9.fOuyfVd5aYgo9rBgrgGT2Gb93Q J1VzKHOk67EQpDyOiPCOuqpyL9kkUT7qpcYifloCSZ9Oz5-UdkrWeq6WRDK qGNyx48WrTgnVJ2FS71MLn_CyhF0j5cVlCA9YhwaYVLxlmoXSMnY7rG1VkE Rv4mikB3qCpPv5rmHK0nCbFZb7WWGrdTGdrcGNDddyCBD9kWiQGUnI-zswY wberTNd76g5gcusS-mlcVNco3LLn32Salltx0BPp-U021zoGM0XHbnmRkeQ temnUWdihc4UmZMDBIgNgHQBJgW0hAq9GYQfc5NlSsenQ_Jy0dxjq5lwDZY wHLlQyfbuXlamE3CgvdeA~eyJhbGciOiJEUzEyOCJ9.eyJub25jZSI6Img1 UDRLckc4eW5nIiwiZWNkaCI6eyJ4IjoiZmpaTnBzQmpHbl9YQUNtZ2JOd0F zdnI4OGc0Rld6dG9icXA1VE1iX1lGMCIsImNydiI6IlAtMjU2IiwieSI6Il JLRXZKejU5Y3NhdjhLY3dlVXY1WHFGZ3Q4QVdDQWtySkJ6M1BQcUxKdHMif SwiY2J0IjoiYml3cyIsImV4cCI6MTM2Mjk2MTIxNjE0OSwiYXVkIjoidXJu OngtZ3NzOmltYXAvcmFuZC5taXQuZGUucGFkbC5jb20ifQ.udtoI3U5C-3p p4xIJZ1mk-Cz4bhlBLeK026Uamda28pLY8sMwNNtcA
The initial “n,,” is the GS2 header (indicating that there are no channel bindings). The “c,” denotes the token as being a BrowserID initial context token. The remaining base64 URL encoded data is a BrowserID backed assertion, containing the following certificate (for clarity, the payload has been reformatted and JWT header and signature omitted):
{ "public-key": { "algorithm": "DS", "y": "3913e882d8c35d22f6d4069ce600dbccb394acaaac649 fd7f9fcd6c41246f56290ef0cc37476a04a418c1e8319 b54b1ecb6f6cea7544f6e1563edcedc906d6843d01bce 4f7a5f707cfa60ac9136faf62fdaf48d8a989aaae4407 ed67277a1782ecaa156bdcaea167f263725de63ed8f28 a603b6ff510f4802d74d7eae7abc2eb", "p": "ff600483db6abfc5b45eab78594b3533d550d9f1bf2a9 92a7a8daa6dc34f8045ad4e6e0c429d334eeeaaefd7e2 3d4810be00e4cc1492cba325ba81ff2d5a5b305a8d17e b3bf4a06a349d392e00d329744a5179380344e82a18c4 7933438f891e22aeef812d69c8f75e326cb70ea000c3f 776dfdbd604638c2ef717fc26d02e17", "q": "e21e04f911d1ed7991008ecaab3bf775984309c3", "g": "c52a4a0ff3b7e61fdf1867ce84138369a6154f4afa929 66e3c827e25cfa6cf508b90e5de419e1337e07a2e9e2a 3cd5dea704d175f8ebf6af397d69e110b96afb17c7a03 259329e4829b0d03bbc7896b15b4ade53e130858cc34d 96269aa89041f409136c7242a38895c9d5bccad4f389a f1d7a4bd1398bd072dffa896233397a" }, "principal": { "email": "lukeh@lukktone.com" }, "iat": 1362961096122, "exp": 1362964696122, "iss": "login.persona.org" }
and assertion:
{ "nonce": "h5P4KrG8yng", "ecdh": { "x": "fjZNpsBjGn_XACmgbNwAsvr88g4FWztobqp5TMb_YF0", "crv": "P-256", "y": "RKEvJz59csav8KcweUv5XqFgt8AWCAkrJBz3PPqLJts" }, "cb": "biws", "exp": 1362961216149, "aud": "urn:x-gss:imap/rand.mit.de.padl.com" }
Note the channel binding token that protects the GS2 header.
Turning to the response backed assertion sent from the IMAP server to the mail user agent, we have the following after base64 decoding:
eyJhbGciOiJSUzI1NiIsIng1YyI6WyJNSUlEempDQ0FyYWdBd0lCQWdJQkJ 6QU5CZ2txaGtpRzl3MEJBUVVGQURCZE1Rc3dDUVlEVlFRR0V3SkJWVEVlTU J3R0ExVUVDZ3dWVUVGRVRDQlRiMlowZDJ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udn i1jNnE-29v_sSTNtq-C0Bch5C0Owkl71BNxxx3hUqxG1OL4Pt2gBJYAP_sN VMvh1pX9aG7tVk4Kk1KccitjPWF7GWsrFzWxzDR0u6DFtFachCObefrfgfE 19qeZrKrzI0UdCrDPzYk9XoWJGkpFSOwWac_vCCuuv5V3Gd_LNSI3rBi-Fa ehYHAF1IQ
Here we show the JWT header for the response assertion, as it includes an ASN.1 encoded X.509 certificate, which is used to mutually authenticate the IMAP server to the UA:
{ "alg": "RS256", "x5c": [ "MIIDzjCCAragAwIBAgIBBzANBgkqhkiG9w0BAQUFADBdMQswCQ YDVQQGEwJBVTEeMBwGA1UECgwVUEFETCBTb2Z0d2FyZSBQdHkg THRkMS4wLAYDVQQDDCVQQURMIFNvZnR3YXJlIENlcnRpZmljYX Rpb24gQXV0aG9yaXR5MB4XDTEzMDExMTA1MzQyMFoXDTE2MDEx MTA1MzQyMFowTDELMAkGA1UEBhMCQVUxHjAcBgNVBAoMFVBBRE wgU29mdHdhcmUgUHR5IEx0ZDEdMBsGA1UEAwwUcmFuZC5taXQu ZGUucGFkbC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwgg EKAoIBAQDBhzFpfL6vHxsx2DvFZP+GR0UomDp/CEe+OHN0Z0c6 91Yg9gWXmU3nPqVTbAIqXH8AUtvf7MzbY28oVlpZT05zm2c/tE 3gkhTxmXORgQrcuugujOXMFhI4svEZ+CbHPlZiZ/TzkXLHP29E z7wNZn1H57ALqmSAo5T4qxMFgBYudw/ZxPRzDtUoIV0s23Yg4x T9awJnr1GgMURibUBjF7ybcm0K8sJT+UGeB7rmLlPw+fAkOf7Z jZ9tpTkEMi8uLEMqcxaGSAK/+kW75qOxdAFI8zYZX53gpg4mi+ QWfGY1ZNQJMuHGQXg/ufxMzaxNN4h1aOlmZZYkBHp52A9yIMUb AgMBAAGjgakwgaYwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHx YdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O BBYEFKSsubEDubRIGHCBttAlTv2FWGf+MB8GA1UdIwQYMBaAFL izZlMWnKK1PYagdJjkVuRhEQJjMAkGA1UdEQQCMAAwCwYDVR0P BAQDAgXgMBMGA1UdJQQMMAoGCCsGAQUFBwMDMA0GCSqGSIb3DQ EBBQUAA4IBAQBD1BzQP+rN1UUz7A6z+KDPaq8s2iBG0FzZxsX2 QUOupBEIbuZp0KJaujVMg01fdjsuGG0uXbMfeRGyNlUsMN+ZDy 8/MIOh1aUGv0SUwKtCtLtWrJv65uwHGGt5uFKxME61VT4+qpI2 AGqxx5drsxELBOdyPneuAiLPxFubRFmzuhVSI7APMl79Ok30oW udA49lUX9wz3g9q9vdl9yhgeeUSUpMhlZ24Uc9PuLzr15j6v63 XzrSdWtNzv0F10eDl4yTUNWSJh7qBhgq1IoX9APOOuLbMNrp6b eEeowh34pVWfTaSxI7nK57kK2xhRU43ewYj2i/Srz8GsMS91ur 25It"] }
The assertion payload is below (again, for clarity the actual JWT signature has been omitted):
{ "tkt": { "jti": "aeay0GJizDx79Ag--WL-vw6Y9BXxRuC1XsZxry51SUI", "exp": 1362997098000 }, "ecdh": { "x": "J1IWbH2A5C3chOUIqmfXpP_RQEEOmd2ExXoKrqQQXLM", "y": "_2Etxbz_vJeeUUby2rfdekTTPURpbGJH7kyIWqmkIEg" }, "nonce": "h5P4KrG8yng", "exp": 1362964696000 }
Note the fast re-authentication ticket and the nonce echoed back from the initiator.
This document defines a GSS-API security mechanism, and therefore deals in security and has security considerations text embedded throughout. This section only addresses security considerations associated with the BrowserID GSS mechanism described in this document. It does not address security considerations associated with the BrowserID protocol or the GSS-API themselves.
This mechanism provides for authentication of initiator principals using private keys to public key crypto-systems, using the BrowserID specification for user certificates (which are NOT PKIX [RFC5280] certificates). Authentication of the acceptor principal is optional. Fast re-authentication is supported via acceptor-issued fast re-authentication tickets.
All cryptography for per-message tokens is imported from the Kerberos GSS-API mechanism [RFC4121].
This mechanism actually has several mechanism OIDs, composed of a prefix identifying this family of mechanisms followed by an arc identifying the [RFC3961] encryption type for use with per-message tokens and the GSS_Pseudo_random() function. The NULL encryption type is supported, and when it is used then the GSS-API per-message tokens and GSS_Pseudo_random() function are not available, but channel binding and mutual authentication may be available. Also, when using the NULL encryption type the fast re-authentication feature is not available because key exchange is only performed the initiator application uses the variant of this mechanism that supports per-message tokens and the GSS_Pseudo_random() function.
Acceptor credentials are PKIX [RFC5280] certificates and their private keys.
Allowing a match on only the DNS subjectAltName in an acceptor's X.509 certificate permits different services on the same host to impersonate each other. This should be subject to local policy.
Returning rich error information in the clear (see Section 6.3.2) may leak information. Implementations may squash status codes and/or avoid returning minor statuses entirely. Indeed, applications may even not send back error tokens at all, instead closing the connection or whatever might be appropriate for the application. (This is a generic GSS-API security consideration.)
This specification creates a number of IANA registries.
Prefix: iso.org.dod.internet.private.enterprise.padl.gssBrowserID (1.3.6.1.4.1.5322.24)
Decimal | Name | Description |
---|---|---|
0 | Reserved | Reserved |
1 | mechanisms | A sub-arc containing BrowserID mechanisms |
2 | nametypes | A sub-arc containing BrowserID name types |
Prefix: iso.org.dod.internet.private.enterprise.padl.gssBrowserID.mechanisms (1.3.6.1.4.1.5322.24.1)
Decimal | Name | Description | ECDH curve | Symmetric hash |
---|---|---|---|---|
0 | gss-browserid-null | The NULL security mechanism | N/A | N/A |
17 | gss-browserid-aes128 | The aes128-cts-hmac-sha1-96 mechanism | P-256 | HS256 |
18 | gss-browserid-aes256 | The aes256-cts-hmac-sha1-96 mechanism | P-521 | HS256 |
Prefix: iso.org.dod.internet.private.enterprise.padl.gssBrowserID.nametypes (1.3.6.1.4.1.5322.24.2)
Decimal | Name | Description |
---|---|---|
0 | Reserved | Reserved |
1 | GSS_C_NT_BROWSERID_PRINCIPAL | 3.1.1 |
Subject: Registration of SASL mechanisms BROWSERID-AES128 and BROWSERID-AES128-PLUS
SASL mechanism names: BROWSERID-AES128 and BROWSERID-AES128-PLUS
Security considerations: See RFC 5801 and draft-howard-gss-browserid
Published specification (recommended): draft-howard-gss-browserid
Person & email address to contact for further information:
Luke Howard lukeh@padl.com
Intended usage: common
Owner/Change controller: iesg@ietf.org
Note: This mechanism describes the GSS BrowserID mechanism used with the aes128-cts-hmac-sha1-96 encryption type. The GSS-API OID for this mechanism is 1.3.6.1.4.1.5322.24.1.17. As described in RFC 5801 a PLUS variant of this mechanism is also required.
[RFC4120] | Neuman, C., Yu, T., Hartman, S. and K. Raeburn, "The Kerberos Network Authentication Service (V5)", RFC 4120, July 2005. |