draft-ietf-sipcore-sip-token-authnz-08.txt   draft-ietf-sipcore-sip-token-authnz-09.txt 
SIP Core R. Shekh-Yusef SIP Core R. Shekh-Yusef
Internet-Draft Avaya Internet-Draft Avaya
Updates: 3261 (if approved) C. Holmberg Updates: 3261 (if approved) C. Holmberg
Intended status: Standards Track Ericsson Intended status: Standards Track Ericsson
Expires: 21 August 2020 V. Pascual Expires: 8 September 2020 V. Pascual
webrtchacks webrtchacks
18 February 2020 7 March 2020
Third-Party Token-based Authentication and Authorization for Session Third-Party Token-based Authentication and Authorization for Session
Initiation Protocol (SIP) Initiation Protocol (SIP)
draft-ietf-sipcore-sip-token-authnz-08 draft-ietf-sipcore-sip-token-authnz-09
Abstract Abstract
This document defines a SIP mechanism that relies on the OAuth 2.0 This document defines the "Bearer" authentication scheme for the
and OpenID Connect Core 1.0 to enable delegation of the user Session Initiation Protocol (SIP), and a mechanism by which user
authentication and SIP registration authorization to a third-party. authentication and SIP registration authorization is delegated to a
The document updates RFC 3261. third party, using the OAuth 2.0 framework and OpenID Connect Core
1.0. This document updates RFC 3261 to provide guidance on how a SIP
User Agent Client (UAC) responds to a SIP 401/407 response that
contains multiple WWW-Authenticate/Proxy-Authenticate header fields.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on 21 August 2020. This Internet-Draft will expire on 8 September 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents (https://trustee.ietf.org/ Provisions Relating to IETF Documents (https://trustee.ietf.org/
license-info) in effect on the date of publication of this document. license-info) in effect on the date of publication of this document.
Please review these documents carefully, as they describe your rights Please review these documents carefully, as they describe your rights
and restrictions with respect to this document. Code Components and restrictions with respect to this document. Code Components
extracted from this document must include Simplified BSD License text extracted from this document must include Simplified BSD License text
as described in Section 4.e of the Trust Legal Provisions and are as described in Section 4.e of the Trust Legal Provisions and are
provided without warranty as described in the Simplified BSD License. provided without warranty as described in the Simplified BSD License.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.2. SIP User Agent Types . . . . . . . . . . . . . . . . . . 3 1.2. SIP User Agent Types . . . . . . . . . . . . . . . . . . 3
2. SIP Procedures . . . . . . . . . . . . . . . . . . . . . . . 4 1.3. Token Types . . . . . . . . . . . . . . . . . . . . . . . 3
2.1. UAC Behavior . . . . . . . . . . . . . . . . . . . . . . 4 1.4. Example Flows . . . . . . . . . . . . . . . . . . . . . . 4
2.1.1. Obtaining Tokens . . . . . . . . . . . . . . . . . . 4 1.4.1. Registration . . . . . . . . . . . . . . . . . . . . 4
2.1.2. Protecting the Access Token . . . . . . . . . . . . . 5 1.4.2. Registration with Preconfigured AS . . . . . . . . . 5
2.1.3. REGISTER Request . . . . . . . . . . . . . . . . . . 5 2. SIP Procedures . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.4. Non-REGISTER Request . . . . . . . . . . . . . . . . 5 2.1. UAC Behavior . . . . . . . . . . . . . . . . . . . . . . 7
2.2. UAS and Registrar Behavior . . . . . . . . . . . . . . . 6 2.1.1. Obtaining Tokens and Responding to Challenges . . . . 7
2.3. Proxy Behavior . . . . . . . . . . . . . . . . . . . . . 6 2.1.2. Protecting the Access Token . . . . . . . . . . . . . 8
3. Access Token Claims . . . . . . . . . . . . . . . . . . . . . 7 2.1.3. REGISTER Request . . . . . . . . . . . . . . . . . . 8
4. WWW-Authenticate Response Header Field . . . . . . . . . . . 7 2.1.4. Non-REGISTER Request . . . . . . . . . . . . . . . . 8
5. Example Flows . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2. UAS and Registrar Behavior . . . . . . . . . . . . . . . 9
5.1. Registration . . . . . . . . . . . . . . . . . . . . . . 8 2.3. Proxy Behavior . . . . . . . . . . . . . . . . . . . . . 9
5.2. Registration with Pre-Configured AS . . . . . . . . . . . 10 3. Access Token Claims . . . . . . . . . . . . . . . . . . . . . 10
6. Security Considerations . . . . . . . . . . . . . . . . . . . 11 4. WWW-Authenticate Response Header Field . . . . . . . . . . . 10
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 5. Security Considerations . . . . . . . . . . . . . . . . . . . 11
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 11 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
9. Normative References . . . . . . . . . . . . . . . . . . . . 12 7. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 11
8. Normative References . . . . . . . . . . . . . . . . . . . . 12
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction 1. Introduction
The Session Initiation Protocol (SIP) [RFC3261] uses the framework The Session Initiation Protocol (SIP) [RFC3261] uses the same
used by HTTP [RFC7230] for authenticating users, which is a simple framework as HTTP [RFC7230] to authenticate users: a simple
challenge-response authentication mechanism that allows a server to challenge-response authentication mechanism that allows a SIP server
challenge a client request and allows a client to provide to challenge a SIP client request and allows a SIP client to provide
authentication information in response to that challenge. authentication information in response to that challenge.
OAuth 2.0 [RFC6749] defines a token based authorization framework to OAuth 2.0 [RFC6749] defines a token-based authorization framework to
allow clients to access resources on behalf of their user. allow an OAuth client to access resources on behalf of its user.
The OpenID Connect 1.0 [OPENID] specifications defines a simple The OpenID Connect 1.0 specification [OPENID] defines a simple
identity layer on top of the OAuth 2.0 protocol, which enables identity layer on top of the OAuth 2.0 protocol, which enables
clients to verify the identity of the user based on the clients to verify the identity of the user based on the
authentication performed by a dedicated authorization server, as well authentication performed by a dedicated authorization server, as well
as to obtain basic profile information about the user. as to obtain basic profile information about the user.
This document updates [RFC3261], by defining the UAC procedures if it This document defines the "Bearer" authentication scheme for the
receives a 401/407 response with multiple WWW-Authenticate/Proxy- Session Initiation Protocol (SIP), and a mechanism by which user
Authenticate header fields, providing challenges using different authentication and SIP registration authorization is delegated to a
authentication schemes for the same realm. third party, using the OAuth 2.0 framework and OpenID Connect Core
1.0. This kind of user authentication enables the single-sign-on
feature, which allows the user to authenticate once and gain access
to both SIP and non-SIP services.
This document defines an mechanism for SIP, that relies on the OAuth This document also updates [RFC3261], by defining the User Agent
2.0 and OpenID Connect Core 1.0 specifications, to enable the Client (UAC) procedures when a UAC receives a 401/407 response with
delegation of the user authentication and SIP registration multiple WWW-Authenticate/Proxy-Authenticate header fields, providing
authorization to a dedicated third-party entity that is separate from challenges using different authentication schemes for the same realm.
the SIP network elements that provide the SIP service.
1.1. Terminology 1.1. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in BCP 14 [RFC2119]
[RFC8174] when, and only when, they appear in all capitals, as shown
here.
1.2. SIP User Agent Types 1.2. SIP User Agent Types
[RFC6749] defines two types of clients, confidential and public, that The OAuth 2.0 authorization framework [RFC6749] defines two types of
apply to the SIP User Agents. clients, confidential and public, that apply to the SIP UACs.
* Confidential User Agent: is a SIP UA that is capable of * Confidential User Agent: a SIP UAC that is capable of maintaining
maintaining the confidentiality of the user credentials and any the confidentiality of the user credentials and any tokens
tokens obtained using these user credentials. obtained using these user credentials.
* Public User Agent: is a SIP UA that is incapable of maintaining * Public User Agent: a SIP UAC that is incapable of maintaining the
the confidentiality of the user credentials and any obtained confidentiality of the user credentials and any obtained tokens.
tokens.
The mechanism defined in this document MUST only be used with The mechanism defined in this document MUST only be used with
Confidential User Agents, as the UA is expected to obtain and Confidential User Agents, as the UAC is expected to obtain and
maintain tokens to be able to access the SIP network. maintain tokens to be able to access the SIP network.
1.3. Token Types
There are two types of tokens that might be used with this
specification:
* Structured Token: a token that consists of a structured object
that contains the claims associated with the token, e.g. JWT as
defined in [RFC7519].
* Reference Token: a token that consists of a random string that is
used to obtain the details of the token and its associated claims,
as defined in [RFC6749].
1.4. Example Flows
1.4.1. Registration
Figure 1 below shows an example of a SIP registration, where the
registrar informs the UAC about the authorization server from which
the UAC can obtain an access token in a 401 response to the REGISTER
request.
UAC Registrar AS
---------------------------------------------------------------------
| | |
| [1] REGISTER | |
|------------------------------>| |
| | |
| [2] 401 Unauthorized | |
| WWW-Authenticate: Bearer "authz_server"="<authz_server>" |
|<------------------------------| |
| | |
| [3] The UAC interacts with the AS and obtains tokens, using |
| some out-of-scope mechanism. |
|<=============================================================>|
| | |
| [4] REGISTER | |
| Authorization: Bearer <access_token> |
|------------------------------>| |
| | [5] HTTP POST /introspect |
| | {access_token} |
| |------------------------------>|
| | |
| | [6] 200 OK {metadata} |
| |<------------------------------|
| | |
| [7] 200 OK | |
|<------------------------------| |
| | |
Figure 1: Example Registration Flow
In step [1], the UAC starts the registration process by sending a SIP
REGISTER request to the registrar without any credentials.
In step [2], the registrar challenges the UA, by sending a SIP 401
(Unauthorized) response to the REGISTER request. In the response,
the registrar includes information about the AS to contact in order
to obtain a token.
In step [3], the UAC interacts with the AS via an out-of-scope
mechanism, potentially using the OAuth Native App mechanism defined
in [RFC8252]. The AS authenticates the user and provides the UAC
with the tokens needed to access the SIP service.
In step [4], the UAC retries the registration process by sending a
new REGISTER request that includes the access token that the UAC
obtained previously.
The registrar validates the access token. If the access token is a
reference token, the registrar MAY perform an introspection
[RFC7662], as in steps [5] and [6], in order to obtain more
information about the access token and its scope, per [RFC7662].
Otherwise, after the registrar validates the token to make sure it
was signed by a trusted entity, it inspects its claims and acts upon
it.
In step [7], once the registrar has successfully verified and
accepted the access token, it sends a 200 (OK) response to the
REGISTER request.
1.4.2. Registration with Preconfigured AS
Figure 2 shows an example of a SIP registration where the UAC has
been preconfigured with information about the AS from which to obtain
the access token.
UAC Registrar AS
---------------------------------------------------------------------
| | |
| [1] The UAC interacts with the AS and obtains tokens, using |
| some out of scope mechanism. |
|<=============================================================>|
| | |
| [2] REGISTER | |
| Authorization: Bearer <access_token> |
|------------------------------>| |
| | [3] HTTP POST /introspect |
| | {access_token} |
| |------------------------------>|
| | |
| | [4] 200 OK {metadata} |
| |<------------------------------|
| | |
| [5] 200 OK | |
|<------------------------------| |
| | |
Figure 2: Example Registration Flow - Authorization Server
Information Preconfigured
In step [1], the UAC interacts with the AS using an out-of-scope
mechanism, potentially using the OAuth Native App mechanism defined
in [RFC8252]. The AS authenticates the user and provides the UAC
with the tokens needed to access the SIP service.
In step [2], the UAC retries the registration process by sending a
new REGISTER request that includes the access token that the UAC
obtained previously.
The registrar validates the access token. If the access token is a
reference token, the registrar MAY perform an introspection, as in
steps [3] and [4], in order to obtain more information about the
access token and its scope, per [RFC7662]. Otherwise, after the
registrar validates the token to make sure it was signed by a trusted
entity, it inspects its claims and acts upon it.
In step [5], once the registrar has successfully verified and
accepted the access token, it sends a 200 (OK) response to the
REGISTER request.
2. SIP Procedures 2. SIP Procedures
Section 22 of [RFC3261] defines the SIP procedures for the Digest Section 22 of [RFC3261] defines the SIP procedures for the Digest
authentication mechanism procedures. The same procedures apply to authentication mechanism. The same procedures apply to the Bearer
the Bearer authentication mechanism, with the changes described in authentication mechanism, with the changes described in this section.
this section.
2.1. UAC Behavior 2.1. UAC Behavior
2.1.1. Obtaining Tokens 2.1.1. Obtaining Tokens and Responding to Challenges
When a UAC sends a request without credentials (or with credentials When a UAC sends a request without credentials (or with invalid
that are no longer valid), and receives a 401 (Unauthorized) or a 407 credentials), it could receive either a 401 (Unauthorized) response
(Proxy Authentication Required) response that contains a WWW- with a WWW-Authenticate header field or a 407 (Proxy Authentication
Authenticate header field (in case of a 401 response) or a Proxy- Required) response with a Proxy-Authenticate header field. If the
Authenticate header field (in case of a 407 response) that indicates WWW-Authenticate or Proxy-Authenticate header field indicates
"Bearer" scheme authentication and contains an address to an "Bearer" scheme authentication and contains an address to an
Authorization Server, the UAC contacts the Authorization Server in authorization server, the UAC contacts the authorization server in
order to obtain tokens, and includes the requested scopes, based on a order to obtain tokens, and includes the requested scopes, based on a
local configuration. local configuration (Figure 1).
The tokens returned to the UA depend on the type of AS: with an OAuth
AS, the tokens provided are the access token and refresh token. The
access token will be sent to the SIP servers to authorize UAC's
access to the service. The refresh token will only be used with the
AS to get new access token and refresh token, before the expiry of
the current access token. With an OpenID Connect server, an
additional ID-Token is returned, which contains the SIP URI and other
user specific details, and will be consumed by the UAC.
The detailed OAuth2 procedure to authenticate the user and obtain The detailed OAuth2 procedure to authenticate the user and obtain
these tokens is out of scope of this document. [RFC8252] defines these tokens is out of scope of this document. The address of the
procedures for native applications. When using the mechanism defined authorization server might already be known to the UAC via
in [RFC8252] the user will be directed to use a browser for the configuration. In which case, the UAC can contact the authorization
interaction with the authorization server, allowing the authorization server for tokens before it sends a SIP request (Figure 2).
server to prompt the user for multi-factor authentication, redirect Procedures for native applications are defined in [RFC8252]. When
the user to third-party identity providers, and the use of single- using the mechanism defined in [RFC8252] the user of the UAC will be
sign-on sessions. directed to interact with the authorization server using a web
browser, allowing the authorization server to prompt the user for
multi-factor authentication, to redirect the user to third-party
identity providers, and to enable the use of single-sign-on sessions.
The tokens returned to the UAC depend on the type of authorization
server (AS): an OAuth AS provides an access token and refresh token
[RFC6749]. The UAC provides the access token to the SIP servers to
authorize UAC's access to the service. The UAC uses the refresh
token only with the AS to get a new access token and refresh token
before the expiry of the current access token (see [RFC6749], section
1.5 Refresh Token for details). An OpenID Connect server returns an
additional ID-Token containing the SIP URI and other user-specific
details that will be consumed by the UAC.
If the UAC receives a 401/407 response with multiple WWW- If the UAC receives a 401/407 response with multiple WWW-
Authenticate/Proxy-Authenticate header fields, providing challenges Authenticate/Proxy-Authenticate header fields, providing challenges
using different authentication schemes for the same realm, the UAC using different authentication schemes for the same realm, the UAC
provides credentials for one or more of the schemes that it supports, provides credentials for one or more of the schemes that it supports,
based on local policy. based on local policy.
NOTE: The address of the Authorization Server might be known to the NOTE: The address of the Authorization Server might be known to the
UAC e.g., using means of configuration, in which case the UAC can UAC e.g., using means of configuration, in which case the UAC can
contact the Authorization Server in order to obtain the access token contact the Authorization Server in order to obtain the access token
before it sends SIP request without credentials. before it sends SIP request without credentials.
2.1.2. Protecting the Access Token 2.1.2. Protecting the Access Token
[RFC6749] mandates that Access Tokens are protected with TLS when in [RFC6749] mandates that access tokens are protected with TLS when in
transit. However, TLS only guarantees hop-to-hop protection when transit. However, TLS only guarantees hop-to-hop protection when
used to protect SIP signaling. Therefore the Access Token MUST be used to protect SIP signaling. Therefore the access token MUST be
protected in a way so that only authorized SIP servers will have protected in a way so that only authorized SIP servers will have
access to it. Endpoints that support this specification MUST support access to it. Endpoints that support this specification MUST support
encrypted JSON Web Tokens (JWT) [RFC7519] for encoding and protecting encrypted JSON Web Tokens (JWT) [RFC7519] for encoding and protecting
Access Token when included in SIP requests, unless some other access tokens when they are included in SIP requests, unless some
mechanism is used to guarantee that only authorized SIP endpoints other mechanism is used to guarantee that only authorized SIP
have access to the Access Token. endpoints have access to the access token.
2.1.3. REGISTER Request 2.1.3. REGISTER Request
The procedures in this section assumes that the UAC has obtained a The procedures in this section apply when the UAC has received a
token as specified in section Section 2.1.1 challenge that contains a "Bearer" scheme, and the UAC has obtained a
token as specified in Section 2.1.1.
When the UAC sends a REGISTER request after it received a challenge The UAC sends a REGISTER request with an Authorization header field
containing the Bearer scheme, then to resolve that particular containing the response to the challenge, including the Bearer scheme
challenge it needs to send a request with an Authorization header carrying a valid access token in the request, as specified in
field containing the response to that challenge, including the Bearer
scheme carrying a valid access token in the request, as specified in
[RFC6750]. [RFC6750].
Note that if there were multiple challenges with different schemes Note that, if there were multiple challenges with different schemes,
then it maybe able to successfully retry the request using non-Bearer then the UAC may be able to successfully retry the request using non-
credentials. Bearer credentials.
Based on local policy, the UAC MAY include an access token that has Based on local policy, the UAC MAY include an access token that has
been used for another binding associated with the same AOR in the been used for another binding associated with the same AOR in the
request. request.
If the access token included in a REGISTER request is not accepted, If the access token included in a REGISTER request is not accepted,
and the UAC receives a 401 response or a 407 response, the UAC and the UAC receives a 401 response or a 407 response, the UAC
follows the procedures in Section 2.1.1. follows the procedures in Section 2.1.1.
2.1.4. Non-REGISTER Request 2.1.4. Non-REGISTER Request
The procedures in this section assumes that the UAC has obtained a The procedures in this section apply when the UAC has received a
token as specified in section Section 2.1.1 challenge that contains a "Bearer" scheme, and the UAC has obtained a
When a UAC sends a request, after it received a challenge containing token as specified in Section 2.1.1.
the Bearer scheme, then the UAC MUST include an Authorization header
When the UAC sends a request, it MUST include an Authorization header
field with a Bearer scheme, carrying a valid access token in the field with a Bearer scheme, carrying a valid access token in the
request, as specified in [RFC6750]. Based on local policy, the UAC request, as specified in [RFC6750]. Based on local policy, the UAC
MAY include an access token that has been used for another dialog, or MAY include an access token that has been used for another dialog, or
for another stand-alone request, if the target of the new request is for another stand-alone request, if the target of the new request is
the same. the same.
If the access token included in a request is not accepted, and the If the access token included in a request is not accepted, and the
UAC receives a 401 response or a 407 response, the UAC follows the UAC receives a 401 response or a 407 response, the UAC follows the
procedures in Section 2.1.1. procedures in Section 2.1.1.
2.2. UAS and Registrar Behavior 2.2. UAS and Registrar Behavior
When a UAS or Registrar receives a request that fails to contain When a UAS or Registrar receives a request that fails to contain
authorization credentials acceptable to it, it SHOULD challenge the authorization credentials acceptable to it, it SHOULD challenge the
request by sending a 401 (Unauthorized) response. To indicate that request by sending a 401 (Unauthorized) response. To indicate that
it is willing to accept an OAuth2 token as a credential the UAS/ it is willing to accept an access token as a credential, the UAS/
Registrar MUST include a Proxy-Authentication header field in the Registrar MUST include a Proxy-Authentication header field in the
response, indicate "Bearer" scheme and include an address of an response that indicates "Bearer" scheme and includes an address of an
Authorization Server from which the originator can obtain an access authorization server from which the originator can obtain an access
token. token.
When a UAS/Registrar receives a SIP request that contains an When a UAS/Registrar receives a SIP request that contains an
Authorization header field with an access token, the UAS/Registrar Authorization header field with an access token, the UAS/Registrar
MUST validate the access token, using the procedures associated with MUST validate the access token, using the procedures associated with
the type of access token used, e.g. [RFC7519]. If the validation is the type of access token used, e.g. [RFC7519]. If the token
successful the UAS/Registrar can continue to process the request provided is an expired access token, then the UAS MUST reply with 401
using normal SIP procedures. If the validation fails, the UAS/ Unauthorized, as defined in section 3 of [RFC6750]. If the
Registrar MUST reject the request. validation is successful, the UAS/Registrar can continue to process
the request using normal SIP procedures. If the validation fails,
the UAS/Registrar MUST reject the request.
2.3. Proxy Behavior 2.3. Proxy Behavior
When a proxy receives a request that fails to contain authorization When a proxy receives a request that fails to contain authorization
credentials acceptable to it, it SHOULD challenge the request by credentials acceptable to it, it SHOULD challenge the request by
sending a 407 (Proxy Authentication Required) response. To indicate sending a 407 (Proxy Authentication Required) response. To indicate
that it is willing to accept an OAuth2 token as a credential the that it is willing to accept an access token as a credential, the
proxy MUST include a Proxy-Authentication header field in the proxy MUST include a Proxy-Authentication header field in the
response, indicating "Bearer" scheme and including an address to an response that indicates "Bearer" scheme and includes an address to an
Authorization Server from which the originator can obtain an access authorization server from which the originator can obtain an access
token. token.
When a proxy wishes to authenticate a received request, it MUST When a proxy wishes to authenticate a received request, it MUST
search the request for Proxy-Authorization header fields with 'realm' search the request for Proxy-Authorization header fields with 'realm'
parameters that match its realm. It then MUST successfully validate parameters that match its realm. It then MUST successfully validate
the credentials from at least one Proxy-Authorization header field the credentials from at least one Proxy-Authorization header field
for its realm. When the scheme is Bearer the proxy MUST validate the for its realm. When the scheme is "Bearer", the proxy MUST validate
access token, using the procedures associated with the type of access the access token, using the procedures associated with the type of
token used, e.g. [RFC7519]. access token used, e.g., [RFC7519].
3. Access Token Claims 3. Access Token Claims
The type of services that an access token grants access to can be The type of services to which an access token grants access can be
determined using different methods. Which methods are used and the determined using different methods. The methods used and the access
granted access provided by the token is based on local policy agreed provided by the token is based on local policy agreed between the AS
between the AS and the registrar. and the registrar.
If an access token is encoded as a JWT, it might contain a list of If an access token is encoded as a JWT, it might contain a list of
claims [RFC7519], some registered and some are application specific claims [RFC7519], some registered and some application-specific. The
claims. The REGISTRAR can grant access to services either based on REGISTRAR can grant access to services based on such claims, some
such claims, using some other mechanism, or a combination of claims other mechanism, or a combination of claims and some other mechanism.
and some other mechanism. If an access token is a reference token, If an access token is a reference token, the REGISTRAR will grant
the REGISTRAR will grant access based on some other mechanism. access based on some other mechanism. Examples of such other
Examples of such other mechanisms are introspection [RFC7662], user mechanisms are introspection [RFC7662], user profile lookups, etc.
profile lookups, etc.
4. WWW-Authenticate Response Header Field 4. WWW-Authenticate Response Header Field
This section describes the syntax of the WWW-Authenticate Response This section uses ABNF [RFC5234] to describe the syntax of the WWW-
Header Field when used with the Bearer scheme to challenge the UA for Authenticate header field when used with the "Bearer" scheme to
credentials, by extending the 'challnge' header field defined by challenge the UAC for credentials, by extending the 'challenge'
[RFC3261]. parameter defined by [RFC3261].
challenge =/ ("Bearer" LWS bearer-cln *(COMMA bearer-cln)) challenge =/ ("Bearer" LWS bearer-cln *(COMMA bearer-cln))
bearer-cln = realm / scope / authz-server / error / bearer-cln = realm / scope / authz-server / error /
auth-param auth-param
authz-server = "authz_server" EQUAL authz-server-value authz-server = "authz_server" EQUAL authz-server-value
authz-server-value = https-URI authz-server-value = https-URI
realm = <defined in RFC3261> realm = <defined in RFC3261>
auth-param = <defined in RFC3261> auth-param = <defined in RFC3261>
scope = <defined in RFC6749> scope = <defined in RFC6749>
error = <defined in RFC6749> error = <defined in RFC6749>
https-URI = <defined in RFC7230> https-URI = <defined in RFC7230>
Figure 1: Bearer Scheme Syntax Figure 3: Bearer Scheme Syntax
The authz-server parameters contains the HTTPS URI, as defined in The authz-server parameter contains the HTTPS URI, as defined in
[RFC7230], of the authorization server. The UA can discover metadata [RFC7230], of the authorization server. The UAC can discover
about the AS using a mechanism like the one defined in [RFC8414]. metadata about the AS using a mechanism like the one defined in
[RFC8414].
The realm and auth-param parameters are defined in [RFC3261]. The realm and auth-param parameters are defined in [RFC3261].
As per [RFC3261], the realm string alone defines the protection Per [RFC3261], the realm string alone defines the protection domain.
domain. [RFC3261] states that the realm string must be globally [RFC3261] states that the realm string must be globally unique and
unique and recommends that the realm string contains a hostname or recommends that the realm string contain a hostname or domain name.
domain name. It also states that the realm string should be human- It also states that the realm string should be a human-readable
readable identifier that can be rendered to the user. identifier that can be rendered to the user.
The scope and error parameters are defined in [RFC6749]. The scope and error parameters are defined in [RFC6749].
The scope parameter could be used by the registrar/proxy to indicate The scope parameter could be used by the registrar/proxy to indicate
to the UAC the minimum scope that must be associated with the access to the UAC the minimum scope that must be associated with the access
token to be able to get service. As defined in [RFC6749], the value token to be able to get service. As defined in [RFC6749], the value
of the scope parameter is expressed as a list of space-delimited, of the scope parameter is expressed as a list of space-delimited,
case-sensitive strings. The strings are defined by the authorization case-sensitive strings. The strings are defined by the authorization
server. The values of the scope parameter is out of scope of this server. The values of the scope parameter are out of scope of this
document. The UAC will use the scope provided by the registrar to document. The UAC will use the scope provided by the registrar to
contact the AS and obtain a proper token with the requested scope. contact the AS and obtain a proper token with the requested scope.
The error parameter could be used by the registrar/proxy to indicate The error parameter could be used by the registrar/proxy to indicate
to the UAC the reason for the error, with possible values of to the UAC the reason for the error, with possible values of
"invalid_token" or "invalid_scope". "invalid_token" or "invalid_scope".
5. Example Flows 5. Security Considerations
5.1. Registration
The figure below shows an example of a SIP registration, where the UA
is informed about the Authorization Server (AS) from where to obtain
an access token by the registratar in a 401 response to the REGISTER
request.
UA Registrar AS
---------------------------------------------------------------------
| | |
| [1] REGISTER | |
|------------------------------>| |
| | |
| [2] 401 Unauthorized | |
| WWW-Authenticate: Bearer "authz_server"="<authz_server>" |
|<------------------------------| |
| | |
| [3] The UA interacts with the AS and obtains tokens, using |
| some out of scope mechanism. |
|<=============================================================>|
| | |
| [4] REGISTER | |
| Authorization: Bearer <access_token> |
|------------------------------>| |
| | [5] HTTP POST /introspect |
| | {access_token} |
| |------------------------------>|
| | |
| | [6] 200 OK {metadata} |
| |<------------------------------|
| | |
| [7] 200 OK | |
|<------------------------------| |
| | |
Figure 2: Example Registration Flow
In step [1], the UA starts the registration process by sending a SIP
REGISTER request to the registrar without any credentials.
In step [2], the registrar challenges the UA, by sending a SIP 401
(Unauthorized) response to the REGISTER request. In the response the
registrar includes information about the AS to contact in order to
obtain a token.
In step [3], the UA interacts with the AS, potentially using the
OAuth Native App mechanism defined in [RFC8252], authenticates the
user and obtains the tokens needed to access the SIP service.
In step [4], the UA retries the registration process by sending a new
SIP REGISTER request that includes the access token that the UA
obtrained previously.
The registrar validates the access token. If the access token is a
reference token, the registrar MAY perform an introspection, as in
steps [5] and [6], in order to obtain more information about the
access token and its scope, as per [RFC7662]. Otherwise, after the
registrar validates the token to make sure it was signed by a trusted
entity, it inspects its claims and act upon it.
In step [7], once the registrar has succesfully verified and accepted
the access token, it sends a 200 (OK) response to the REGISTER
request.
5.2. Registration with Pre-Configured AS
The figure below shows an example of a SIP registration, where the UA
has pre-configured information about the Authorization Server (AS)
from where to obtain the access token.
UA Registrar AS
---------------------------------------------------------------------
| | |
| [1] The UA interacts with the AS and obtains tokens, using |
| some out of scope mechanism. |
|<=============================================================>|
| | |
| [2] REGISTER | |
| Authorization: Bearer <access_token> |
|------------------------------>| |
| | [3] HTTP POST /introspect |
| | {access_token} |
| |------------------------------>|
| | |
| | [4] 200 OK {metadata} |
| |<------------------------------|
| | |
| [5] 200 OK | |
|<------------------------------| |
| | |
Figure 3: Example Registration Flow - Authorization Server
Information Preconfigured
In step [1], the UA interacts with the AS, potentially using the
OAuth Native App mechanism defined in [RFC8252], authenticates the
user and obtains the tokens needed to access the SIP service.
In step [2], the UA retries the registration process by sending a new
SIP REGISTER request that includes the access token that the UA
obtrained previously.
The registrar validates the access token. If the access token is a
reference token, the registrar MAY perform an introspection, as in
steps [3] and [4], in order to obtain more information about the
access token and its scope, as per [RFC7662]. Otherwise, after the
registrar validates the token to make sure it was signed by a trusted
entity, it inspects its claims and act upon it.
In step [5], once the registrar has succesfully verified and accepted
the access token, it sends a 200 (OK) response to the REGISTER
request.
6. Security Considerations
The security considerations for OAuth are defined in [RFC6749]. The The security considerations for OAuth are defined in [RFC6749]. The
security considerations for bearer tokens are defined in [RFC6750]. security considerations for bearer tokens are defined in [RFC6750].
The security considerations for JSON Web Tokens (JWT) are defined in The security considerations for JSON Web Tokens (JWT) are defined in
[RFC7519]. These security considerations also apply to SIP usage of [RFC7519]. These security considerations also apply to SIP usage of
access token as defined in this document. access token as defined in this document.
[RFC6749] mandates that Access Tokens are protected with TLS. [RFC6749] mandates that access tokens are protected with TLS.
However, TLS only guarantees hop-to-hop protection when used to However, TLS only guarantees hop-to-hop protection when used to
protect SIP signaling. Therefore the Access Token MUST be protected protect SIP signaling. Therefore the access token MUST be protected
in a way so that only authorized SIP endpoints will have access to in a way so that only authorized SIP endpoints will have access to
it. Endpoints that support this specifications MUST support it. Endpoints that support this specification MUST support encrypted
encrypted JSON Web Tokens (JWT) [RFC7519] for encoding and protecting JSON Web Tokens (JWT) [RFC7519] for encoding and protecting access
Access Token when included in SIP requests, unless some other tokens when included in SIP requests, unless some other mechanism is
mechanism is used to guarantee that only authorized SIP endpoints used to guarantee that only authorized SIP endpoints have access to
have access to the Access Token. the access token.
7. IANA Considerations 6. IANA Considerations
8. Acknowledgments 7. Acknowledgments
The authors would like to specially thank Paul Kyzivat for his The authors would like to specially thank Paul Kyzivat for his
multiple detailed reviews and suggested text that significanly multiple detailed reviews and suggested text that significantly
improved the quality of the document. improved the quality of the document.
The authors would also like to thank the following for their review The authors would also like to thank the following for their review
and feedback on this document: and feedback on this document:
Olle Johansson, Roman Shpount, Dale Worley, and Jorgen Axell. Olle Johansson, Roman Shpount, Dale Worley, and Jorgen Axell.
The authors would also like to thank the following for their review The authors would also like to thank the following for their review
and feedback of the original document that was replaced with this and feedback of the original document that was replaced with this
document: document:
Andrew Allen, Martin Dolly, Keith Drage, Paul Kyzivat, Jon Peterson, Andrew Allen, Martin Dolly, Keith Drage, Paul Kyzivat, Jon Peterson,
Michael Procter, Roy Radhika, Matt Ryan, Ivo Sedlacek, Roman Shpount, Michael Procter, Roy Radhika, Matt Ryan, Ivo Sedlacek, Roman Shpount,
Robert Sparks, Asveren Tolga, and Dale Worley. Robert Sparks, Asveren Tolga, Dale Worley, and Yehoshua Gev.
The authors would also like to thank Jean Mahoney for her review, The authors would also like to specially thank Jean Mahoney for her
editorial help, and the coversion of the XML source file from v2 to multiple reviews, editorial help, and the coversion of the XML source
v3. file from v2 to v3.
9. Normative References 8. Normative References
[OPENID] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and [OPENID] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
C. Mortimore, "OpenID Connect Core 1.0", February 2014. C. Mortimore, "OpenID Connect Core 1.0", February 2014.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M., and E. A., Peterson, J., Sparks, R., Handley, M., and E.
Schooler, "SIP: Session Initiation Protocol", RFC 3261, Schooler, "SIP: Session Initiation Protocol", RFC 3261,
DOI 10.17487/RFC3261, June 2002, DOI 10.17487/RFC3261, June 2002,
<https://www.rfc-editor.org/info/rfc3261>. <https://www.rfc-editor.org/info/rfc3261>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008,
<https://www.rfc-editor.org/info/rfc5234>.
[RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework", [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
RFC 6749, DOI 10.17487/RFC6749, October 2012, RFC 6749, DOI 10.17487/RFC6749, October 2012,
<https://www.rfc-editor.org/info/rfc6749>. <https://www.rfc-editor.org/info/rfc6749>.
[RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization
Framework: Bearer Token Usage", RFC 6750, Framework: Bearer Token Usage", RFC 6750,
DOI 10.17487/RFC6750, October 2012, DOI 10.17487/RFC6750, October 2012,
<https://www.rfc-editor.org/info/rfc6750>. <https://www.rfc-editor.org/info/rfc6750>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
skipping to change at page 13, line 5 skipping to change at page 13, line 20
<https://www.rfc-editor.org/info/rfc7230>. <https://www.rfc-editor.org/info/rfc7230>.
[RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015, (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
<https://www.rfc-editor.org/info/rfc7519>. <https://www.rfc-editor.org/info/rfc7519>.
[RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection", [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection",
RFC 7662, DOI 10.17487/RFC7662, October 2015, RFC 7662, DOI 10.17487/RFC7662, October 2015,
<https://www.rfc-editor.org/info/rfc7662>. <https://www.rfc-editor.org/info/rfc7662>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps", [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps",
BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017, BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017,
<https://www.rfc-editor.org/info/rfc8252>. <https://www.rfc-editor.org/info/rfc8252>.
[RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0 [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0
Authorization Server Metadata", RFC 8414, Authorization Server Metadata", RFC 8414,
DOI 10.17487/RFC8414, June 2018, DOI 10.17487/RFC8414, June 2018,
<https://www.rfc-editor.org/info/rfc8414>. <https://www.rfc-editor.org/info/rfc8414>.
Authors' Addresses Authors' Addresses
 End of changes. 57 change blocks. 
278 lines changed or deleted 304 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/