<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="std" consensus="true" docName="draft-ietf-sipcore-sip-token-authnz-17" indexInclude="true" ipr="Trust200902" number="8898" prepTime="2020-09-10T11:10:10" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="3" tocInclude="true" updates="3261" xml:lang="en">
  <link href="https://datatracker.ietf.org/doc/draft-ietf-sipcore-sip-token-authnz-17" rel="prev"/>
  <link href="https://dx.doi.org/10.17487/rfc8898" rel="alternate"/>
  <link href="urn:issn:2070-1721" rel="alternate"/>
  <front>
    <title abbrev="3rd-Party Token-Based SIP Authentication">Third-Party Token-Based Authentication and Authorization for Session Initiation Protocol (SIP)</title>
    <seriesInfo name="RFC" value="8898" stream="IETF"/>
    <author initials="R." surname="Shekh-Yusef" fullname="Rifaat Shekh-Yusef">
      <organization showOnFrontPage="true">Auth0</organization>
      <address>
        <postal>
          <street/>
          <city>Ottawa</city>
          <region>Ontario</region>
          <country>Canada</country>
        </postal>
        <phone/>
        <email>rifaat.s.ietf@gmail.com</email>
      </address>
    </author>
    <author initials="C." surname="Holmberg" fullname="Christer Holmberg">
      <organization showOnFrontPage="true">Ericsson</organization>
      <address>
        <postal>
          <street>Hirsalantie 11</street>
          <city>Jorvas</city>
          <code>02420</code>
          <region/>
          <country>Finland</country>
        </postal>
        <email>christer.holmberg@ericsson.com</email>
      </address>
    </author>
    <author initials="V." surname="Pascual" fullname="Victor Pascual">
      <organization showOnFrontPage="true">Nokia</organization>
      <address>
        <postal>
          <street/>
          <city>Barcelona</city>
          <country>Spain</country>
        </postal>
        <email>victor.pascual_avila@nokia.com</email>
      </address>
    </author>
    <date month="09" year="2020"/>
    <area>RAI</area>
    <workgroup>SIP Core</workgroup>
    <keyword>SIP OAuth</keyword>
    <keyword>3rd party authentication</keyword>
    <keyword>Third party authentication</keyword>
    <abstract pn="section-abstract">
      <t indent="0" pn="section-abstract-1">
    This document defines the "Bearer" authentication scheme for
    the Session Initiation Protocol (SIP) and a mechanism by
    which user authentication and SIP registration authorization
    is delegated to a 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.        
      </t>
    </abstract>
    <boilerplate>
      <section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
        <name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
        <t indent="0" pn="section-boilerplate.1-1">
            This is an Internet Standards Track document.
        </t>
        <t indent="0" pn="section-boilerplate.1-2">
            This document is a product of the Internet Engineering Task Force
            (IETF).  It represents the consensus of the IETF community.  It has
            received public review and has been approved for publication by
            the Internet Engineering Steering Group (IESG).  Further
            information on Internet Standards is available in Section 2 of 
            RFC 7841.
        </t>
        <t indent="0" pn="section-boilerplate.1-3">
            Information about the current status of this document, any
            errata, and how to provide feedback on it may be obtained at
            <eref target="https://www.rfc-editor.org/info/rfc8898" brackets="none"/>.
        </t>
      </section>
      <section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
        <name slugifiedName="name-copyright-notice">Copyright Notice</name>
        <t indent="0" pn="section-boilerplate.2-1">
            Copyright (c) 2020 IETF Trust and the persons identified as the
            document authors. All rights reserved.
        </t>
        <t indent="0" pn="section-boilerplate.2-2">
            This document is subject to BCP 78 and the IETF Trust's Legal
            Provisions Relating to IETF Documents
            (<eref target="https://trustee.ietf.org/license-info" brackets="none"/>) 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.
        </t>
      </section>
    </boilerplate>
    <toc>
      <section anchor="toc" numbered="false" removeInRFC="false" toc="exclude" pn="section-toc.1">
        <name slugifiedName="name-table-of-contents">Table of Contents</name>
        <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1">
          <li pn="section-toc.1-1.1">
            <t indent="0" pn="section-toc.1-1.1.1"><xref derivedContent="1" format="counter" sectionFormat="of" target="section-1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-introduction">Introduction</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2">
              <li pn="section-toc.1-1.1.2.1">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.1.1"><xref derivedContent="1.1" format="counter" sectionFormat="of" target="section-1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-terminology">Terminology</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.2">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.2.1"><xref derivedContent="1.2" format="counter" sectionFormat="of" target="section-1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-applicability">Applicability</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.3">
                <t indent="0" keepWithNext="true" pn="section-toc.1-1.1.2.3.1"><xref derivedContent="1.3" format="counter" sectionFormat="of" target="section-1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-token-types-and-formats">Token Types and Formats</xref></t>
              </li>
              <li pn="section-toc.1-1.1.2.4">
                <t indent="0" pn="section-toc.1-1.1.2.4.1"><xref derivedContent="1.4" format="counter" sectionFormat="of" target="section-1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-example-flows">Example Flows</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.1.2.4.2">
                  <li pn="section-toc.1-1.1.2.4.2.1">
                    <t indent="0" pn="section-toc.1-1.1.2.4.2.1.1"><xref derivedContent="1.4.1" format="counter" sectionFormat="of" target="section-1.4.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration">Registration</xref></t>
                  </li>
                  <li pn="section-toc.1-1.1.2.4.2.2">
                    <t indent="0" pn="section-toc.1-1.1.2.4.2.2.1"><xref derivedContent="1.4.2" format="counter" sectionFormat="of" target="section-1.4.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-registration-with-preconfig">Registration with Preconfigured AS</xref></t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.2">
            <t indent="0" pn="section-toc.1-1.2.1"><xref derivedContent="2" format="counter" sectionFormat="of" target="section-2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-sip-procedures">SIP Procedures</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2">
              <li pn="section-toc.1-1.2.2.1">
                <t indent="0" pn="section-toc.1-1.2.2.1.1"><xref derivedContent="2.1" format="counter" sectionFormat="of" target="section-2.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-uac-behavior">UAC Behavior</xref></t>
                <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.2.2.1.2">
                  <li pn="section-toc.1-1.2.2.1.2.1">
                    <t indent="0" pn="section-toc.1-1.2.2.1.2.1.1"><xref derivedContent="2.1.1" format="counter" sectionFormat="of" target="section-2.1.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-obtaining-tokens-and-respon">Obtaining Tokens and Responding to Challenges</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.1.2.2">
                    <t indent="0" pn="section-toc.1-1.2.2.1.2.2.1"><xref derivedContent="2.1.2" format="counter" sectionFormat="of" target="section-2.1.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-protecting-the-access-token">Protecting the Access Token</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.1.2.3">
                    <t indent="0" pn="section-toc.1-1.2.2.1.2.3.1"><xref derivedContent="2.1.3" format="counter" sectionFormat="of" target="section-2.1.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-register-request">REGISTER Request</xref></t>
                  </li>
                  <li pn="section-toc.1-1.2.2.1.2.4">
                    <t indent="0" pn="section-toc.1-1.2.2.1.2.4.1"><xref derivedContent="2.1.4" format="counter" sectionFormat="of" target="section-2.1.4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-non-register-request">Non-REGISTER Request</xref></t>
                  </li>
                </ul>
              </li>
              <li pn="section-toc.1-1.2.2.2">
                <t indent="0" pn="section-toc.1-1.2.2.2.1"><xref derivedContent="2.2" format="counter" sectionFormat="of" target="section-2.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-user-agent-server-uas-and-r">User Agent Server (UAS) and Registrar Behavior</xref></t>
              </li>
              <li pn="section-toc.1-1.2.2.3">
                <t indent="0" pn="section-toc.1-1.2.2.3.1"><xref derivedContent="2.3" format="counter" sectionFormat="of" target="section-2.3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-proxy-behavior">Proxy Behavior</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.3">
            <t indent="0" pn="section-toc.1-1.3.1"><xref derivedContent="3" format="counter" sectionFormat="of" target="section-3"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-access-token-claims">Access Token Claims</xref></t>
          </li>
          <li pn="section-toc.1-1.4">
            <t indent="0" pn="section-toc.1-1.4.1"><xref derivedContent="4" format="counter" sectionFormat="of" target="section-4"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-www-authenticate-response-h">WWW-Authenticate Response Header Field</xref></t>
          </li>
          <li pn="section-toc.1-1.5">
            <t indent="0" pn="section-toc.1-1.5.1"><xref derivedContent="5" format="counter" sectionFormat="of" target="section-5"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-security-considerations">Security Considerations</xref></t>
          </li>
          <li pn="section-toc.1-1.6">
            <t indent="0" pn="section-toc.1-1.6.1"><xref derivedContent="6" format="counter" sectionFormat="of" target="section-6"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-iana-considerations">IANA Considerations</xref></t>
            <ul bare="true" empty="true" indent="2" spacing="compact" pn="section-toc.1-1.6.2">
              <li pn="section-toc.1-1.6.2.1">
                <t indent="0" pn="section-toc.1-1.6.2.1.1"><xref derivedContent="6.1" format="counter" sectionFormat="of" target="section-6.1"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-new-proxy-authenticate-head">New Proxy-Authenticate Header Field Parameters</xref></t>
              </li>
              <li pn="section-toc.1-1.6.2.2">
                <t indent="0" pn="section-toc.1-1.6.2.2.1"><xref derivedContent="6.2" format="counter" sectionFormat="of" target="section-6.2"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-new-www-authenticate-header">New WWW-Authenticate Header Field Parameters</xref></t>
              </li>
            </ul>
          </li>
          <li pn="section-toc.1-1.7">
            <t indent="0" pn="section-toc.1-1.7.1"><xref derivedContent="7" format="counter" sectionFormat="of" target="section-7"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-normative-references">Normative References</xref></t>
          </li>
          <li pn="section-toc.1-1.8">
            <t indent="0" pn="section-toc.1-1.8.1"><xref derivedContent="8" format="counter" sectionFormat="of" target="section-8"/>.  <xref derivedContent="" format="title" sectionFormat="of" target="name-informative-references">Informative References</xref></t>
          </li>
          <li pn="section-toc.1-1.9">
            <t indent="0" pn="section-toc.1-1.9.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.a"/><xref derivedContent="" format="title" sectionFormat="of" target="name-acknowledgments">Acknowledgments</xref></t>
          </li>
          <li pn="section-toc.1-1.10">
            <t indent="0" pn="section-toc.1-1.10.1"><xref derivedContent="" format="none" sectionFormat="of" target="section-appendix.b"/><xref derivedContent="" format="title" sectionFormat="of" target="name-authors-addresses">Authors' Addresses</xref></t>
          </li>
        </ul>
      </section>
    </toc>
  </front>
  <middle>
    <section anchor="introduction" numbered="true" removeInRFC="false" toc="include" pn="section-1">
      <name slugifiedName="name-introduction">Introduction</name>
      <t indent="0" pn="section-1-1">
      The Session Initiation Protocol (SIP) <xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/> uses the same framework
      as HTTP <xref target="RFC7230" format="default" sectionFormat="of" derivedContent="RFC7230"/> to authenticate users: a simple
      challenge-response authentication mechanism that allows a SIP User Agent Server (UAS), proxy, or
      registrar to challenge a SIP User Agent Client (UAC) request and allows
      the UAC to provide authentication information in response to that
      challenge. 

      </t>
      <t indent="0" pn="section-1-2">
      OAuth 2.0 <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/> defines a token-based authorization
      framework to allow an OAuth client to access resources on behalf of its user.
      </t>
      <t indent="0" pn="section-1-3">
      The OpenID Connect Core 1.0 specification <xref target="OPENID" format="default" sectionFormat="of" derivedContent="OPENID"/> defines
      a simple identity layer on top of the OAuth 2.0 protocol, which enables
      OAuth/OpenID clients to verify the identity of the user based on the authentication
      performed by a dedicated authorization server (AS), referred to as
      OpenID Provider (OP), as well as to obtain basic profile information about the user.
      </t>
      <t indent="0" pn="section-1-4">
      This document defines the "Bearer" authentication scheme for 
      SIP and a mechanism by which user
      authentication and SIP registration authorization is delegated to a
      third party, using the OAuth 2.0 framework and OpenID Connect Core
      1.0. This kind of user authentication enables single sign-on,
      which allows the user to authenticate once and gain access to both SIP
      and non-SIP services.
      </t>
      <t indent="0" pn="section-1-5">
      This document also updates <xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/> by defining the UAC procedures 
      when a UAC receives a 401/407 response with multiple WWW-Authenticate/Proxy-Authenticate 
      header fields, providing challenges using different authentication schemes 
      for the same realm.
      </t>
      <t indent="0" pn="section-1-6">   </t>
      <section anchor="terminology" numbered="true" removeInRFC="false" toc="include" pn="section-1.1">
        <name slugifiedName="name-terminology">Terminology</name>
        <t indent="0" pn="section-1.1-1">
    The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
    "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
    "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", 
    "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are
    to be interpreted as 
    described in BCP 14 <xref target="RFC2119" format="default" sectionFormat="of" derivedContent="RFC2119"/> <xref target="RFC8174" format="default" sectionFormat="of" derivedContent="RFC8174"/> 
    when, and only when, they appear in all capitals, as shown here.
        </t>
      </section>
      <section anchor="section.this" numbered="true" removeInRFC="false" toc="include" pn="section-1.2">
        <name slugifiedName="name-applicability">Applicability</name>
        <t indent="0" pn="section-1.2-1">
        This document covers cases where grants that allow the UAC to obtain an
        access token from the AS are used. Cases where the UAC is not able to obtain
        an access token (e.g., in the case of an authorization code grant) are not covered.
        </t>
        <t indent="0" pn="section-1.2-2">   </t>
      </section>
      <section anchor="tokens" numbered="true" removeInRFC="false" toc="include" pn="section-1.3">
        <name slugifiedName="name-token-types-and-formats">Token Types and Formats</name>
        <t indent="0" pn="section-1.3-1">
      The tokens used in third-party authorization depend on the type of 
      AS.
        </t>
        <t indent="0" pn="section-1.3-2">
      An OAuth AS provides the following tokens to a successfully 
      authorized UAC:
        </t>
        <dl newline="true" spacing="normal" indent="3" pn="section-1.3-3">
          <dt pn="section-1.3-3.1">Access Token:</dt>
          <dd pn="section-1.3-3.2">The UAC will use this token to gain access to services by 
      providing the token to a SIP server.</dd>
          <dt pn="section-1.3-3.3">Refresh Token:</dt>
          <dd pn="section-1.3-3.4">The UAC will present this token to the AS
      to refresh a stale access token.</dd>
        </dl>
        <t indent="0" pn="section-1.3-4">An OP returns an additional token:</t>
        <dl newline="true" spacing="normal" indent="3" pn="section-1.3-5">
          <dt pn="section-1.3-5.1">ID Token:</dt>
          <dd pn="section-1.3-5.2">This token contains a SIP URI associated with the user and other
      user-specific details that will be consumed by the UAC.</dd>
        </dl>
        <t indent="0" pn="section-1.3-6">Tokens can be represented in two different formats:</t>
        <dl newline="true" spacing="normal" indent="3" pn="section-1.3-7">
          <dt pn="section-1.3-7.1">Structured Token:</dt>
          <dd pn="section-1.3-7.2">A token that consists of a structured object that contains the
      claims associated with the token, e.g., JSON Web Token (JWT), as defined
      in <xref target="RFC7519" format="default" sectionFormat="of" derivedContent="RFC7519"/>.</dd>
          <dt pn="section-1.3-7.3">Reference Token:</dt>
          <dd pn="section-1.3-7.4">A token that consists of an opaque string that is used to obtain the
      details of the token and its associated claims, as defined in <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>.</dd>
        </dl>
        <t indent="0" pn="section-1.3-8">
      Access tokens are represented in one of the above two formats. Refresh tokens 
      usually are represented in a reference format, as this token is consumed
      only by the AS that 
      issued the token.  The ID token is defined as a structured token in the form of a JWT.
        </t>
        <t indent="0" pn="section-1.3-9"/>
      </section>
      <section anchor="sec.authnz.flow" numbered="true" removeInRFC="false" toc="include" pn="section-1.4">
        <name slugifiedName="name-example-flows">Example Flows</name>
        <section anchor="sec.reg.discovered.as" numbered="true" removeInRFC="false" toc="include" pn="section-1.4.1">
          <name slugifiedName="name-registration">Registration</name>
          <t indent="0" pn="section-1.4.1-1">
        <xref target="fig-register-flow" format="default" sectionFormat="of" derivedContent="Figure 1"/> below shows an example of a SIP registration where
        the registrar informs the UAC about the AS from which the UAC can
        obtain an access token.
          </t>
          <figure anchor="fig-register-flow" align="left" suppress-title="false" pn="figure-1">
            <name slugifiedName="name-example-registration-flow">Example Registration Flow</name>
            <artwork name="" type="" align="left" alt="" pn="section-1.4.1-2.1">
  UAC                         Registrar                         AS/OP
---------------------------------------------------------------------
  |                               |                               |
  | [1] REGISTER                  |                               |
  |------------------------------&gt;|                               |
  |                               |                               |
  | [2] 401 Unauthorized          |                               |
  |     WWW-Authenticate: Bearer "authz_server"="&lt;authz_server&gt;"  |
  |&lt;------------------------------|                               |
  |                               |                               |
  | [3] The UAC interacts with the AS and obtains tokens using    |
  |     some out-of-scope mechanism.                              |
  |&lt;=============================================================&gt;|
  |                               |                               |
  | [4] REGISTER                  |                               |
  |     Authorization: Bearer &lt;access_token&gt;                      |
  |------------------------------&gt;|                               |
  |                               | [5] HTTP POST /introspect     |
  |                               |     {access_token}            |
  |                               |       (OPTIONAL)              |
  |                               |------------------------------&gt;|
  |                               |                               |
  |                               | [6] 200 OK {metadata}         |
  |                               |       (OPTIONAL)              |
  |                               |&lt;------------------------------|
  |                               |                               |
  | [7] 200 OK                    |                               |
  |&lt;------------------------------|                               |
  |                               |                               |
</artwork>
          </figure>
          <t indent="0" pn="section-1.4.1-3"> 
        In step [1], the UAC starts the registration process by sending a 
        SIP REGISTER request to the registrar without any credentials. 
          </t>
          <t indent="0" pn="section-1.4.1-4">
        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.
          </t>
          <t indent="0" pn="section-1.4.1-5">
        In step [3], the UAC interacts with the AS via an out-of-scope mechanism, potentially using the OAuth Native 
        App mechanism defined in <xref target="RFC8252" format="default" sectionFormat="of" derivedContent="RFC8252"/>. The AS authenticates the user and provides the UAC with the 
        tokens needed to access the SIP service.
          </t>
          <t indent="0" pn="section-1.4.1-6">
        In step [4], the UAC retries the registration process by sending a new
        REGISTER request that includes the access token that the UAC 
        obtained in the step above.
          </t>
          <t indent="0" pn="section-1.4.1-7">
        The registrar validates the access token. If the access token is a
        reference token, the registrar <bcp14>MAY</bcp14> perform an introspection
        <xref target="RFC7662" format="default" sectionFormat="of" derivedContent="RFC7662"/>, as in steps [5] and [6], in order to obtain more
        information about the access token and its scope, per <xref target="RFC7662" format="default" sectionFormat="of" derivedContent="RFC7662"/>.
        Otherwise, after the registrar validates the token, it inspects its
        claims and acts upon it.
          </t>
          <t indent="0" pn="section-1.4.1-8">
        In step [7], once the registrar has successfully verified and accepted the 
        access token, it sends a 200 (OK) response to the REGISTER request.
          </t>
          <t indent="0" pn="section-1.4.1-9">   </t>
        </section>
        <section anchor="sec.reg.preconfigured.as" numbered="true" removeInRFC="false" toc="include" pn="section-1.4.2">
          <name slugifiedName="name-registration-with-preconfig">Registration with Preconfigured AS</name>
          <t indent="0" pn="section-1.4.2-1">
        <xref target="fig-config-ua" format="default" sectionFormat="of" derivedContent="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.
          </t>
          <figure anchor="fig-config-ua" align="left" suppress-title="false" pn="figure-2">
            <name slugifiedName="name-example-registration-flow-a">Example Registration Flow - AS Information Preconfigured</name>
            <artwork name="" type="" align="left" alt="" pn="section-1.4.2-2.1">
  UAC                         Registrar                         AS/OP
---------------------------------------------------------------------
  |                               |                               |
  | [1] The UAC interacts with the AS and obtains tokens using    |
  |     some out-of-scope mechanism.                              |
  |&lt;=============================================================&gt;|
  |                               |                               |
  | [2] REGISTER                  |                               |
  |     Authorization: Bearer &lt;access_token&gt;                      |
  |------------------------------&gt;|                               |
  |                               | [3] HTTP POST /introspect     |
  |                               |     {access_token}            |
  |                               |       (OPTIONAL)              |
  |                               |------------------------------&gt;|
  |                               |                               |
  |                               | [4] 200 OK {metadata}         |
  |                               |       (OPTIONAL)              |
  |                               |&lt;------------------------------|
  |                               |                               |
  | [5] 200 OK                    |                               |
  |&lt;------------------------------|                               |
  |                               |                               |
</artwork>
          </figure>
          <t indent="0" pn="section-1.4.2-3">
        In step [1], the UAC interacts with the AS using an out-of-scope mechanism, potentially using the OAuth Native 
        App mechanism defined in <xref target="RFC8252" format="default" sectionFormat="of" derivedContent="RFC8252"/>. The AS authenticates the user and provides the UAC with the 
        tokens needed to access the SIP service.
          </t>
          <t indent="0" pn="section-1.4.2-4">
        In step [2], the UAC initiates the registration process by sending a new
        REGISTER request that includes the access token that the UAC 
        obtained in the step above.
          </t>
          <t indent="0" pn="section-1.4.2-5">
        The registrar validates the access token. If the access token is a
        reference token, the registrar <bcp14>MAY</bcp14> perform an introspection
        <xref target="RFC7662" format="default" sectionFormat="of" derivedContent="RFC7662"/>, as in steps [4] and [5], in order to obtain more
        information about the access token and its scope, per <xref target="RFC7662" format="default" sectionFormat="of" derivedContent="RFC7662"/>.
        Otherwise, after the registrar validates the token, it inspects its
        claims and acts upon it.
          </t>
          <t indent="0" pn="section-1.4.2-6">
        In step [5], once the registrar has successfully verified and accepted the 
        access token, it sends a 200 (OK) response to the REGISTER request.
          </t>
          <t indent="0" pn="section-1.4.2-7">   </t>
        </section>
      </section>
    </section>
    <section anchor="sec.sip" numbered="true" removeInRFC="false" toc="include" pn="section-2">
      <name slugifiedName="name-sip-procedures">SIP Procedures</name>
      <t indent="0" pn="section-2-1"><xref target="RFC3261" sectionFormat="of" section="22" format="default" derivedLink="https://rfc-editor.org/rfc/rfc3261#section-22" derivedContent="RFC3261"/> defines the
      SIP procedures for the Digest authentication mechanism. The same
      procedures apply to the "Bearer" authentication mechanism, with the
      changes described in this section.</t>
      <section anchor="sec.sip.uac" numbered="true" removeInRFC="false" toc="include" pn="section-2.1">
        <name slugifiedName="name-uac-behavior">UAC Behavior</name>
        <section anchor="sec.sip.uac.obtain" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.1">
          <name slugifiedName="name-obtaining-tokens-and-respon">Obtaining Tokens and Responding to Challenges</name>
          <t indent="0" pn="section-2.1.1-1">
          When a UAC sends a request without credentials (or with invalid credentials), 
          it could receive either a 401 (Unauthorized) response with a WWW-Authenticate header field or a 407 (Proxy 
          Authentication Required) response with a Proxy-Authenticate header field.
          If the WWW-Authenticate or Proxy-Authenticate header field indicates "Bearer" scheme authentication 
          and contains an address to an AS, the UAC contacts the 
          AS in order to obtain tokens and includes the requested 
          scopes, based on a local configuration (<xref target="fig-register-flow" format="default" sectionFormat="of" derivedContent="Figure 1"/>). 
          The UAC <bcp14>MUST</bcp14> check the AS URL received in the 401/407 response
          against a list of trusted ASs configured on the UAC in order
          to prevent several classes of possible vulnerabilities when a client blindly
          attempts to use any provided AS.
          </t>
          <t indent="0" pn="section-2.1.1-2">
          The detailed OAuth2 procedure to authenticate the user and obtain
          these tokens is out of scope of this document. 
          The address of the AS might already be known to the UAC via configuration. 
          In such cases, the UAC can contact the AS for tokens 
          before it sends a SIP request (<xref target="fig-config-ua" format="default" sectionFormat="of" derivedContent="Figure 2"/>). 
          Procedures for native applications are defined in <xref target="RFC8252" format="default" sectionFormat="of" derivedContent="RFC8252"/>.
          When using the mechanism defined
          in <xref target="RFC8252" format="default" sectionFormat="of" derivedContent="RFC8252"/>, the user of the UAC will be directed to interact
          with the AS using a web browser, which allows the AS
          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.
          </t>
          <t indent="0" pn="section-2.1.1-3">
          The tokens returned to the UAC depend on the type of AS; an OAuth AS provides an 
          access token and, optionally, a refresh token <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>. The refresh
          token is only used between the UAC and the AS. If the AS provides a refresh token
          to the UAC, the UAC uses it to request a new access token from
          the AS before the currently used access token expires (<xref target="RFC6749" sectionFormat="comma" section="1.5" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6749#section-1.5" derivedContent="RFC6749"/>).
          If the AS does not provide a refresh token, the UAC needs to reauthenticate the user
          in order to get a new access token before the currently used access token expires.
          An OP returns an additional ID token that contains claims about 
          the authentication of the user by an authorization server. The ID token can potentially 
          include other optional claims about the user, e.g., the SIP URI, that will be consumed by 
          the UAC and later used to register with the registrar.
          </t>
          <t indent="0" pn="section-2.1.1-4">
          If the UAC receives a 401/407 response with multiple WWW-
          Authenticate/Proxy-Authenticate header fields, providing challenges
          using different authentication schemes for the same realm, the UAC
          provides credentials for one of the schemes that it supports,
          based on local policy.
          </t>
          <aside pn="section-2.1.1-5">
            <t indent="0" pn="section-2.1.1-5.1">
          NOTE: At the time of writing, detailed
          procedures for the cases where a UAC receives multiple
          different authentication schemes had not been defined. A
          future specification might define such procedures.
            </t>
          </aside>
          <aside pn="section-2.1.1-6">
            <t indent="0" pn="section-2.1.1-6.1">
          NOTE: The address of the AS might be known to the	 		
          UAC, e.g., using means of configuration, in which case the UAC can	 		
          contact the AS in order to obtain the access token	 		
          before it sends SIP request without credentials.
            </t>
          </aside>
        </section>
        <section anchor="sec.sip.uac.protect" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.2">
          <name slugifiedName="name-protecting-the-access-token">Protecting the Access Token</name>
          <t indent="0" pn="section-2.1.2-1">
          <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/> mandates that access tokens are protected with 
          TLS when in transit. However, SIP makes use of intermediary SIP proxies,
          and TLS only guarantees hop-to-hop protection when used to protect SIP signaling.
          Therefore, the access token <bcp14>MUST</bcp14> be protected in a way so that only authorized SIP
          servers will have access to it. SIP endpoints that support this document <bcp14>MUST</bcp14>
          use encrypted JWTs <xref target="RFC7519" format="default" sectionFormat="of" derivedContent="RFC7519"/> for encoding and protecting 
          access tokens when they are included in SIP requests, unless some other mechanism 
          is used to guarantee that only authorized SIP endpoints have access to 
          the access token. TLS can still be used for protecting traffic between
          SIP endpoints and the AS, as defined in <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>.
          </t>
          <t indent="0" pn="section-2.1.2-2">   </t>
        </section>
        <section anchor="sec.sip.uac.req.reg" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.3">
          <name slugifiedName="name-register-request">REGISTER Request</name>
          <t indent="0" pn="section-2.1.3-1">The procedures in this section apply when the UAC has received a
	  challenge that contains a "Bearer" scheme and the UAC has obtained
	  a token, as specified in <xref target="sec.sip.uac.obtain" format="default" sectionFormat="of" derivedContent="Section 2.1.1"/>.</t>
          <t indent="0" pn="section-2.1.3-2">The UAC sends a REGISTER request with an Authorization header
	  field containing the response to the challenge, including the "Bearer"
	  scheme carrying a valid access token in the request, as specified in
	  <xref target="RFC6750" format="default" sectionFormat="of" derivedContent="RFC6750"/>.</t>
          <t indent="0" pn="section-2.1.3-3">
        Note that if there were multiple challenges with different schemes, then the UAC may be 
        able to successfully retry the request using non-"Bearer" credentials.
          </t>
          <t indent="0" pn="section-2.1.3-4">Typically, a UAC will obtain a new access token for each new
	  binding. However, based on local policy, a UAC <bcp14>MAY</bcp14>
	  include an access token that has been used for another binding
	  associated with the same Address Of Record (AOR) in the request.</t>
          <t indent="0" pn="section-2.1.3-5">
        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
        follows the procedures in <xref target="sec.sip.uac.obtain" format="default" sectionFormat="of" derivedContent="Section 2.1.1"/>.
          </t>
          <t indent="0" pn="section-2.1.3-6">   </t>
        </section>
        <section anchor="sec.sip.uac.req.nonreg" numbered="true" removeInRFC="false" toc="include" pn="section-2.1.4">
          <name slugifiedName="name-non-register-request">Non-REGISTER Request</name>
          <t indent="0" pn="section-2.1.4-1">The procedures in this section apply when the UAC has received a
	  challenge that contains a "Bearer" scheme and the UAC has obtained a
	  token, as specified in <xref target="sec.sip.uac.obtain" format="default" sectionFormat="of" derivedContent="Section 2.1.1"/>.</t>
          <t indent="0" pn="section-2.1.4-2">
          When the UAC sends a request, it <bcp14>MUST</bcp14> include an Authorization header field 
          with a "Bearer" scheme carrying a valid access token obtained from the AS indicated
          in the challenge in the request, as specified in <xref target="RFC6750" format="default" sectionFormat="of" derivedContent="RFC6750"/>.
          Based on local policy, the UAC <bcp14>MAY</bcp14> 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 the same.
          </t>
          <t indent="0" pn="section-2.1.4-3">
          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 procedures in 
          <xref target="sec.sip.uac.obtain" format="default" sectionFormat="of" derivedContent="Section 2.1.1"/>.
          </t>
          <t indent="0" pn="section-2.1.4-4">   </t>
        </section>
      </section>
      <section anchor="sec.sip.uas" numbered="true" removeInRFC="false" toc="include" pn="section-2.2">
        <name slugifiedName="name-user-agent-server-uas-and-r">User Agent Server (UAS) and Registrar Behavior</name>
        <t indent="0" pn="section-2.2-1">
        When a UAS or registrar receives a request that fails to contain
        authorization credentials acceptable to it, the UAS/registrar <bcp14>SHOULD</bcp14> challenge the
        request by sending a 401 (Unauthorized) response. If the UAS/registrar
        chooses to challenge the request and is willing to accept an access token
        as a credential, it <bcp14>MUST</bcp14> include a WWW-Authenticate header
        field in the response that indicates a "Bearer" scheme and includes an AS address, 
        encoded as an https URI <xref target="RFC7230" format="default" sectionFormat="of" derivedContent="RFC7230"/>, from which the UAC can obtain
        an access token.
        </t>
        <t indent="0" pn="section-2.2-2">
        When a UAS or registrar receives a SIP request that contains an Authorization 
        header field with an access token, the UAS/registrar <bcp14>MUST</bcp14> validate the access 
        token using the procedures associated with the type of access token (structured 
        or reference) used, e.g., <xref target="RFC7519" format="default" sectionFormat="of" derivedContent="RFC7519"/>.
        If the token provided is an expired access token, then the UAS/registrar <bcp14>MUST</bcp14> reply with 
        a 401 (Unauthorized) response, as defined in <xref target="RFC6750" sectionFormat="of" section="3" format="default" derivedLink="https://rfc-editor.org/rfc/rfc6750#section-3" derivedContent="RFC6750"/>.
        If the validation is successful, the UAS/registrar can continue to process 
        the request using normal SIP procedures. If the validation fails, the UAS/registrar 
        <bcp14>MUST</bcp14> reply with a 401 (Unauthorized) response.
        </t>
        <t indent="0" pn="section-2.2-3">   </t>
      </section>
      <section anchor="sec.sip.proxy" numbered="true" removeInRFC="false" toc="include" pn="section-2.3">
        <name slugifiedName="name-proxy-behavior">Proxy Behavior</name>
        <t indent="0" pn="section-2.3-1">
        When a proxy receives a request that fails to contain
        authorization credentials acceptable to it, it <bcp14>SHOULD</bcp14> challenge the
        request by sending a 407 (Proxy Authentication Required) response.
        If the proxy chooses to challenge the request and is willing to accept an access token
        as a credential, it <bcp14>MUST</bcp14> include a Proxy-Authenticate
        header field in the response that indicates a "Bearer" scheme and includes an AS address, 
        encoded as an https URI <xref target="RFC7230" format="default" sectionFormat="of" derivedContent="RFC7230"/>, from which the UAC can obtain
        an access token.
        </t>
        <t indent="0" pn="section-2.3-2">
        When a proxy wishes to authenticate a received request, it <bcp14>MUST</bcp14>
        search the request for Proxy-Authorization header fields with 'realm'
        parameters that match its realm. It then <bcp14>MUST</bcp14> successfully validate
        the credentials from at least one Proxy-Authorization header field
        for its realm. When the scheme is "Bearer", the proxy <bcp14>MUST</bcp14> validate the
        access token using the procedures associated with the type of access 
        token (structured or reference) used, e.g., <xref target="RFC7519" format="default" sectionFormat="of" derivedContent="RFC7519"/>.
        </t>
        <t indent="0" pn="section-2.3-3">   </t>
      </section>
    </section>
    <section anchor="at.claims" numbered="true" removeInRFC="false" toc="include" pn="section-3">
      <name slugifiedName="name-access-token-claims">Access Token Claims</name>
      <t indent="0" pn="section-3-1">
    The type of services to which an access token grants access can be determined 
    using different methods. The methods used and the access provided by the token
    are based on local policy agreed between the AS and the registrar.
      </t>
      <t indent="0" pn="section-3-2">
    If an access token is encoded as a JWT, it will contain a list of claims 
    <xref target="RFC7519" format="default" sectionFormat="of" derivedContent="RFC7519"/>, including both registered and application-specific claims. The 
    registrar can grant access to services based on such claims,  
    some other mechanism, or a combination of claims and some other mechanism.
    If an access token is a reference token, the registrar will grant access 
    based on some other mechanism. Examples of such other mechanisms are 
    introspection <xref target="RFC7662" format="default" sectionFormat="of" derivedContent="RFC7662"/> and user profile lookups.
      </t>
      <t indent="0" pn="section-3-3">   </t>
    </section>
    <section anchor="www-authenticate.response.header" numbered="true" removeInRFC="false" toc="include" pn="section-4">
      <name slugifiedName="name-www-authenticate-response-h">WWW-Authenticate Response Header Field</name>
      <t indent="0" pn="section-4-1">This section uses ABNF <xref target="RFC5234" format="default" sectionFormat="of" derivedContent="RFC5234"/> to describe the
      syntax of the WWW-Authenticate header  field when used with the "Bearer"
      scheme to challenge the UAC for credentials by extending the
      'challenge' parameter defined by <xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/>.</t>
      <figure anchor="bearer-syntax" align="left" suppress-title="false" pn="figure-3">
        <name slugifiedName="name-bearer-scheme-syntax">"Bearer" Scheme Syntax</name>
        <sourcecode type="abnf" markers="false" pn="section-4-2.1">
challenge  =/  ("Bearer" LWS bearer-cln *(COMMA bearer-cln))
bearer-cln = realm / scope-param / authz-server-param / error-param /
             auth-param
realm = &lt;defined in RFC 3261&gt;
scope-param = "scope" EQUAL DQUOTE scope DQUOTE
scope = &lt;defined in RFC 6749&gt;
authz-server-param = "authz_server" EQUAL DQUOTE authz-server DQUOTE
authz-server = https-URI
https-URI = &lt;defined in RFC 7230&gt;
error-param = "error" EQUAL DQUOTE error DQUOTE
error = &lt;defined in RFC 6749&gt;
auth-param = &lt;defined in RFC 3261&gt;
</sourcecode>
      </figure>
      <t indent="0" pn="section-4-3">
  The authz_server parameter contains the HTTPS URI, as defined in 
  <xref target="RFC7230" format="default" sectionFormat="of" derivedContent="RFC7230"/>, of the AS. The UAC can discover 
  metadata about the AS using a mechanism like the one defined in <xref target="RFC8414" format="default" sectionFormat="of" derivedContent="RFC8414"/>.
      </t>
      <t indent="0" pn="section-4-4">
  The realm and auth-param parameters are defined in <xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/>.
      </t>
      <t indent="0" pn="section-4-5">
  Per <xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/>, "the realm string alone defines the protection 
  domain". <xref target="RFC3261" format="default" sectionFormat="of" derivedContent="RFC3261"/> states that the realm string must be 
  globally unique and recommends that the realm string contain a hostname or 
  domain name. It also states that the realm string should be a human-readable identifier
  that can be rendered to the user.
      </t>
      <t indent="0" pn="section-4-6">  
  The scope and error parameters are defined in <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>.
      </t>
      <t indent="0" pn="section-4-7">
  The scope parameter can be used by the registrar/proxy to indicate to the UAC 
  the minimum scope that must be associated with the access token to be able to get 
  service. As defined in <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>, the value of the scope parameter 
  is expressed as a list of space-delimited, case-sensitive strings. The strings are 
  defined by the AS. The values of the scope parameter are out of 
  scope of this document. The UAC will use the scope provided by the registrar to 
  contact the AS and obtain a proper token with the requested scope.
      </t>
      <t indent="0" pn="section-4-8">
  The error parameter could be used by the registrar/proxy to indicate to the UAC 
  the reason for the error, with possible values of "invalid_token" or "invalid_scope".
      </t>
      <t indent="0" pn="section-4-9">   </t>
    </section>
    <section anchor="security.considerations" numbered="true" removeInRFC="false" toc="include" pn="section-5">
      <name slugifiedName="name-security-considerations">Security Considerations</name>
      <t indent="0" pn="section-5-1">
      The security considerations for OAuth are defined in <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>.
      The security considerations for "Bearer" tokens are defined in <xref target="RFC6750" format="default" sectionFormat="of" derivedContent="RFC6750"/>.
      The security considerations for JWTs are defined in <xref target="RFC7519" format="default" sectionFormat="of" derivedContent="RFC7519"/>.
      These security considerations also apply to SIP usage of access tokens, as defined in this
      document.
      </t>
      <t indent="0" pn="section-5-2">
      <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/> mandates that access tokens are protected with 
      TLS when in transit. However, SIP makes use of intermediary SIP proxies,
      and TLS only guarantees hop-to-hop protection when used to protect SIP signaling.
      Therefore, the access token <bcp14>MUST</bcp14> be protected in a way so that only authorized SIP
      servers will have access to it. SIP endpoints that support this document <bcp14>MUST</bcp14>
      use encrypted JWTs <xref target="RFC7519" format="default" sectionFormat="of" derivedContent="RFC7519"/> for encoding and protecting 
      access tokens when they are included in SIP requests, unless some other mechanism 
      is used to guarantee that only authorized SIP endpoints have access to 
      the access token. TLS can still be used for protecting traffic between
      SIP endpoints and the AS, as defined in <xref target="RFC6749" format="default" sectionFormat="of" derivedContent="RFC6749"/>.
      </t>
      <t indent="0" pn="section-5-3">
      Single Sign-On (SSO) enables the user to use one set of credentials to
      authenticate once and gain access to multiple SIP and non-SIP services
      using access token(s). If the SSO login is compromised, that single
      point of compromise has a much broader effect than is the case without
      SSO. Further, an attacker can often use a compromised account to set
      up Single Sign-On for other services that the victim has not
      established an account with and sometimes can even switch a dedicated
      account into SSO mode, creating a still broader attack.
      </t>
      <t indent="0" pn="section-5-4">
      Because of that, it is critical to make sure that extra security
      measures be taken to safeguard credentials used for Single Sign-On.
      Examples of such measures include a long passphrase instead of a
      password, enabling multi-factor authentication, and the use of
      the native platform browser when possible, as defined in <xref target="RFC8252" format="default" sectionFormat="of" derivedContent="RFC8252"/>.
      </t>
      <t indent="0" pn="section-5-5">
      Although this is out of scope for this document, it is important to
      carefully consider the claims provided in the tokens used to access
      these services to make sure of the privacy of the user accessing these
      services. As mentioned above, this document calls for encrypting JWTs
      representing the access token.
      </t>
      <t indent="0" pn="section-5-6">
      It is important that both parties participating in SSO provide
      mechanisms for users to sever the SSO relationship so that it is
      possible without undue difficulty to mitigate a compromise that has
      already happened.
      </t>
      <t indent="0" pn="section-5-7">
      The operator of an SSO authentication system has access to
      private information about sites and services that their users log
      into and even, to some extent, their usage patterns.  It's
      important to call these out in privacy disclosures and policies and
      to make sure that users can be aware of the trade-offs between
      convenience and privacy when they choose to use SSO.
      </t>
      <t indent="0" pn="section-5-8">
      When a registrar chooses to challenge a REGISTER request, if the registrar
      can provide access to different levels of services, it is <bcp14>RECOMMENDED</bcp14> that
      the registrar include a scope in the response in order to indicate the minimum
      scope needed to register and access basic services. The access token might
      include an extended scope that gives the user access to more advanced features
      beyond basic services. In SIP, the AS administrator will typically decide what level
      of access is provided for a given user.
      </t>
      <t indent="0" pn="section-5-9">
      The UAC <bcp14>MUST</bcp14> check the AS URL received in the 401/407 response
      against a list of trusted ASs configured on the UAC in order
      to prevent several classes of possible vulnerabilities when a client blindly
      attempts to use any provided AS.
      </t>
      <t indent="0" pn="section-5-10">   </t>
    </section>
    <section anchor="iana.considerations" numbered="true" removeInRFC="false" toc="include" pn="section-6">
      <name slugifiedName="name-iana-considerations">IANA Considerations</name>
      <section anchor="iana.considerations.proxy-authenticate.param" numbered="true" removeInRFC="false" toc="include" pn="section-6.1">
        <name slugifiedName="name-new-proxy-authenticate-head">New Proxy-Authenticate Header Field Parameters</name>
        <t indent="0" pn="section-6.1-1">
        This section defines new SIP header field parameters in the "Header Field
        Parameters and Parameter Values" subregistry of the "Session
        Initiation Protocol (SIP) Parameters" registry: <eref target="https://www.iana.org/assignments/sip-parameters" brackets="angle"/>
        </t>
        <table anchor="proxy-authenticate" align="center" pn="table-1">
          <name slugifiedName="name-header-field-proxy-authenti">Header Field: Proxy-Authenticate</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Parameter Name</th>
              <th align="left" colspan="1" rowspan="1">Predefined Values</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">authz_server</td>
              <td align="left" colspan="1" rowspan="1">No</td>
              <td align="left" colspan="1" rowspan="1">RFC 8898</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">error</td>
              <td align="left" colspan="1" rowspan="1">No</td>
              <td align="left" colspan="1" rowspan="1">RFC 8898</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">scope</td>
              <td align="left" colspan="1" rowspan="1">No</td>
              <td align="left" colspan="1" rowspan="1">RFC 8898</td>
            </tr>
          </tbody>
        </table>
      </section>
      <section anchor="iana.considerations.www-authenticate.param" numbered="true" removeInRFC="false" toc="include" pn="section-6.2">
        <name slugifiedName="name-new-www-authenticate-header">New WWW-Authenticate Header Field Parameters</name>
        <t indent="0" pn="section-6.2-1">
        This section defines new SIP header field parameters in the "Header Field
        Parameters and Parameter Values" subregistry of the "Session
        Initiation Protocol (SIP) Parameters" registry: <eref target="https://www.iana.org/assignments/sip-parameters" brackets="angle"/>
        </t>
        <table anchor="www-authenticate" align="center" pn="table-2">
          <name slugifiedName="name-header-field-www-authentica">Header Field: WWW-Authenticate</name>
          <thead>
            <tr>
              <th align="left" colspan="1" rowspan="1">Parameter Name</th>
              <th align="left" colspan="1" rowspan="1">Predefined Values</th>
              <th align="left" colspan="1" rowspan="1">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left" colspan="1" rowspan="1">authz_server</td>
              <td align="left" colspan="1" rowspan="1">No</td>
              <td align="left" colspan="1" rowspan="1">RFC 8898</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">error</td>
              <td align="left" colspan="1" rowspan="1">No</td>
              <td align="left" colspan="1" rowspan="1">RFC 8898</td>
            </tr>
            <tr>
              <td align="left" colspan="1" rowspan="1">scope</td>
              <td align="left" colspan="1" rowspan="1">No</td>
              <td align="left" colspan="1" rowspan="1">RFC 8898</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
  </middle>
  <back>
    <references pn="section-7">
      <name slugifiedName="name-normative-references">Normative References</name>
      <reference anchor="OPENID" quoteTitle="true" derivedAnchor="OPENID">
        <front>
          <title abbrev="OpenID">OpenID Connect Core 1.0</title>
          <author initials="N." surname="Sakimura" fullname="Nat Sakimura"/>
          <author initials="J." surname="Bradley" fullname="John Bradley"/>
          <author initials="M." surname="Jones" fullname="Michael Jones"/>
          <author initials="B." surname="de Medeiros" fullname="Breno de Medeiros"/>
          <author initials="C." surname="Mortimore" fullname="Chuck Mortimore"/>
          <date month="February" year="2014"/>
        </front>
      </reference>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" quoteTitle="true" derivedAnchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner" fullname="S. Bradner">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="1997" month="March"/>
          <abstract>
            <t indent="0">In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC3261" target="https://www.rfc-editor.org/info/rfc3261" quoteTitle="true" derivedAnchor="RFC3261">
        <front>
          <title>SIP: Session Initiation Protocol</title>
          <author initials="J." surname="Rosenberg" fullname="J. Rosenberg">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="H." surname="Schulzrinne" fullname="H. Schulzrinne">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="G." surname="Camarillo" fullname="G. Camarillo">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="A." surname="Johnston" fullname="A. Johnston">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Peterson" fullname="J. Peterson">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="R." surname="Sparks" fullname="R. Sparks">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="M." surname="Handley" fullname="M. Handley">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="E." surname="Schooler" fullname="E. Schooler">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2002" month="June"/>
          <abstract>
            <t indent="0">This document describes Session Initiation Protocol (SIP), an application-layer control (signaling) protocol for creating, modifying, and terminating sessions with one or more participants.  These sessions include Internet telephone calls, multimedia distribution, and multimedia conferences.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="3261"/>
        <seriesInfo name="DOI" value="10.17487/RFC3261"/>
      </reference>
      <reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234" quoteTitle="true" derivedAnchor="RFC5234">
        <front>
          <title>Augmented BNF for Syntax Specifications: ABNF</title>
          <author initials="D." surname="Crocker" fullname="D. Crocker" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="P." surname="Overell" fullname="P. Overell">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2008" month="January"/>
          <abstract>
            <t indent="0">Internet technical specifications often need to define a formal syntax.  Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications.  The current specification documents ABNF. It balances compactness and simplicity with reasonable representational power.  The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges.  This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="STD" value="68"/>
        <seriesInfo name="RFC" value="5234"/>
        <seriesInfo name="DOI" value="10.17487/RFC5234"/>
      </reference>
      <reference anchor="RFC6749" target="https://www.rfc-editor.org/info/rfc6749" quoteTitle="true" derivedAnchor="RFC6749">
        <front>
          <title>The OAuth 2.0 Authorization Framework</title>
          <author initials="D." surname="Hardt" fullname="D. Hardt" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2012" month="October"/>
          <abstract>
            <t indent="0">The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf.  This specification replaces and obsoletes the OAuth 1.0 protocol described in RFC 5849.  [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6749"/>
        <seriesInfo name="DOI" value="10.17487/RFC6749"/>
      </reference>
      <reference anchor="RFC6750" target="https://www.rfc-editor.org/info/rfc6750" quoteTitle="true" derivedAnchor="RFC6750">
        <front>
          <title>The OAuth 2.0 Authorization Framework: Bearer Token Usage</title>
          <author initials="M." surname="Jones" fullname="M. Jones">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="D." surname="Hardt" fullname="D. Hardt">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2012" month="October"/>
          <abstract>
            <t indent="0">This specification describes how to use bearer tokens in HTTP requests to access OAuth 2.0 protected resources.  Any party in possession of a bearer token (a "bearer") can use it to get access to the associated resources (without demonstrating possession of a cryptographic key).  To prevent misuse, bearer tokens need to be protected from disclosure in storage and in transport.   [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="6750"/>
        <seriesInfo name="DOI" value="10.17487/RFC6750"/>
      </reference>
      <reference anchor="RFC7230" target="https://www.rfc-editor.org/info/rfc7230" quoteTitle="true" derivedAnchor="RFC7230">
        <front>
          <title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
          <author initials="R." surname="Fielding" fullname="R. Fielding" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Reschke" fullname="J. Reschke" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2014" month="June"/>
          <abstract>
            <t indent="0">The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems.  This document provides an overview of HTTP architecture and its associated terminology, defines the "http" and "https" Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7230"/>
        <seriesInfo name="DOI" value="10.17487/RFC7230"/>
      </reference>
      <reference anchor="RFC7519" target="https://www.rfc-editor.org/info/rfc7519" quoteTitle="true" derivedAnchor="RFC7519">
        <front>
          <title>JSON Web Token (JWT)</title>
          <author initials="M." surname="Jones" fullname="M. Jones">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Bradley" fullname="J. Bradley">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="N." surname="Sakimura" fullname="N. Sakimura">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2015" month="May"/>
          <abstract>
            <t indent="0">JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties.  The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7519"/>
        <seriesInfo name="DOI" value="10.17487/RFC7519"/>
      </reference>
      <reference anchor="RFC7662" target="https://www.rfc-editor.org/info/rfc7662" quoteTitle="true" derivedAnchor="RFC7662">
        <front>
          <title>OAuth 2.0 Token Introspection</title>
          <author initials="J." surname="Richer" fullname="J. Richer" role="editor">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2015" month="October"/>
          <abstract>
            <t indent="0">This specification defines a method for a protected resource to query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token. OAuth 2.0 deployments can use this method to convey information about the authorization context of the token from the authorization server to the protected resource.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="7662"/>
        <seriesInfo name="DOI" value="10.17487/RFC7662"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" quoteTitle="true" derivedAnchor="RFC8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author initials="B." surname="Leiba" fullname="B. Leiba">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2017" month="May"/>
          <abstract>
            <t indent="0">RFC 2119 specifies common key words that may be used in protocol  specifications.  This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the  defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
    <references pn="section-8">
      <name slugifiedName="name-informative-references">Informative References</name>
      <reference anchor="RFC8252" target="https://www.rfc-editor.org/info/rfc8252" quoteTitle="true" derivedAnchor="RFC8252">
        <front>
          <title>OAuth 2.0 for Native Apps</title>
          <author initials="W." surname="Denniss" fullname="W. Denniss">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Bradley" fullname="J. Bradley">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2017" month="October"/>
          <abstract>
            <t indent="0">OAuth 2.0 authorization requests from native apps should only be made through external user-agents, primarily the user's browser.  This specification details the security and usability reasons why this is the case and how native apps and authorization servers can implement this best practice.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="212"/>
        <seriesInfo name="RFC" value="8252"/>
        <seriesInfo name="DOI" value="10.17487/RFC8252"/>
      </reference>
      <reference anchor="RFC8414" target="https://www.rfc-editor.org/info/rfc8414" quoteTitle="true" derivedAnchor="RFC8414">
        <front>
          <title>OAuth 2.0 Authorization Server Metadata</title>
          <author initials="M." surname="Jones" fullname="M. Jones">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="N." surname="Sakimura" fullname="N. Sakimura">
            <organization showOnFrontPage="true"/>
          </author>
          <author initials="J." surname="Bradley" fullname="J. Bradley">
            <organization showOnFrontPage="true"/>
          </author>
          <date year="2018" month="June"/>
          <abstract>
            <t indent="0">This specification defines a metadata format that an OAuth 2.0 client can use to obtain the information needed to interact with an OAuth 2.0 authorization server, including its endpoint locations and authorization server capabilities.</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="8414"/>
        <seriesInfo name="DOI" value="10.17487/RFC8414"/>
      </reference>
    </references>
    <section anchor="acknowledgments" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.a">
      <name slugifiedName="name-acknowledgments">Acknowledgments</name>
      <t indent="0" pn="section-appendix.a-1">The authors would like to specially thank <contact fullname="Paul       Kyzivat"/> for his multiple detailed reviews and suggested text that
      significantly improved the quality of the document.</t>
      <t indent="0" pn="section-appendix.a-2">The authors would also like to thank the following for their review
      and feedback on this document:</t>
      <t indent="0" pn="section-appendix.a-3"><contact fullname="Olle Johansson"/>, <contact fullname="Roman       Shpount"/>, <contact fullname="Dale Worley"/>, and <contact fullname="Jorgen Axell"/>.</t>
      <t indent="0" pn="section-appendix.a-4">The authors would also like to thank the following for their review
      and feedback of the original document that was replaced with this
      document:</t>
      <t indent="0" pn="section-appendix.a-5"><contact fullname="Andrew Allen"/>, <contact fullname="Martin       Dolly"/>, <contact fullname="Keith Drage"/>, <contact fullname="Paul       Kyzivat"/>, <contact fullname="Jon Peterson"/>, <contact fullname="Michael Procter"/>, <contact fullname="Roy Radhika"/>,
      <contact fullname="Matt Ryan"/>, <contact fullname="Ivo Sedlacek"/>,
      <contact fullname="Roman Shpount"/>, <contact fullname="Robert       Sparks"/>, <contact fullname="Asveren Tolga"/>, <contact fullname="Dale       Worley"/>, and <contact fullname="Yehoshua Gev"/>.</t>
      <t indent="0" pn="section-appendix.a-6"><contact fullname="Roman Danyliw"/>, <contact fullname="Benjamin       Kaduk"/>, <contact fullname="Erik Kline"/>, <contact fullname="Barry       Leiba"/>, <contact fullname="Eric Vyncke"/>, and <contact fullname="Magnus Westerlund"/>  provided feedback and suggestions for
      improvements as part of the IESG evaluation of the document. Special
      thanks to <contact fullname="Benjamin Kaduk"/> for his detailed and
      comprehensive reviews and comments.</t>
      <t indent="0" pn="section-appendix.a-7">The authors would also like to specially thank <contact fullname="Jean Mahoney"/> for her multiple reviews, editorial help, and
      the conversion of the XML source file from v2 to v3.</t>
    </section>
    <section anchor="authors-addresses" numbered="false" removeInRFC="false" toc="include" pn="section-appendix.b">
      <name slugifiedName="name-authors-addresses">Authors' Addresses</name>
      <author initials="R." surname="Shekh-Yusef" fullname="Rifaat Shekh-Yusef">
        <organization showOnFrontPage="true">Auth0</organization>
        <address>
          <postal>
            <street/>
            <city>Ottawa</city>
            <region>Ontario</region>
            <country>Canada</country>
          </postal>
          <phone/>
          <email>rifaat.s.ietf@gmail.com</email>
        </address>
      </author>
      <author initials="C." surname="Holmberg" fullname="Christer Holmberg">
        <organization showOnFrontPage="true">Ericsson</organization>
        <address>
          <postal>
            <street>Hirsalantie 11</street>
            <city>Jorvas</city>
            <code>02420</code>
            <region/>
            <country>Finland</country>
          </postal>
          <email>christer.holmberg@ericsson.com</email>
        </address>
      </author>
      <author initials="V." surname="Pascual" fullname="Victor Pascual">
        <organization showOnFrontPage="true">Nokia</organization>
        <address>
          <postal>
            <street/>
            <city>Barcelona</city>
            <country>Spain</country>
          </postal>
          <email>victor.pascual_avila@nokia.com</email>
        </address>
      </author>
    </section>
  </back>
</rfc>
