Network Working Group                                   T. Hardjono,                                     J. Richer, Ed.
Internet-Draft                                                       MIT                                     The MITRE Corporation
Intended status: Standards Track                             T. Hardjono
Expires: May 9, 2013                                                 MIT
                                                             M. Machulak
Expires: November 24, 2012
                                                    Newcastle University
                                                                E. Maler
                                                             XMLgrrl.com
                                                               C. Scholz
                                                         COM.lounge GmbH
                                                            May 23,
                                                             N. Sakimura
                                                                     NRI
                                                              J. Bradley
                                                           Ping Identity
                                                                M. Jones
                                                               Microsoft
                                                        November 5, 2012

               OAuth Dynamic Client Registration Protocol
                      draft-ietf-oauth-dyn-reg-00
                      draft-ietf-oauth-dyn-reg-01

Abstract

   This specification proposes an OAuth Dynamic Client Registration
   protocol.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on November 24, 2012. May 9, 2013.

Copyright Notice

   Copyright (c) 2012 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
     1.1.  Notational Conventions . . . . . . . . . . . . . . . . . .  3
     1.2.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  3
   2.  Use Cases  . . . . . . . . . . . . . . . . . . . . . . . . . .  4
   3.
     1.3.  Requirements . . . . . . . . . . . . . . . . . . . . . . . . .  5
     3.1.  4
       1.3.1.  The client needs to be uniquely identifiable by
               the authorization server . . . . . . . . . . . . . . . . . . .  5
     3.2.  4
       1.3.2.  The authorization server must collect metadata
               about a client for later user interaction  . . . . . . . . . . . .  5
     3.3.  4
       1.3.3.  The authorization server must should have the option of
               strongly authenticating the client and its metadata  . . .  5
     3.4.  4
       1.3.4.  Dynamic client registration must be possible from
               both web-server applications and applications with
               other capabilities and limitations, such as native
               applications . . . . . . . . . . . . . . . . . . . . . . .  6
     3.5.  4
       1.3.5.  Transaction integrity must be ensured in large
           deployments where data propagation can be an issue . .  . .  6
     3.6.  Use of standardized discovery protocol . . . . . . .  5
   2.  Client Registration Endpoint . . .  6
     3.7.  UMA design principles and requirements . . . . . . . . . .  7
   4.  Analysis of Registration Flow Options . . . .  5
     2.1.  Client Association Request . . . . . . . .  7
   5.  Client Registration with Pushed Metadata . . . . . . . .  6
     2.2.  Client Association Response  . . .  8
     5.1.  Client Registration Request . . . . . . . . . . . .  8
     2.3.  Client Update Request  . . .  9
     5.2.  Client Registration Response . . . . . . . . . . . . . . . 10
     5.3.  Error  9
     2.4.  Client Update Response . . . . . . . . . . . . . . . . . . 10
     2.5.  Rotate Secret Request  . . . . 11
   6.  Client Registration with Pushed URL and Pulled Metadata . . . 12
     6.1.  Client Registration Request . . . . . . . . . . . 11
     2.6.  Rotate Secret Response . . . . 13
     6.2.  Client Discovery . . . . . . . . . . . . . . 11
     2.7.  Client Registration Error Response . . . . . . . 13
     6.3.  Client Registration Response . . . . . 12
   3.  Client Metadata  . . . . . . . . . . 13
     6.4.  Error Response . . . . . . . . . . . . . 13
   4.  IANA Considerations  . . . . . . . . . 14
   7.  Native Application Client Registration . . . . . . . . . . . . 15
   8.
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . . 16
   9. 15
   6.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 17
   10. 16
   7.  Document History . . . . . . . . . . . . . . . . . . . . . . . 17
   11. 16
   8.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 17
     11.1.
     8.1.  Normative References . . . . . . . . . . . . . . . . . . . 17
     11.2.
     8.2.  Non-Normative References . . . . . . . . . . . . . . . . . 18
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 18 19

1.  Introduction

   This draft discusses a number of requirements for and approaches to
   automatic registration of clients with an OAuth authorization server,
   with special emphasis on the needs of the OAuth-based User-Managed
   Access protocol [UMA-Core].  This draft also proposes a dynamic
   registration protocol for an OAuth authorization server.

   In some use-case scenarios scenarios, it is desirable or necessary to allow
   OAuth clients to obtain authorization from an OAuth authorization
   server without the two parties having previously interacted.
   Nevertheless, in order for the authorization server to accurately
   represent to end-users which client is seeking authorization to
   access the end-user's resources, a method for automatic and unique
   registration of clients is needed.  The goal of this proposed registration protocol is for an OAuth2 authorization server to provide a client with a client identifier
   framework does not define how the relationship between the Client and
   optionally
   the Authorization Server is initialized, or how a given client secret in is
   assigned a dynamic fashion.  To accomplish this, unique Client Identifier.  Historically, this has happened
   out-of-band from the authorization server must first be provided OAuth protocol.  This draft provides a mechanism
   for a client to register itself with information
   about the client, with Authorization Server, which
   can be used to dynamically provision a Client Identifier, and
   optionally a Client Secret.

   As part of the client-name being registration process, this specification also defines
   a mechanism for the minimal information
   provided.  In practice, additional information will need to be
   furnished client to present the authorization server, Authorization Server with a
   set of meta information, such as the client's homepage,
   icon, description, a display name and so on.

   The dynamic registration protocol proposed here is envisioned icon to be
   an additional task
   presented to be performed by the OAuth user during the authorization server,
   namely registration of step.  This draft
   provides a new method for the client identifier and optional secret to register and the issuance of update this
   information to the client.  This task would
   occur prior to the point at which the client wields its identifier
   and secret at the authorization server in order to obtain an access
   token in normal OAuth fashion. over time.

1.1.  Notational Conventions

   The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT',
   'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this
   document are to be interpreted as described in [RFC2119].

   Unless otherwise noted, all the protocol parameter names and values
   are case sensitive.

1.2.  Terminology
   resource server
         A server capable of accepting

   This specification uses the terms "Access Token", "Refresh Token",
   "Authorization Code", "Authorization Grant", "Authorization Server",
   "Authorization Endpoint", "Client", "Client Identifier", "Client
   Secret", "Protected Resource", "Resource Owner", "Resource Server",
   and responding to protected
         resource requests.

   resource owner "Token Endpoint" defined by OAuth 2.0 [OAuth2.0].

   This specification defines the following additional terms:

   o  Client Registration Endpoint: The OAuth 2.0 Endpoint through which
      a Client can request new registration and manage the metadata
      associated with it.

   o  Registration Access Token: An entity capable of granting access OAuth 2.0 Bearer Token issued by the
      Authorization Server through the Client Registration Endpoint
      which is used by the Client to a protected resource. authenticate itself during update
      and secret rotation operations.

1.3.  Requirements

   [[ Following are proposed requirements for dynamic client
         An application obtaining authorization
   registration.  This section is intended for discussion and making protected
         resource requests.

   authorization server
         A server capable of issuing tokens after successfully
         authenticating will
   likely be removed in the resource owner and obtaining authorization. final draft. ]]

1.3.1.  The authorization server may client needs to be uniquely identifiable by the same server as the resource
         server, or a separate entity.
        authorization manager
         An UMA-defined variant of an authorization server that carries
         out an authorizing user's policies governing access to a
         protected resource.

   end-user authorization endpoint
         The authorization server's HTTP endpoint capable of
         authenticating the end-user and obtaining authorization.

   token endpoint
         The authorization server's HTTP endpoint capable of issuing
         tokens and refreshing expired tokens.

   client identifier
         An unique identifier issued to the client to identify itself to
         the authorization server.  Client identifiers may have a
         matching secret.

   client registration endpoint  The authorization server's HTTP
         endpoint capable of issuing client identifiers and optional
         client secrets.

2.  Use Cases

   The UMA protocol involves two instances of OAuth flows.  In the
   first, an end-user introduces a host (essentially an enhanced OAuth
   resource server) to an authorization manager (an enhanced OAuth
   authorization server) as a client of it, possibly without that host
   having obtained client identification information from that server
   previously.  In the second, a requester (an enhanced OAuth client)
   approaches a host and authorization manager to get and use an access
   token in approximately the normal OAuth fashion, again possibly
   without that client having obtained client identification information
   from that server previously.  Both the host-as-client and the
   requester-as-client thus may need dynamic client registration in
   order for the UMA protocol flow to proceed.

   The needs for inter-party trust vary in different UMA use cases.  In
   lightweight Web circumstances such as person-to-person calendar
   sharing, dynamic registration is entirely appropriate.  In cases
   where high-sensitivity information is being protected or where a
   regulatory environment puts constraints on the building of trust
   relationships, such as sharing health records with medical
   professionals or giving access to tax records to outsourced
   bookkeeping staff, static means of provisioning client identifiers
   may be imposed.

   More information about UMA use cases is available at [UMA-UC].

3.  Requirements

   Following are proposed requirements for dynamic client registration.

3.1.  The client needs to be uniquely identifiable by the authorization
      server

   In order for server

   In order for an authorization server to do proper user-delegated
   authorization and prevent unauthorized access it must be able to
   identify clients uniquely.  As is done today in OAuth, the client
   identifier (and optional secret) should thus be issued by the
   authorization server and not simply accepted as proposed by the
   client.

3.2.

1.3.2.  The authorization server must collect metadata about a client
        for later user interaction

   In order for the authorization server to describe a client to an end-
   user in an authorization step it needs information about the client.
   This can be the client name at a minimum, but today servers usually
   request at least a description, a homepage URL, and an icon when
   doing manual registration.

3.3.

1.3.3.  The authorization server must should have the option of strongly
        authenticating the client and its metadata

   In order to prevent spoofing of clients and enable dynamic building
   of strong trust relationships, the authorization server should have
   the option to verify the provided information.  This might be solved
   using message signature verification; relatively weaker
   authentication might be achieved in a simpler way by pulling metadata
   from a trusted client URL.

3.4. verification.

1.3.4.  Dynamic client registration must be possible from both web-server web-
        server applications and applications with other capabilities and
        limitations, such as native applications

   In the UMA context, alternative types

   Each instance of applications might serve as
   both hosts (for example, as a device-based personal data store) and
   requesters (for example, to subscribe to a calendar or view a photo).
   Such applications, particularly native applications, may have special
   limitations, so new solutions to meeting the set of requirements
   presented here may be needed.  We anticipate that each instance of a
   native application (that is, application (that is, the specific instance
   running on each device) that is installed and run by the same user
   may need the option of getting a unique client identifier.  In this
   case, there are implications around gathering and displaying enough
   information to ensure that the end-user is delegating authorization
   to the intended application.

3.5.  The registration protocol should be
   simple and flexible enough to allow for multiple types of
   applications.

1.3.5.  Transaction integrity must be ensured in large deployments where
      data propagation can be an issue

   When a client sends information to a server endpoint, it might take
   time for this data to propagate through big server installations that
   spread across various data centers.  Care needs to be taken that
   subsequent interactions with the user after the registration process,
   such as an authorization request, show the correct data.

   In the UMA context, dynamic registration of a host at

2.  Client Registration Endpoint

   The Client Registration Endpoint is an AM OAuth 2.0 Endpoint defined in
   this document that is almost
   certain designed to take place in the middle of an introduction and
   authorization process mediated by the end-user; even though the host
   needs allow a client identifier from the AM no matter which end-user caused
   the registration process to take place, the end-user may need to wait
   for the registration sub-process to finish in order Client to continue register itself
   with the overall process.  It may be necessary to ensure that the host
   interacts Authorization Server.  The Client Registration Endpoint MUST
   accept HTTP POST messages with request parameters encoded in the same AM server throughout.

3.6.  Use of standardized discovery protocol

   Regardless of flow option,
   entity body using the client needs "application/x-www-form-urlencoded" format.
   The Client Registration Endpoint MUST be protected by a transport-
   layer security mechanism when sending requests to discover the
   authorization server's client registration endpoint. Registration
   Endpoint.  The client server MUST
   use the [RFC5785] support TLS 1.2 RFC 5246 [RFC5246] and/or
   TLS 1.0 [RFC2246] and [hostmeta] discovery MAY support additional transport-layer
   mechanisms to learn the
   URI of the client registration endpoint at meeting its security requirements.  When using TLS, the authorization server.
   The authorization server
   Client MUST provide perform a host-meta document that
   clearly TLS/SSL server certificate check, per RFC 6125
   [RFC6125].

   The Endpoint defines the registration end-point at the server.

3.7.  UMA design principles and requirements

   In addition to general requirements for dynamic three operations that a client registration,
   UMA seeks to optimize for the design principles and requirements
   found in the UMA Requirements document [UMA-Reqs], most particularly:

   o  DP1: Simple to understand, implement in an interoperable fashion,
      and deploy can take on an Internet-wide scale it,
   switched by the "operation" parameter:

   o  DP6: Able to be combined and extended to support  client_associate: generate a variety of use
      cases new Client Identifier (and optionally
      a Client Secret) and emerging application functionality

   o  DP8: Avoid adding crypto requirements beyond what existing web app
      implementations do today

   o  DP10: Complexity should be borne by associate it with the authorization endpoint vs.
      other endpoints

4.  Analysis set of Registration Flow Options

   This section analyzes some options for exchanging client presented
      metadata for (Section 3)

   o  client_update: update the metadata (Section 3) associated with a client identifier and optional secret.

   It currently seems impossible to specify
      Client Identifier

   o  rotate_secret: issue a single registration flow
   that will satisfy all requirements, deployment needs, and client
   types.  This document, therefore, presents as small new Registration Access Token and, if
      applicable, a variety of
   options as possible.  If it is possible to construct Client Secret for a single unified
   flow in the ultimate design, all other things being equal this would
   be preferred. Client provides metadata on every request

   In this approach, the client passes all necessary metadata such
         as its name and icon on every request order to facilitate registered clients updating their information,
   the authorization
         server, and the client doesn't wield Client Registration Endpoint issues a client identifier as
         such.  This option makes it more difficult (though not
         impossible) request_access_token for
   clients to meet securely identify themselves in future connections.  As
   such, the first Endpoint MUST accept requests with OAuth 2.0 Bearer Tokens
   [OAuth.Bearer] for these operations.

   In order to support open registration and second requirements since
         different clients could theoretically represent themselves facilitate wider
   interoperability, the Client Registration Endpoint SHOULD allow
   client_associate requests with no further authentication.  These
   requests MAY be rate-limited to prevent a denial-of-service attack on
   the Client Registration Endpoint.

   In addition, the Client Registration Endpoint MAY accept an initial
   authorization server with the same metadata and credential in the same
         client could represent itself on subsequent visits with
         different metadata.  Also, today's form of an OAuth protocol requires 2.0 [OAuth2.0]
   access token in order to limit registration to only previously
   authorized parties.  The method by which this access token is
   obtained by the
         use registrant is generally out-of-band and is out of a client identifier.  Because
   scope of the UMA simplicity
         principle we do not recommend this flow option and specification.

   These two aspects, operation selection and have not
         provided a candidate solution.

   Client pushes metadata
         In this approach, the client discovers the registration
         endpoint authentication, are
   represented by two parameters common to all operations:

   operation  REQUIRED.  Values are "client_associate" (for new
      registrations), "rotate_secret" to request rotation of the authorization server
      "client_secret", and sends its metadata
         directly "client_update" (for updating parameters of
      an existing "client_id").

   access_token  OPTIONAL.  An OAuth2 Bearer token used to that endpoint in a standard format.  The
         authorization server answers with a client identifier and
         optional secret in access the response.
      Client Registration Endpoint, as defined in OAuth2 Bearer.  This approach may
      parameter MUST NOT be
         necessary in cases where sent if the client Access Token is behind a firewall, but
         strong authentication sent in the HTTP
      Authorization header as described in Section 7.1 of OAuth 2.0
      [OAuth2.0].  Access Tokens sent in the client metadata may authorization header must
      be more
         difficult or costly with this approach than with OAuth 2.0 Bearer Tokens [OAuth.Bearer].

   Each operation takes a "pull"
         approach, discussed just different parameter set, and all operations
   are described below.  Further, this approach is
         problematic in the case of applications that can't function as
         POST-capable web servers.  A proposal for "push" is presented
         in this document.

   The Client pushes URL, server pulls metadata from Registration Endpoint MUST ignore all parameters it
         In this approach, does
   not understand.

2.1.  Client Association Request

   This operation registers a new client to the Authorization Server.
   The Authorization Server assigns this client sends only a URL to unique Client
   Identifier, optionally assigns a Client Secret, and associates the
         authorization server, which then uses that URL to pull
   metadata
         about the client in some standard format, returning
         identification information given in the response to the initial
         request.  This approach more easily allows for strong
         authentication of clients because request with the metadata can be
         statically signed.  (The message containing issued Client Identifier.  The
   request includes the URL could be
         signed two parameters described above as well.)  However, caution should be exercised around
         the propagation issue if well as any
   parameters described in Client Metadata (Section 3).

   operation  REQUIRED, MUST have the initial URL push is made value "client_associate"

   access_token  OPTIONAL, used to restrict new client registration
   redirect_uris
      REQUIRED

   client_name  RECOMMENDED

   client_url
      RECOMMENDED

   logo_url  OPTIONAL

   contacts  OPTIONAL

   tos_url  OPTIONAL

   token_endpoint_auth_method  OPTIONAL

   policy_url  OPTIONAL

   jwk_url  OPTIONAL

   jwk_encryption_url  OPTIONAL

   x509_url  OPTIONAL

   x509_encryption_url  OPTIONAL

   require_signed_request_object  OPTIONAL

   default_max_age  OPTIONAL

   default_acr  OPTIONAL

   For example, a
         server different from client could send the one following registration request
   to the end-user is interacting with.
         Further, this approach Client Registration Endpoint:

   Following is problematic in a non-normative example request (with line wraps for
   display purposes only):
   POST /register HTTP/1.1
   Accept: application/x-www-form-urlencoded
   Host: server.example.com
   Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJ ... fQ.8Gj_-sj ... _X

   operation=client_associate
   &redirect_uris=https://client.example.org/callback
       %20https://client.example.org/callback2
   &client_name=My%20Example%20
   &logo_url=https://client.example.org/logo.png
   &token_endpoint_auth_type=client_secret_basic
   &jwk_url=https://client.example.org/my_rsa_public_key.jwk

2.2.  Client Association Response

   Upon successful association, the case of
         applications Client Registration Endpoint returns
   the newly-created Client Identifier and, optionally, a Client Secret.
   The response also contains a Registration Access Token that cannot themselves serve as "pull-able"
         metadata repositories.  A proposal for "pull" is presented in
         this document.

   Native-app to be
   used by the client collaborates with home-base web app to provide
   metadata
         An instance of a native application (for example, on a mobile
         device) may have difficulty directly conveying trustworthy
         metadata but may also have difficulty providing a trustworthy
         third-party source from which perform subsequent operations at this endpoint.
   These items are returned as a server can pull metadata.  This JSON document explores one option for meeting with the requirements, but
         does not present a full-fledged proposal.

5. following fields
   as top-level members of the root JSON object.

   client_id  REQUIRED.  The unique Client Registration with Pushed Metadata identifier, MUST NOT be
      currently valid for any other registered Client.

   client_secret  OPTIONAL.  The Client secret.  This registration flow works as follows:

   1. MUST be unique for
      each "client_id".  This value us used by confidential clients.  It
      is not required for clients selecting a token_endpoint_auth_type
      of "private_key_jwt"

   registration_access_token  REQUIRED The client sends its metadata in JSON form Access token to be used by
      the client
       registration endpoint. to perform "client_update" and "rotate_secret"
      requests.

   issued_at
      OPTIONAL.  Specifies the timestamp when the identifier was issued.
      The client timestamp value MUST send its name,
       description, and redirection URI and MAY send be a URI for its icon. positive integer.  The client MAY sign value is
      expressed in the metadata number of seconds since January 1, 1970 00:00:00
      GMT.

   expires_at  OPTIONAL.  The number of seconds from 1970-01-01T0:0:0Z
      as a JSON Token issuer, using
       the mechanisms defined measured in [OAuth-Sig].

   2.  The authorization server checks the data, verifying UTC that the signature
       as necessary, "client_secret" will expire or "0" if
      they do not expire.  See RFC 3339 [RFC3339] for details regarding
      date/times in general and returns UTC in particular.

   Following is a client identifier and an optional
       client secret.

     +--------+                                  +---------------+
     | non-normative example response:
   HTTP/1.1 200 OK
   Content-Type: application/json
   Cache-Control: no-store

   {
    "client_id":"s6BhdRkqt3",
    "client_secret":
     "cf136dc3c1fd9153029bb9c6cc9ecead918bad9887fce6c93f31185e5885805d",
     "registration_access_token": "this.is.a.access.token.value.ffx83",
    "expires_at":2893276800
   }

2.3.  Client |--(A)--- Registration Update Request --->| Authorization |
     |        |

   This operation updates a previously-registered client with Metadata            |     Server    |
     |        |                                  |               |
     |        |<-(B)----Registration Response ---|               |
     |        | new
   metadata at the Authorization Server.  This request MUST be protected
   by the Registration Authorization Token associated with the Client ID Info      |               |
     +--------+                                  +---------------+

          Figure 1:
   Identifier.  This request MAY include any fields described in Client Registration Flow with Pushed
   Metadata

5.1.  Client Registration Request (Section 3).  The client sends values of Client Metadata fields in this
   request MUST replace (not augment) the values previously associated
   with this client_identifier.  Empty values in Client Metadata SHOULD
   be taken as a JSON formatted document request to clear any existing value of that field.

   operation  REQUIRED, MUST have the client registration
   endpoint.  The client includes value "client_update"

   access_token  REQUIRED, unless presented in the following parameters Authorization Header
      as in OAuth2 Bearer [OAuth.Bearer].  The Registration Access Token
      that was issued during the
   request:

   type
         REQUIRED.  This parameter must be set to "push". client_associate step, or previous
      client_update or rotate_secret calls.

   redirect_uris
      REQUIRED

   client_name
         REQUIRED.  This field contains  RECOMMENDED

   client_url
      RECOMMENDED

   logo_url  OPTIONAL

   contacts  OPTIONAL

   tos_url  OPTIONAL
   token_endpoint_auth_method  OPTIONAL

   policy_url  OPTIONAL

   jwk_url  OPTIONAL

   jwk_encryption_url  OPTIONAL

   x509_url  OPTIONAL

   x509_encryption_url  OPTIONAL

   require_signed_request_object  OPTIONAL

   default_max_age  OPTIONAL

   default_acr  OPTIONAL

   For example, a human-readable name of client could send the
         client.

   client_url
         REQUIRED.  This field contains following registration request
   to the Client Registration Endpoint:

   Following is a non-normative example request (with line wraps for
   display purposes only):
   POST /register HTTP/1.1
   Accept: application/x-www-form-urlencoded
   Host: server.example.com
   Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJ ... fQ.8Gj_-sj ... _X

   operation=client_update
   &redirect_uris=https://client.example.org/callback
       %20https://client.example.org/callback2
   &client_name=My%20Example%20
   &logo_url=https://client.example.org/logo.png
   &token_endpoint_auth_type=client_secret_basic
   &jwk_url=https://client.example.org/my_rsa_public_key.jwk

2.4.  Client Update Response

   Upon successful update, the URL of Client Registration Endpoint returns a
   JSON document with the homepage following fields as top-level members of the
         client.

   client_description
   root JSON object.

   client_id  REQUIRED.  This field contains  The unique Client identifier, MUST NOT be
      currently valid for any other registered Client.

   Following is a text description of non-normative example response:
   HTTP/1.1 200 OK
   Content-Type: application/json
   Cache-Control: no-store

   {
    "client_id":"s6BhdRkqt3",
   }

   [[ Editor's note: should this return the
         client.

   client_icon
         OPTIONAL.  This field contains a URL for an icon entire client data object,
   for confirmation and review, including any fields that may have been
   asserted by the
         client.

   redirect_url
         REQUIRED. AS? ]]

2.5.  Rotate Secret Request

   This field contains operation allows the URL client to which the
         authorization server should send rotate its response.

   The client MAY include additional metadata in current Client Secret,
   if it has one.  If the client has not been issued a Client Secret,
   this operation is an error. [[ Editor's note: could this request and be
   used to rotate the
   authorization server MAY ignore this additional information.

   For example, Registration Access Token, even when there's not a
   client_secret?  Should something else be used to rotate the client might send token
   independently?  This is an open issue. ]]

   operation  REQUIRED.  MUST have the following request: value rotate_secret

   access_token  REQUIRED.  The Registration Access Token that was
      issued during the client_associate step, or previous client_update
      or rotate_secret calls.

   Following is a non-normative example request (with line wraps for
   display purposes only):
   POST /register HTTP/1.1
   Accept: application/x-www-form-urlencoded
   Host: server.example.com
       Content-Type: application/json

       {
         type: "push",
         client_name: "Online Photo Gallery",
         client_url:  "http://onlinephotogallery.com",
         client_description: "Uploading and also editing capabilities!",
         client_icon: "http://onlinephotogallery.com/icon.png",
         redirect_url: "https://onlinephotogallery.com/client_reg"
       }

   The parameters are included in the entity body
   Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJ ... fQ.8Gj_-sj ... _X

   operation=rotate_secret

2.6.  Rotate Secret Response

   Upon successful rotation of the HTTP request
   using client secret, the "application/json" media type as defined by [JSON].  The
   parameters are serialized into Client
   Registration Endpoint returns a JSON structure by adding each
   parameter at document with the highest structure level.  Parameter names and string
   values are included following
   fields as top-level members of the root JSON strings.

5.2. object.

   client_id  REQUIRED.  The unique Client Registration Response

   After receiving and verifying information received from the client,
   the authorization server issues a client identifier and an optional
   client secret, and constructs the response identifier, MUST NOT be
      currently valid for any other registered Client.

   client_secret  REQUIRED.  The Client secret.  This MUST be unique for
      each "client_id".

   registration_access_token  REQUIRED The Access token to be used by adding
      the following
   parameters client to the entity body of the HTTP response with a 200 status
   code (OK):

   client_id
         REQUIRED.

   client_secret
         OPTIONAL. perform subsequent "client_update" and
      "rotate_secret" requests.

   issued_at
      OPTIONAL.  Specifies the timestamp when the identifier was issued.
      The timestamp value MUST be a positive integer.  The value is
      expressed in the number of seconds since January 1, 1970 00:00:00
      GMT.

   expires_in
         OPTIONAL; if supplied, the "issued_at" parameter is REQUIRED.
         Specifies the valid lifetime, in seconds, of the identifier.
         The value is represented in base 10 ASCII.

   expires_at  OPTIONAL.  The parameters are included in the entity body number of the HTTP response
   using the "application/json" media type seconds from 1970-01-01T0:0:0Z
      as defined by [JSON].  The
   parameters are serialized into a JSON structure by adding each
   parameter at measured in UTC that the highest structure level.  Parameter names "client_secret" will expire or "0" if
      they do not expire.  See RFC 3339 [RFC3339] for details regarding
      date/times in general and string
   values are included as JSON strings.

   The authorization server MUST include the HTTP "Cache-Control"
   response header field with a value of "no-store" UTC in any response
   containing "client_secret".

   For example, the authorization server might return the following particular.

   Following is a non-normative example response:
   HTTP/1.1 200 OK
   Content-Type: application/json
   Cache-Control: no-store

   {
         client_id: "5UO9XcL4TQTa",
         client_secret: "WdRKN3zeTc20"
    "client_id":"s6BhdRkqt3",
    "client_secret":
     "cf136dc3c1fd9153029bb9c6cc9ecead918bad9887fce6c93f31185e5885805d",
     "registration_access_token": "this.is.a.access.token.value.ffx83",
    "expires_at":2893276800
   }

5.3.

2.7.  Client Registration Error Response

   If the request for registration is invalid or unauthorized, the
   authorization server constructs the response by adding the following
   parameters to

   When an OAuth error condition occurs, the entity body Client Registration
   Endpoint returns an Error Response as defined in Section 5.2 of the HTTP response with
   OAuth 2.0 specification.

   When a registration error condition occurs, the Client Registration
   Endpoint returns a HTTP 400 status code (Bad Request) using including a JSON object
   describing the "application/json" media type:

   o  "error" (REQUIRED).

   o  "error_description" (OPTIONAL).  Human-readable text providing
      additional information, used to assist error in the understanding and
      resolution of the response body.

   The JSON object contains two members:

   error occurred.

   o  "error_uri" (OPTIONAL).  A URI identifying  The error code, a human-readable web
      page with information about the error, used to provide the end-
      user with single ASCII string.

   error_description  The additional information about text description of the error.

   An example error response (with line breaks for readability):
      debugging.

   This specification defines the following error codes:

   invalid_operation  The value of "operation" is invalid or not
      supported.

   invalid_redirect_uri  The value of one or more "redirect_uris" is
      invalid.

   invalid_client_metadata  The value of one of the client metadata
      (Section 3) fields is invalid.

   Following is a non-normative example of an error response:
HTTP/1.1 400 Bad Request
Content-Type: application/json
Cache-Control: no-store

{
       "error": "unauthorized_client",
       "description": "This client is not on
 "error":"invalid_operation",
 "error_description":"The value of the
         white list operation parameter must be one of this Authorization Server." client_associate, rotate_secret or client_update."
}

6.

3.  Client Registration with Pushed URL and Pulled Metadata

   This registration flow works as follows:

   1.  The client sends its

   Clients generally have an array of metadata URI to the client registration
       endpoint.  The client MAY sign associated with their
   unique Client Identifier at the metadata Authorization Server.  These can
   range from human-facing display strings, such as a JSON Token
       issuer, using the mechanisms defined in [OAuth-Sig].

   2.  The authorization server verifies client name, to
   items that impact the signature as necessary, and
       uses security of the [RFC5785] protocol,

   Extensions and [hostmeta] discovery mechanisms profiles of this specification MAY expand this list,
   but MUST at least accept all parameters on this
       URI to retrieve the host-meta document describing the client. list.  The host-meta document MUST contain the client name, description,
       and redirection URI, and MAY contain a URI for the client icon.

     +--------+                                  +---------------+
     | Client |--(A)--- Registration Request --->|
   Authorization |
     |        |         with URL                 | Server    |
     |        |                                  |               |
     |        |<-(B)--- Client Discovery --------|               |
     |        |                                  |               |
     |        |--(C)---- Host-Meta Document ---->|               |
     |        |                                  |               |
     |        |<-(D)--- Registration Response ---|               |
     |        |         with Client ID Info      |               |
     +--------+                                  +---------------+

       Figure 2: MUST ignore any additional parameters sent by
   the Client Registration Flow with Pushed URL and Pulled
                                 Metadata

6.1. that it does not understand.

   redirect_uris
      REQUIRED A space-delimited list of redirect URIs.

   client_name  RECOMMENDED.  Human-readable name of the Client Registration Request

   The client sends a JSON formatted document to the client registration
   endpoint.  The client includes the following parameters in the
   request:

   type
         REQUIRED.  This parameter must be set
      presented to "pull". the user.

   client_url
         REQUIRED.
      RECOMMENDED.  This field contains the URL of the homepage of the
      client.

   The client MUST NOT include other metadata parameters, such as those
   defined in the pushed-metadata scenario.

   For example, the client might send the following request:

       POST /register HTTP/1.1
       Host: server.example.com
       Content-Type: application/json

       {
         type: "pull",
         url: "http://onlinephotogallery.com"
       }

   The parameters are included in the entity body of the HTTP request
   using the "application/json" media type as defined by [JSON].  The
   parameters are serialized into a JSON structure by adding each
   parameter at the highest structure level.  Parameter names and string
   values are included as JSON strings.

6.2.  Client Discovery

   The authorization server evaluates this request and MAY perform a
   [RFC5785] and [hostmeta] discovery mechanism on the provided

   logo_url  OPTIONAL.  A URL to
   the host-meta document that references a logo for the client.

6.3. Client Registration Response

   After receiving and verifying information retrieved from the client,
      application.  If present, the authorization server issues the client identifier and an optional
   client secret, and constructs the response by adding the following
   parameters SHOULD display this image to
      the entity body end user during approval.

   contacts  OPTIONAL.  Space delimited list of email addresses for
      people allowed to administer the HTTP response with information for this Client.
      This is used by some providers to enable a 200 status
   code (OK):

   o  "client_id" (REQUIRED)

   o  "client_secret" (OPTIONAL)

   The parameters are included in web UI to modify the entity body
      Client information.

   tos_url  OPTIONAL.  URL that points to a human-readable Terms of
      Service for the HTTP response
   using Client.  The Authorization Server SHOULD display
      this URL to the "application/json" media End-User if it is given.

   token_endpoint_auth_method  OPTIONAL.  The requested authentication
      type as defined by [JSON]. for the Token Endpoint.  The
   parameters options are serialized into a JSON structure
      "client_secret_post", "client_secret_basic", "client_secret_jwt",
      and "private_key_jwt".  Other Authentication methods may be
      defined by adding each
   parameter at the highest structure level.  Parameter names and string
   values are included as JSON strings.

   The authorization server MUST include the HTTP "Cache-Control"
   response header field with a value of "no-store" in any response
   containing the "client_secret".

   For example the authorization server might return the following
   response:

       HTTP/1.1 200 OK
       Content-Type: application/json
       Cache-Control: no-store

       {
         "client_id":"5UO9XcL4TQTa",
         "client_secret":"WdRKN3zeTc20"
       }

6.4.  Error Response extension.  If the request for registration is invalid unspecified or unauthorized, the
   authorization server constructs the response by adding the following
   parameters to the entity body of omitted, the default is
      "client_secret_basic" HTTP response with a 400 status
   code (Bad Request) using the "application/json" media type:

   o  "error" (REQUIRED).  A single error code.

   o  "error_description" (OPTIONAL).  Human-readable text providing
      additional information, used to assist Basic Authentication Scheme as
      specified in the understanding and
      resolution Section 2.3.1 of the error occurred.

   o  "error_uri" (OPTIONAL). OAuth 2.0 [OAuth2.0]. [[ this list
      of terms needs to be expanded and fully defined, especially in
      reference to signed-jwt client authentication ]]

   policy_url  OPTIONAL.  A URI identifying a human-readable web
      page with information about URL location that the error, used Client provides to provide the end-
      user with additional information
      End-User to read about the error.

   An example error response (with line breaks how the profile data will be used.  The
      Authorization Server SHOULD display this URL to the End-User if it
      is given.

   jwk_url  OPTIONAL.  URL for readability):

       HTTP/1.1 400 Bad Request
       Content-Type: application/json
       Cache-Control: no-store

       {
       "error": "unauthorized_client",
       "description": "This client the Client's JSON Web Key [JWK] document
      that is used for signing Token Endpoint Requests.  If
      jwk_encryption_url is not on provided, the
         white list of this Authorization Server."
       } key at jwk_url is also
      used as the key to encrypt responses to the Client.  If the host-meta discovery was not successful, Client
      registers both "x509_url" and "jwk_url", the authorization
   server keys contained in
      both formats MUST use be the error code "hostmeta_error".

   An example error response (with line breaks same.

   jwk_encryption_url  OPTIONAL.  URL for readability):

       HTTP/1.1 404 Not Found
       Content-Type: application/json
       Cache-Control: no-store

       {
       "error": "hostmeta_error",
       "description": "The hostmeta document could
         not be retrieved from the URL."
       }

7.  Native Application Client Registration

   For a native application serving as an UMA host, we anticipate Client's JSON Web Key
      [JWK] that
   the need for dynamic client registration to introduce this app is used to an
   UMA authorization manager may typically happen only once (or very
   infrequently), likely encrypt any responses to a single authorization manager, the Client.  If the
      Client registers both "jwk_encryption_url" and
   registration could usefully take place at
      "x509_encryption_url", the time keys contained in both formats MUST be
      the same.

   x509_url  OPTIONAL.  URL for the app Client's PEM encoded X.509
      Certificate or Certificate chain that is
   provisioned onto a device.  By contrast, used for a native app serving as
   an UMA requester, signing Token
      Endpoint Requests.  If "x509_encryption_url" is not provided,
      "x509_url" it may need is also used to encrypt responses to register at multiple authorization
   managers over time when seeking access tokens, at moments much later
   than the original provisioning of the app onto Client.  If
      the device.

   When a native application is provisioned on a device, such as through
   an app store model, often it has an associated "home base" web server
   application component with which it Client registers (outside of any UMA-
   related or OAuth-related interactions).  This pairwise relationship
   can be exploited both "x509_url" and "jwk_url", the keys
      contained in a number of ways to allow trustable, unique
   metadata to both formats MUST be conveyed to an OAuth server and the same.

   x509_encryption_url  OPTIONAL.  URL for this instance of the app Client's PEM encoded
      X.509 Certificate or Certificate chain that is used to receive a client identifier encrypt the
      ID Token and optional secret.  We have
   discussed "device-initiated" User Info Endpoint Responses to the Client.  If the
      Client registers both "jwk_encryption_url" and "home base-initiated" pattern
   options for OAuth dynamic client registration
      "x509_encryption_url", the keys contained in these circumstances.
   Device-initiated flows seem more generically applicable (for example,
   for both UMA host and UMA requester needs).  However, a home base-
   initiated flow may formats SHOULD
      be the same.

   require_signed_request_object  OPTIONAL.  The JWS [JWS] "alg"
      algorithm [JWA] that MUST be preferable required by the Authorization Server.
      The valid values are listed in case it Section 3.1 of JWA [JWA].  Servers
      SHOULD support "RS256".

   default_max_age  OPTIONAL. (default max authentication age): Type:
      Integer - Specifies that the End-User must be actively
      authenticated if any present authentication is necessary older than the
      specified number of seconds.  (The "max_age" request parameter
      corresponds to pre-
   determine a trust level towards an OAuth server.  In the OpenID 2.0 PAPE "max_auth_age" request
      parameter.)  The "max_age" claim in the request object overrides
      this case, default value.

   default_acr  OPTIONAL. (default authentication context class
      reference): Type: String - Specifies the
   home base server could initiate default value that the registration process if and only
   if there exists
      Authorization server must use for processing requests from this
      client.  The "acrs_supported" element of discovery contains a trust relationship between list
      of the two parties.

   Following is one option supported "acr" values for a device-initiated flow:

   1.  User provisions native app on device and registers with and
       authenticates to app's home-base web application.

   2.  Home base provisions native app with home base-signed metadata.

   3.  Whenever user tries to use native app to access a protected
       resource, native app provides home base-provided metadata to this server.  The "acr" claim in
      the request object overrides this default value.

4.  Server verifies home base signature by pulling public key from
       home base URL and generates client identifier and secret for
       native app.  IANA Considerations

   This document makes no requests of IANA.

5.  Server returns client identifier and secret to native app.

8.  Security Considerations

   [[ Editor's note: Following are some security considerations: considerations taken
   whole from the UMA and OpenID Connect source drafts. ]]

   o  No client authentication: The server should treat unsigned pushed
      client metadata as self-asserted.

   o  Weak client authentication: The server should treat unsigned
      pulled client metadata as self-asserted unless the domain of the
      client matches the client metadata URL and the URL is well-known
      and trusted.

   o  Strong client authentication: The server should treat signed
      client metadata (pushed or pulled) and a signed metadata URL as
      self-asserted unless it can verify the signature as being from a
      trusted source.

   Since requests to the Client Registration Endpoint result in the
   transmission of clear-text credentials (in the HTTP request and
   response), the server MUST require the use of a transport-layer
   security mechanism when sending requests to the Registration
   Endpoint.  The server MUST support TLS 1.2 RFC 5246 [RFC5246] and/or
   TLS 1.0 [RFC2246] and MAY support additional transport-layer
   mechanisms meeting its security requirements.  When using TLS, the
   Client MUST perform a TLS/SSL server certificate check, per RFC 6125
   [RFC6125].

   Requests to the Registration Endpoint for "client_update" MUST have
   some rate limiting on failures to prevent the Client secret from
   being disclosed though repeated access attempts.

   A rogue RP might use the domain logo for the legitimate RP, which it is
   trying to impersonate.  An IdP needs to take steps to mitigate this
   phishing risk, since the logo could confuse users into thinking
   they're logging in to the legitimate RP.  An IdP could also warn if
   the domain/site of the client matches logo doesn't match the client metadata URL domain/site of redirect
   URIs.  An IdP can also make warnings against untrusted RPs in all
   cases, especially if they're dynamically registered, have not been
   trusted by any users at the IdP before, and want to use the URL logo
   feature.

   In a situation where the Authorization Server is well-
      known supporting open
   Client registration, it must be extremely careful with any URL
   provided by the Client that will be displayed to the user (e.g.
   "logo_url" and trusted.

   o  Strong client authentication: "policy_url").  A rogue Client could specify a
   registration request with a reference to a drive-by download in the
   "policy_url".  The server Authorization Server should treat signed
      client metadata (pushed or pulled) check to see if the
   "logo_url" and a signed metadata URL as
      self-asserted unless it can verify "policy_url" have the signature same host as being from a
      trusted source.

9. the hosts defined
   in the array of "redirect_uris".

6.  Acknowledgments

   The authors thank the User-Managed Access Work Group participants,
   particularly and the following, OpenID
   Connect Working Group participants for their input to this document:

   o  Domenico Catalano

   o  George Fletcher

   o  Nat Sakimura

10. document.

7.  Document History

   [[ to be removed by RFC editor before publication as an RFC ]]

11.

   - 01
   o  Merged UMA and OpenID Connect registrations into a single document

   o  Changed to form-paramter inputs to endpoint

   o  Removed pull-based registration

   - 00

   o  Imported original UMA draft specification

8.  References

11.1.

8.1.  Normative References

   [JSON]     Crockford, D., "The application/json Media Type for
              JavaScript Object Notation (JSON)", 2006,
              <http://tools.ietf.org/html/rfc4627>.

   [JWA]      Jones, M., "JSON Web Algorithms", May 2012.

   [JWE]      Jones, M., Rescorla, E., and J. Hildebrand, "JSON Web
              Encryption (JWE)", May 2012.

   [JWK]      Jones, M., "JSON Web Key (JWK)", May 2012.

   [JWS]      Jones, M., Bradley, J., and N. Sakimura, "JSON Web
              Signature", May 2012.

   [JWT]      Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token",
              May 2012.

   [OAuth-Sig]
              Balfanz, D., "OAuth Signature proposals", 2010, <http://
              www.ietf.org/mail-archive/web/oauth/current/
              msg03893.html>.

   [OAuth.Bearer]
              Jones, M. and D. Hardt, "OAuth 2.0 Protocol: Bearer
              Tokens", Aug 2012.

   [OAuth2.0]
              Hardt, D., "OAuth 2.0 Authorization Protocol", July 2012.

   [OpenID.Messages]
              Sakimura, N., Bradley, J., Jones, M., de Medeiros, B.,
              Mortimore, C., and E. Jay, "OpenID Connect Messages 1.0",
              May 2012.

   [OpenID.Session]
              Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
              N. Agarwal, "OpenID Connect Session Management 1.0",
              August 2012.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2246]  Dierks, T. and C. Allen, "The TLS Protocol Version 1.0",
              RFC 2246, January 1999.

   [RFC2617]  Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
              Leach, P., Luotonen, A., and L. Stewart, "HTTP
              Authentication: Basic and Digest Access Authentication",
              RFC 2617, June 1999.

   [RFC3339]  Klyne, G., Ed. and C. Newman, "Date and Time on the
              Internet: Timestamps", RFC 3339, July 2002.

   [RFC5246]  Dierks, T. and E. Rescorla, "The Transport Layer Security
              (TLS) Protocol Version 1.2", RFC 5246, August 2008.

   [RFC5785]  Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
              Uniform Resource Identifiers (URIs)", RFC 5785,
              April 2010.

   [RFC6125]  Saint-Andre, P. and J. Hodges, "Representation and
              Verification of Domain-Based Application Service Identity
              within Internet Public Key Infrastructure Using X.509
              (PKIX) Certificates in the Context of Transport Layer
              Security (TLS)", RFC 6125, March 2011.

   [USA15]    Davis, M., Whistler, K., and M. Duerst, "Unicode
              Normalization Forms", Unicode Standard Annex 15, 09 2009.

   [hostmeta]
              Hammer-Lahav, E., "Web Host Metadata", 2010, <http://
              xml.resource.org/public/rfc/bibxml3/
              reference.I-D.draft-hammer-hostmeta-13.xml>.

11.2.

8.2.  Non-Normative References

   [UMA-Core]
              Scholz, C., "UMA Requirements", 2010, <http://
              tools.ietf.org/id/draft-hardjono-oauth-umacore-04.txt>.

   [UMA-Reqs]
              Maler, E., "UMA Requirements", 2010, <http://
              kantarainitiative.org/confluence/display/uma/
              UMA+Requirements>.

   [UMA-UC]   Akram, H., "UMA Explained", 2010, <http://
              kantarainitiative.org/confluence/display/uma/
              UMA+Scenarios+and+Use+Cases>.

Authors' Addresses

   Justin Richer (editor)
   The MITRE Corporation

   Phone:
   Fax:
   Email: jricher@mitre.org
   URI:

   Thomas Hardjono (editor)
   MIT

   Phone:
   Fax:
   Email: hardjono@mit.edu
   URI:

   Maciej Machulak
   Newcastle University

   Email: m.p.machulak@ncl.ac.uk
   URI:   http://ncl.ac.uk/

   Eve Maler
   XMLgrrl.com

   Email: eve@xmlgrrl.com
   URI:   http://www.xmlgrrl.com
   Christian Scholz
   COM.lounge GmbH

   Phone:
   Fax:
   Email:
   URI:

   Nat Sakimura
   Nomura Research Institute, Ltd.

   Email: n-sakimura@nri.co.jp

   John Bradley
   Ping Identity

   Email: ve7jtb@ve7jtb.com

   Michael B. Jones
   Microsoft

   Email: mbj@microsoft.com