<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "http://xml.resource.org/authoring/rfc2629.dtd"
[
  <!ENTITY RFC2119 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
  <!ENTITY RFC4949 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4949.xml'>
  <!ENTITY RFC6749 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6749.xml'>
  <!ENTITY RFC7230 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7230.xml'>
  <!ENTITY RFC7480 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7480.xml'>
  <!ENTITY RFC7481 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7481.xml'>
  <!ENTITY RFC7482 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7482.xml'>
  <!ENTITY RFC7483 PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7483.xml'>
   
  <!ENTITY I-D.ietf-oauth-json-web-token PUBLIC ''
   'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-oauth-json-web-token.xml'>
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="4"?>
<?rfc compact="yes"?>
<?rfc subcompact="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc iprnotified="no"?>

<rfc category="bcp" docName="draft-hollenbeck-weirds-rdap-openid-02" ipr="trust200902">
  <front>
    <title abbrev="OpenID Connect for RDAP">Federated Authentication for the Registration Data Access Protocol (RDAP) using OpenID Connect</title>
    
    <author initials="S." surname="Hollenbeck" fullname="Scott Hollenbeck">
      <organization>Verisign Labs</organization>
      <address>
        <postal>
          <street>12061 Bluemont Way</street>
          <city>Reston</city>
          <region>VA</region>
          <code>20190</code>
          <country>USA</country>
        </postal>
        <email>shollenbeck@verisign.com</email>
        <uri>http://www.verisignlabs.com/</uri>
      </address>
    </author>

    <date/>
    <area>Applications</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <keyword>RDAP</keyword>
    <keyword>Federated</keyword>
    <keyword>Authentication</keyword>
    
    <abstract>
      <t>The Registration Data Access Protocol (RDAP) provides "RESTful" web services to retrieve registration metadata from domain name and regional internet registries. RDAP allows a server to make access control decisions based on client identity, and as such it includes support for client identification features provided by the Hypertext Transfer Protocol (HTTP). Identification methods that require clients to obtain and manage credentials from every RDAP server operator present management challenges for both clients and servers, whereas a federated authentication system would make it easier to operate and use RDAP without the need to maintain server-specific client credentials. This document describes a federated authentication system for RDAP based on OpenID Connect.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The Registration Data Access Protocol (RDAP) provides "RESTful" web services to retrieve registration metadata from domain name and regional internet registries. RDAP allows a server to make access control decisions based on client identity, and as such it includes support for client identification features provided by the Hypertext Transfer Protocol (HTTP) <xref target="RFC7230"/>.</t>
      
      <t>RDAP is specified in multiple documents, including "HTTP Usage in the Registration Data Access Protocol (RDAP)" <xref target="RFC7480"/>, "Security Services for the Registration Data Access Protocol (RDAP)" <xref target="RFC7481"/>, "Registration Data Access Protocol Query Format" <xref target="RFC7482"/>, and "JSON Responses for the Registration Data Access Protocol (RDAP)" <xref target="RFC7483"/>. RFC 7481 describes client identification and authentication services that can be used with RDAP, but it does not specify how any of these services can (or should) be used with RDAP.</t>
      
      <section anchor="problem" title="Problem Statement">
        <t>The traditional "user name and password" authentication method does not scale well in the RDAP ecosystem. Assuming that all domain name and address registries will eventually provide RDAP service, it is impractical and inefficient for users to secure login credentials from the hundreds of different server operators. Authentication methods based on user names and passwords do not provide information that describes the user in sufficient detail (while protecting the personal privacy of the user) for server operators to make fine-grained access control decisions based on the user's identity. The authentication system used for RDAP needs to address all of these needs.</t>
      </section>
      
      <section title="Proposal">
        <t>A basic level of RDAP service can be provided to users who possess an identifier issued by a recognized provider who is able to authenticate and validate the user. The identifiers issued by social media services, for example, can be used. Users who require higher levels of service (and who are willing to share more information about them self to gain access to that service) can secure identifiers from specialized providers who are or will be able to provide more detailed information about the user. Server operators can then make access control decisions based on the identification information provided by the user.</t>
            
        <t>A federated authentication system would make it easier to operate and use RDAP by re-using existing identifiers to provide a basic level of access. It can also provide the ability to collect additional user identification information, and that information can be shared with the consent of the user. This document describes a federated authentication system for RDAP based on OpenID Connect <xref target="OIDC"/> that meets all of these needs.</t>
      </section>
    </section>

    <section title="Conventions Used in This Document">
      <t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document are to be interpreted as described in RFC 2119 <xref target="RFC2119"/>.</t>
    </section>

    <section anchor="RDAP-FedAuth" title="Federated Authentication for RDAP">
      <t>RDAP itself does not include native security services. Instead, RDAP relies on features that are available in other protocol layers to provide needed security services including access control, authentication, authorization, availability, data confidentiality, data integrity, and identification. A description of each of these security services can be found in "Internet Security Glossary, Version 2" <xref target="RFC4949"/>. This document focuses on a federated authentication system for RDAP that provides services for authentication, authorization, and identification, allowing a server operator to make access control decisions. Section 3 of RFC 7481 <xref target="RFC7481"/> describes general considerations for RDAP access control, authentication, and authorization.</t>
        
      <t>The traditional client-server authentication model requires clients to maintain distinct credentials for every RDAP server. This situation can become unwieldy as the number of RDAP servers increases. Federated authentication mechanisms allow clients to use one credential to access multiple RDAP servers and reduce client credential management complexity.</t>

      <section anchor="RDAP-OIDC" title="RDAP and OpenID Connect">         
        <t>OpenID Connect 1.0 <xref target="OIDCC"/> is a decentralized, single sign-on (SSO) federated authentication system that allows users to access multiple web resources with one identifier instead of having to create multiple server-specific identifiers. Users acquire identifiers from Identity Providers, or IDPs. Relying Parties, or RPs, are applications (such as RDAP) that outsource their user authentication function to an IDP. OpenID Connect is built on top of the authorization framework provided by the OAuth 2.0 <xref target="RFC6749"/> protocol.</t>
                
        <t>The OAuth authorization framework describes a method for users to access protected web resources without having to hand out their credentials. Instead, clients are issued access tokens by authorization servers with the permission of the resource owners. Using OpenID Connect and OAuth, multiple RDAP servers can form a federation and clients can access any server in the federation by providing one credential registered with any IDP in that federation. The OAuth authorization framework is designed for use with HTTP and thus can be used with RDAP.</t>
      
        <section anchor="terms" title="Terminology">
          <t>This document uses the terms "client" and "server" defined by RDAP <xref target="RFC7480"/>. An RDAP client performs the role of an OpenID Connect Core <xref target="OIDCC"/> Entity or End-User. An RDAP server performs the role of an OpenID Connect Core Relying Party (RP). Additional terms from Section 1.2 of the OpenID Connect Core specification are incorporated by reference.</t>
        </section>
      
        <section anchor="overview" title="Overview">
          <t>At a high level, RDAP authentication of a browser-based client using OpenID Connect requires completion of the following steps:</t>
          
          <t><list style="numbers">
            <t>An RDAP client (acting as an OpenID End-User) sends an HTTP (or HTTPS) query containing OAuth 2.0 request parameters to an RDAP server.</t>
            <t>The RDAP server (acting as an OpenID Relying Party (RP)) prepares an Authentication Request containing the desired request parameters.</t>
            <t>The RDAP server sends the RDAP client and Authentication Request to an Authorization Server operated by an OpenID Provider (OP) using an HTTP redirect.</t>
            <t>The Authorization Server authenticates the RDAP Client.</t>
            <t>The Authorization Server obtains RDAP Client consent/authorization.</t>
            <t>The Authorization Server sends the RDAP Client back to the RDAP server with an Authorization Code using an HTTP redirect.</t>
            <t>The RDAP server requests a response using the Authorization Code at the Token Endpoint.</t>
            <t>The RDAP server receives a response that contains an ID Token and Access Token in the response body.</t>
            <t>The RDAP server validates the ID token and retrieves the RDAP client's Subject Identifier.</t>
            </list>
          </t>
          
          <t>The RDAP server can then make identification, authorization, and access control decisions based on local policies, the ID Token received from the OP, and the received Claims. Note that OpenID Connect describes different process flows for other types of clients, such as script-based or command line clients.</t>
        </section>
        
        <section anchor="process" title="RDAP Authentication and Authorization Steps">
          <t>End-Users MUST possess an identifier (an OpenID) issued by an OP to use OpenID Connect with RDAP. The OpenID Foundation maintains a list of OPs on its <eref target="http://openid.net/get-an-openid/">web site</eref>.</t>
          
          <t>OpenID Connect requires RPs to register with OPs to use OpenID Connect services for an End-User. That process is REQUIRED and is described by the "OpenID Connect Dynamic Client Registration" protocol <xref target="OIDCR"/>.</t>
      
          <section anchor="discovery" title="Provider Discovery">
            <t>An RDAP server/RP needs to receive an identifier from an End-User that can be used to discover the End-User's OP. That process is REQUIRED and is documented in the "OpenID Connect Discovery" protocol <xref target="OIDCD"/>.</t>
          </section>
      
          <section anchor="auth-request" title="Authentication Request">
            <t>Once the OP is known, an RP MUST form an Authentication Request and send it to the OP as described in Section 3 of the OpenID Connect Core protocol <xref target="OIDCC"/>. The authentication path followed (authorization, implicit, or hybrid) will depend on the Authentication Request response_type set by the RP. The remainder of the processing steps described here assume that the Authorization Flow is being used by setting "response_type=code" in the Authentication Request.</t>
            
            <t>The benefits of using the Authorization Flow for authenticating a human user are described in Section 3.1 of the OpenID Connect Core protocol. The Implicit Flow is more commonly used by clients implemented in a web browser using a scripting language; it is described in Section 3.2 of the OpenID Connect Core protocol. The Hybrid Flow (described in Section 3.3 of the OpenID Connect Core protocol) combines elements of the Authorization and Implicit Flows by returning some tokens from the Authorization Endpoint and others from the Token Endpoint.</t>
            
            <t>TBD: which of the optional request parameters should be specified?</t>
            
            <t>The OP receives the Authentication Request and attempts to validate it as described in Section 3.1.2.2 of the OpenID Connect Core protocol <xref target="OIDCC"/>. If the request is valid, the OP attempts to authenticate the End-User as described in Section 3.1.2.3 of the OpenID Connect Core protocol <xref target="OIDCC"/>. The OP returns an error response if the request is not valid or if any error is encountered.</t>
          </section>
      
          <section anchor="end-user-auth" title="End-User Authorization">
            <t>After the End-User is authenticated, the OP MUST obtain authorization information from the End-User before releasing information to the RDAP Server/RP. This process is described in Section 3.1.2.4 of the OpenID Connect Core protocol <xref target="OIDCC"/>.</t>
          </section>
      
          <section anchor="auth-valid" title="Authorization Response and Validation">
            <t>After the End-User is authenticated, the OP will send a response to the RP that describes the result of the authorization process in the form of an Authorization Grant. The RP MUST validate the response. This process is described in Sections 3.1.2.5 - 3.1.2.7 of the OpenID Connect Core protocol <xref target="OIDCC"/>.</t>
          </section>
      
          <section anchor="tokens" title="Token Processing">
            <t>The RP sends a Token Request using the Authorization Grant to a Token Endpoint to obtain a Token Response containing an Access Token, ID Token, and an OPTIONAL Refresh Token. The RP MUST validate the Token Response. This process is described in Sections 3.1.3 - 3.1.3.8 of the OpenID Connect Core protocol <xref target="OIDCC"/>.</t>
          </section>
      
          <section anchor="user-info" title="Delivery of User Information">
            <t>The set of Claims can be retrieved by sending a request to a UserInfo Endpoint using the Access Token. The Claims MAY be returned in the ID Token. The process of retrieving Claims from a UserInfo Endpoint is described in Sections 5.3 - 5.3.4 of the OpenID Connect Core protocol <xref target="OIDCC"/>.</t>
            
            <t>OpenID Connect specified a set of standard Claims in Section 5.1. Additional Claims for RDAP are described in <xref target="rdap-claims"/>.</t>
          </section>
        </section>
      
        <section anchor="rdap-reqs" title="Specialized Parameters for RDAP">
          <section anchor="rdap-claims" title="Claims">
            <t>OpenID Connect claims are pieces of information used to make assertions about an entity. Section 5 of the OpenID Connect Core protocol <xref target="OIDCC"/> describes a set of standard claims that can be used to identify a person. Section 5.1.2 notes that additional claims MAY be used, and it describes a method to create them.</t>
            
            <section anchor="stated-purpose" title="Stated Purpose">
              <t>There are communities of RDAP users and operators who wish to make and validate claims about a user's "need to know" when it comes to requesting access to a resource. For example, a law enforcement agent or a trademark attorney may wish to be able to assert that they have a legal right to access a protected resource, and a server operator will need to be able to receive and validate that claim. These needs can be met by defining and using an additional "purpose" claim.</t>
            
              <t>The "purpose" claim identifies the purpose for which access to a protected resource is being requested. The processing of this claim is subject the server acceptance of the purpose and successful authentication of the End-User. The "purpose" value is a case-sensitive string containing a StringOrURI value as specified in Section 2 of the JSON Web Token (JWT) specification (<xref target="I-D.ietf-oauth-json-web-token"/>). Use of this claim is OPTIONAL.</t>
            </section>
          </section>
        </section>
      </section>
    </section>

    <section anchor="access" title="Authentication and Access Control">
      <t>Having completed the client identification, authorization, and validation process, an RDAP server can make access control decisions based on a comparison of client-provided information and local policy. For example, a client who provides an email address (and nothing more) might be entitled to receive a subset of the information that would be available to a client who provides an email address, a full name, and a stated purpose. Development of these access control policies is beyond the scope of this document.</t>
    </section>
    
    <section title="Additional Questions and Discussion Topics">
      <t>This document describes a proposal that is almost certainly incomplete. For the time being this section will serve as a place to capture unanswered questions, topics for future discussion, and anything else that might deserve additional text in the future.</t>
      
      <t>Recursive or proxy RDAP servers: how might federated authentication work in a model where a subset of RDAP servers act as proxies to other RDAP servers? is it possible to cache user credentials in such a way that authentication process latency can be reduced?</t>
      
      <t>Additional claims: are there any other claims that need to be defined and registered?</t>
      
      <t>Implementations: does it make sense to add text describing existing implementations that can be used for experimentation?</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>IANA is requested to register the following value in the JSON Web Token Claims Registry:</t>
      
      <t><list style="none">
        <t>Claim Name: "purpose"</t>
        <t>Claim Description: The stated purpose for submitting a request to access a protected RDAP resource.</t>
        <t>Change Controller: Scott Hollenbeck, shollenbeck@verisign.com</t>
        <t>Specification Document(s): <xref target="stated-purpose"/> of this document.</t>
        </list>
      </t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Security considerations for RDAP can be found in RFC 7481 <xref target="RFC7481"/>. Security considerations for OpenID Connect Core <xref target="OIDCC"/> and OAuth <xref target="RFC6749"/> can be found in their reference specifications. OpenID Connect defines optional mechanisms for robust signing and encryption that can be used to provide data integrity and data confidentiality services as needed.</t>
    </section>

    <section title="Acknowledgements">
      <t>The author would like to acknowledge the following individuals for their contributions to this document: Rhys Smith and Jaromir Talir.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      &RFC2119;
      &RFC6749;
      &RFC7230;
      &RFC7480;
      &RFC7481;
      &RFC7482;
      &RFC7483;
      &I-D.ietf-oauth-json-web-token;
      <reference anchor="OIDC" target="http://openid.net/connect/">
        <front>
          <title>OpenID Connect</title>
          <author initials="" surname="">
            <organization>OpenID Foundation</organization>
          </author>
          <date month="" year="" />
        </front>
      </reference>
      <reference anchor="OIDCC" target="http://openid.net/specs/OIDCC-1_0.html">
        <front>
          <title>OpenID Connect Core incorporating errata set 1</title>
          <author initials="" surname="">
            <organization>OpenID Foundation</organization>
          </author>
          <date month="November" year="2014" />
        </front>
      </reference>
      <reference anchor="OIDCR" target="http://openid.net/specs/openid-connect-registration-1_0.html">
        <front>
          <title>OpenID Connect Dynamic Client Registration 1.0 incorporating errata set 1</title>
          <author initials="" surname="">
            <organization>OpenID Foundation</organization>
          </author>
          <date month="November" year="2014" />
        </front>
      </reference>
      <reference anchor="OIDCD" target="http://openid.net/specs/OIDCDovery-1_0.html">
        <front>
          <title>OpenID Connect Discovery 1.0 incorporating errata set 1</title>
          <author initials="" surname="">
            <organization>OpenID Foundation</organization>
          </author>
          <date month="November" year="2014" />
        </front>
      </reference>
    </references>

    <references title="Informative References">
      &RFC4949;
    </references>

    <section title="Change Log">
      <t>
        <list style="hanging">
          <t hangText="00:">Initial version.</t>
          <t hangText="01:">Updated flow description (<xref target="overview"/>) and description of the registration process (<xref target="process"/>). Thanks to Jaromir Talir.</t>
          <t hangText="02:">Updated flow description.</t>
        </list>
      </t>
    </section>
  </back>
</rfc>
