idnits 2.17.1 draft-ietf-oauth-dyn-reg-06.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). -- The document date (February 15, 2013) is 4086 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'JWK' ** Obsolete normative reference: RFC 2246 (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 4627 (Obsoleted by RFC 7158, RFC 7159) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) ** Obsolete normative reference: RFC 6125 (Obsoleted by RFC 9525) Summary: 5 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 OAuth Working Group J. Richer, Ed. 3 Internet-Draft The MITRE Corporation 4 Intended status: Standards Track J. Bradley 5 Expires: August 19, 2013 Ping Identity 6 M. Jones 7 Microsoft 8 M. Machulak 9 Newcastle University 10 February 15, 2013 12 OAuth Dynamic Client Registration Protocol 13 draft-ietf-oauth-dyn-reg-06 15 Abstract 17 This specification defines an endpoint and protocol for dynamic 18 registration of OAuth Clients at an Authorization Server. 20 Status of this Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on August 19, 2013. 37 Copyright Notice 39 Copyright (c) 2013 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 55 1.1. Notational Conventions . . . . . . . . . . . . . . . . . . 3 56 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 57 2. Client Metadata . . . . . . . . . . . . . . . . . . . . . . . 4 58 3. Client Registration Endpoint . . . . . . . . . . . . . . . . . 7 59 3.1. Client Registration Request . . . . . . . . . . . . . . . 8 60 3.2. Client Registration Response . . . . . . . . . . . . . . . 9 61 4. Client Registration Access Endpoint . . . . . . . . . . . . . 9 62 4.1. Forming the Client Registration Access Endpoint URL . . . 9 63 4.2. Client Read Request . . . . . . . . . . . . . . . . . . . 10 64 4.3. Client Update Request . . . . . . . . . . . . . . . . . . 10 65 4.4. Client Delete Request . . . . . . . . . . . . . . . . . . 12 66 5. Responses . . . . . . . . . . . . . . . . . . . . . . . . . . 13 67 5.1. Client Information Response . . . . . . . . . . . . . . . 13 68 5.2. Client Registration Error Response . . . . . . . . . . . . 15 69 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 70 7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 71 8. Normative References . . . . . . . . . . . . . . . . . . . . . 17 72 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 18 73 Appendix B. Document History . . . . . . . . . . . . . . . . . . 18 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20 76 1. Introduction 78 In some use-case scenarios, it is desirable or necessary to allow 79 OAuth clients to obtain authorization from an OAuth authorization 80 server without requiring the two parties to interact before hand. 81 Nevertheless, in order for the authorization server to accurately and 82 securely represent to end-users which client is seeking authorization 83 to access the end-user's resources, a method for automatic and unique 84 registration of clients is needed. The OAuth2 authorization 85 framework does not define how the relationship between the Client and 86 the Authorization Server is initialized, or how a given client is 87 assigned a unique Client Identifier. Historically, this has happened 88 out-of-band from the OAuth protocol. This draft provides a mechanism 89 for a client to register itself with the Authorization Server, which 90 can be used to dynamically provision a Client Identifier, and 91 optionally a Client Secret. 93 As part of the registration process, this specification also defines 94 a mechanism for the client to present the Authorization Server with a 95 set of metadata, such as a display name and icon to be presented to 96 the user during the authorization step. This draft also provides a 97 mechanism for the Client to read and update this information after 98 the initial registration action. 100 1.1. Notational Conventions 102 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL NOT', 103 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'MAY', and 'OPTIONAL' in this 104 document are to be interpreted as described in [RFC2119]. 106 Unless otherwise noted, all the protocol parameter names and values 107 are case sensitive. 109 1.2. Terminology 111 This specification uses the terms "Access Token", "Refresh Token", 112 "Authorization Code", "Authorization Grant", "Authorization Server", 113 "Authorization Endpoint", "Client", "Client Identifier", "Client 114 Secret", "Protected Resource", "Resource Owner", "Resource Server", 115 and "Token Endpoint" defined by OAuth 2.0 [RFC6749]. 117 This specification defines the following additional terms: 119 o Client Registration Endpoint: The OAuth 2.0 Endpoint through which 120 a Client can request new registration. The means of the Client 121 obtaining the URL for this endpoint are out of scope for this 122 specification. 124 o Client Registration Access Endpoint: The OAuth 2.0 Endpoint 125 through which a specific Client can manage its registration 126 information, provided by the Authorization Server to the Client. 127 This URL for this endpoint is communicated to the client by the 128 Authorization Server in the Client Information Response. 130 o Registration Access Token: An OAuth 2.0 Bearer Token issued by the 131 Authorization Server through the Client Registration Endpoint 132 which is used by the Client to authenticate itself during read, 133 update, and delete operations. This token is associated with a 134 particular Client. 136 2. Client Metadata 138 Clients generally have an array of metadata associated with their 139 unique Client Identifier at the Authorization Server. These can 140 range from human-facing display strings, such as a client name, to 141 items that impact the security of the protocol, such as the list of 142 valid redirect URIs. 144 Extensions and profiles of this specification MAY expand this list, 145 but MUST at least accept all parameters on this list. The 146 Authorization Server MUST ignore any additional parameters sent by 147 the Client that it does not understand. 149 [[ Editor's note: normative language in the table below is meant to 150 apply to the *client* when sending the request. The paragraph above 151 is meant to say that the server must at least accept all parameters 152 and not fail with an error at an unknown parameter, especially if 153 it's in the list below. Also, extensions need to explicitly call out 154 if they're not going to do something with one of these basic 155 parameters instead of just ignoring their existence. This is meant 156 to be the *minimum set* of parameters for interoperability. ]] 158 redirect_uris 159 RECOMMENDED. Array of redirect URIs for use in the Authorization 160 Code and Implicit grant types. An Authorization Server SHOULD 161 require registration of valid redirect URIs for all clients that 162 use these grant types in order to protect against token and 163 credential theft attacks. 165 client_name 166 RECOMMENDED. Human-readable name of the Client to be presented to 167 the user. If omitted, the Authorization Server MAY display to the 168 user the raw "client_id" value instead. 170 client_url 171 RECOMMENDED. URL of the homepage of the Client. If present, the 172 server SHOULD display this URL to the end user in a clickable 173 fashion. 175 logo_url 176 OPTIONAL. URL that references a logo for the Client. If present, 177 the server SHOULD display this image to the end user during 178 approval. 180 contacts 181 OPTIONAL. Array of email addresses for people responsible for 182 this Client. The Authorization Server MAY make these addresses 183 available to end users for support requests for the Client. An 184 Authorization Server MAY use these email addresses as identifiers 185 for an administrative page for this client. 187 tos_url 188 OPTIONAL. URL that points to a human-readable Terms of Service 189 for the Client. The Authorization Server SHOULD display this URL 190 to the End-User if it is given. 192 token_endpoint_auth_method 193 OPTIONAL. The requested authentication type for the Token 194 Endpoint. Valid values are: 196 * "none": this is a public client as defined in OAuth 2.0 and 197 does not have a client secret 199 * "client_secret_post": the client uses the HTTP POST parameters 200 defined in OAuth2.0 section 2.3.1 202 * "client_secret_basic": the client uses HTTP Basic defined in 203 OAuth 2.0 section 2.3.1 205 * "client_secret_jwt": the client uses the JWT Assertion profile 206 with a symmetric secret issued by the server 208 * "private_key_jwt": the client uses the JWT Assertion profile 209 with its own private key 211 Other authentication methods may be defined by extension. If 212 unspecified or omitted, the default is "client_secret_basic", 213 denoting HTTP Basic Authentication Scheme as specified in Section 214 2.3.1 of OAuth 2.0. 216 scope 217 OPTIONAL. Space separated list of scope values (as described in 218 OAuth 2.0 Section 3.3 [RFC6749]) that the client is declaring that 219 it may use when requesting access tokens. If omitted, an 220 Authorization Server MAY register a Client with a default set of 221 scopes. 223 grant_type 224 OPTIONAL. Array of grant types that a client may use. These 225 grant types are defined as follows: 227 * "authorization_code": The Authorization Code Grant described in 228 OAuth2 Section 4.1. 230 * "implicit": The Implicit Grant described in OAuth2 Section 4.2. 232 * "password": The Resource Owner Password Credentials Grant 233 described in OAuth2 Section 4.3 235 * "client_credentials": The Client Credentials Grant described in 236 OAuth2 Section 4.4 238 * "refresh_token": The Refresh Token Grant described in OAuth2 239 Section 6. 241 Authorization Servers MAY allow for other values as defined in 242 grant type extensions to OAuth2. The extension process is 243 described in OAuth2 Section 2.5, and the value of this parameter 244 MUST be the same as the value of the "grant_type" parameter 245 defined in the extension. 247 policy_url 248 OPTIONAL. A URL location that the Client provides to the End-User 249 to read about the how the profile data will be used. The 250 Authorization Server SHOULD display this URL to the End-User if it 251 is given. 253 jwk_url 254 OPTIONAL. URL for the Client's JSON Web Key [JWK] document that 255 is used for signing requests, such as requests to the Token 256 Endpoint using the "private_key_jwt" assertion client credential. 257 If the Client registers both "x509_url" and "jwk_url", the keys 258 contained in both formats MUST be the same. 260 jwk_encryption_url 261 OPTIONAL. URL for the Client's JSON Web Key [JWK] that the server 262 can use to encrypt responses to the Client. If the Client 263 registers both "jwk_encryption_url" and "x509_encryption_url", the 264 keys contained in both formats MUST be the same. 266 x509_url 267 OPTIONAL. URL for the Client's PEM encoded X.509 Certificate or 268 Certificate chain that is used for signing requests, such as 269 requests to the Token Endpoint using the "private_key_jwt" 270 assertion client credential. If the Client registers both 271 "x509_url" and "jwk_url", the keys contained in both formats MUST 272 be the same. 274 x509_encryption_url 275 OPTIONAL. URL for the Client's PEM encoded X.509 Certificate or 276 Certificate chain that the server can use to encrypt responses to 277 the Client. If the Client registers both "jwk_encryption_url" and 278 "x509_encryption_url", the keys contained in both formats MUST be 279 the same. 281 3. Client Registration Endpoint 283 The Client Registration Endpoint is an OAuth 2.0 Endpoint defined in 284 this document that is designed to allow a Client to register itself 285 with the Authorization Server. The Client Registration Endpoint MUST 286 accept HTTP POST messages with request parameters encoded in the 287 entity body using the "application/json" format. The Client 288 Registration Endpoint MUST be protected by a transport-layer security 289 mechanism, and the server MUST support TLS 1.2 RFC 5246 [RFC5246] 290 and/or TLS 1.0 [RFC2246] and MAY support additional transport-layer 291 mechanisms meeting its security requirements. When using TLS, the 292 Client MUST perform a TLS/SSL server certificate check, per RFC 6125 293 [RFC6125]. 295 The Client Registration Endpoint MAY accept an initial authorization 296 credential in the form of an OAuth 2.0 [RFC6749] access token in 297 order to limit registration to only previously authorized parties. 298 The method by which this access token is obtained by the registrant 299 is generally out-of-band and is out of scope of this specification. 301 In order to support open registration and facilitate wider 302 interoperability, the Client Registration Endpoint SHOULD allow 303 initial registration requests with no authentication. These requests 304 MAY be rate-limited or otherwise limited to prevent a denial-of- 305 service attack on the Client Registration Endpoint. 307 In order to facilitate registered clients updating their information, 308 the Client Registration Endpoint issues a Request Access Token for 309 clients to securely identify themselves in future connections to the 310 Client Registration Access Endpoint (Section 4). As such, the Client 311 Registration Access Endpoint MUST accept requests with OAuth 2.0 312 Bearer Tokens [RFC6750] for these operations, whether or not the 313 initial registration call requires authentication of some form. 315 The Client Registration Endpoint MUST ignore all parameters it does 316 not understand. 318 3.1. Client Registration Request 320 This operation registers a new Client to the Authorization Server. 321 The Authorization Server assigns this client a unique Client 322 Identifier, optionally assigns a Client Secret, and associates the 323 metadata given in the request with the issued Client Identifier. The 324 request includes any parameters described in Client Metadata 325 (Section 2) that the client wishes to specify for itself during the 326 registration. The Authorization Server MAY provision default values 327 for any items omitted in the Client Metadata. 329 The Client sends an HTTP POST to the Client Registration Endpoint 330 with a content type of "application/json". The HTTP Entity Payload 331 is a JSON [RFC4627] document consisting of a JSON object and all 332 parameters as top- level members of that JSON object. 334 For example, a client could send the following registration request 335 to the Client Registration Endpoint: 337 Following is a non-normative example request (with line wraps for 338 display purposes only): 340 POST /register HTTP/1.1 341 Content-Type: application/json 342 Accept: application/json 343 Host: server.example.com 345 { 346 "redirect_uris":["https://client.example.org/callback", 347 "https://client.example.org/callback2"] 348 "client_name":"My Example Client", 349 "token_endpoint_auth_method":"client_secret_basic", 350 "scope":"read write dolphin", 351 "logo_url":"https://client.example.org/logo.png", 352 "jwk_url":"https://client.example.org/my_rsa_public_key.jwk" 353 } 355 3.2. Client Registration Response 357 Upon successful registration, the Authorization Server generates a 358 new Client Identifier for the client. This Client Identifier MUST be 359 unique at the server and MUST NOT be in use by any other client. The 360 server responds with an HTTP 201 Created code and a body of type 361 "application/json" with content described in Client Information 362 Response (Section 5.1). 364 Upon an unsuccessful registration, the Authorization Server responds 365 with an error as described in Client Registration Error 366 (Section 5.2). 368 4. Client Registration Access Endpoint 370 The Client Registration Access Endpoint is an OAuth 2.0 protected 371 endpoint that is provisioned by the server for a specific client to 372 be able to view and update its registered information. The Client 373 MUST include its Registration Access Token in all calls to this 374 endpoint as an OAuth 2.0 Bearer Token [RFC6750]. 376 Operations on this endpoint are switched through the use of different 377 HTTP methods [RFC2616]. 379 4.1. Forming the Client Registration Access Endpoint URL 381 The Authorization Server MUST provide the client with the fully 382 qualified URL in the "registration_access_url" element of the Client 383 Information Response (Section 5.1). The Authorization Server MUST 384 NOT expect the client to construct or discover this URL on its own. 385 The Client MUST use the URL as given by the server and MUST NOT 386 construct this URL from component pieces. 388 Depending on deployment characteristics, the Client Registration 389 Access Endpoint URL may take any number of forms. It is RECOMMENDED 390 that this endpoint URL be formed through the use of a server- 391 constructed URL string which combines the Client Registration 392 Endpoint's URL and the issued client_id for this Client, with the 393 latter as either a path parameter 394 (https://server.example.com/register/client_id) or a query parameter 395 (https://server.example.com/register/?update=client_id). These 396 common patterns can help the Server to more easily determine the 397 client to which the request pertains, which MUST be matched against 398 the client to which the Registration Access Token was issued. If 399 desired, the server MAY simply return the Client Registration 400 Endpoint URL as the Client Registration Access Endpoint URL and 401 change behavior based on the authentication context provided by the 402 Registration Access Token. 404 4.2. Client Read Request 406 In order to read the current configuration of the Client on the 407 Authorization Server, the Client makes an HTTP GET request to the 408 Client Registration Access Endpoint, authenticating with its 409 Registration Access Token. 411 Following is a non-normative example request (with line wraps for 412 display purposes only): 413 GET /register/s6BhdRkqt3 HTTP/1.1 414 Accept: application/json 415 Host: server.example.com 416 Authorization: Bearer reg-23410913-abewfq.123483 418 Upon successful read of the information for a currently active 419 Client, the Authorization Server responds with an HTTP 200 OK with 420 content type of "application/json" and a payload as described in 421 Client Information Response (Section 5.1). 423 If the client does not exist on this server, the server MUST return 424 an HTTP 404 Not Found. [[ Editor's note: If the client doesn't exist, 425 then the Refresh Access Token shouldn't be valid, making this kind of 426 error a 403 at the auth layer instead. How best to call this 427 inconsistency out? ]] 429 4.3. Client Update Request 431 This operation updates a previously-registered client with new 432 metadata at the Authorization Server. This request is authenticated 433 by the Registration Access Token issued to the client. 435 The Client sends an HTTP PUT to the Client Registration Access 436 Endpoint with a content type of "application/json". The HTTP Entity 437 Payload is a JSON [RFC4627] document consisting of a JSON object and 438 all parameters as top- level members of that JSON object. 440 This request MUST include all fields described in Client Metadata 441 (Section 2) as returned to the Client from a previous register, read, 442 or update operation. The Client MUST NOT include the 443 "registration_access_token", "registration_access_url", "expires_at", 444 or "issued_at" fields described in Client Information Response 445 (Section 5.1). 447 Valid values of Client Metadata fields in this request MUST replace, 448 not augment, the values previously associated with this Client. 450 Omitted fields MUST be treated as null or empty values by the server. 452 The Client MUST include its client_id field in the request, and it 453 MUST be the same as its currently-issued Client Identifier. If the 454 client includes its client_secret in the request, then it MUST match 455 the currently-issued client_secret for that Client. The client MUST 456 NOT be allowed to overwrite its existing client_secret with its own 457 value. 459 For all metadata fields, the Authorization Server MAY replace any 460 invalid values with suitable default values, and it MUST return any 461 such fields to the Client in the response. 463 For example, a client could send the following request to the Client 464 Registration Endpoint to update the client registration in the above 465 example: 467 Following is a non-normative example request (with line wraps for 468 display purposes only): 469 PUT /register/s6BhdRkqt3 HTTP/1.1 470 Accept: application/json 471 Host: server.example.com 472 Authorization: Bearer reg-23410913-abewfq.123483 474 { 475 "client_id":"s6BhdRkqt3", 476 "client_secret": "cf136dc3c1fc93f31185e5885805d", 477 "redirect_uri":["https://client.example.org/callback", 478 "https://client.example.org/alt"], 479 "scope": "read write dolphin", 480 "grant_type": ["authorization_code", "refresh_token"] 481 "token_endpoint_auth_method": "client_secret_basic", 482 "jwk_url": "https://client.example.org/my_rsa_public_key.jwk" 483 "client_name":"My New Example", 484 "logo_url":"https://client.example.org/newlogo.png" 485 } 487 Upon successful update, the Authorization Server responds with an 488 HTTP 200 OK Message with content type "applicaiton/json" and a 489 payload as described in Client Information Response (Section 5.1). 490 The Authorization Server MAY include a new Client Secret and/or 491 Registration Access Token in its response. If so, the Client MUST 492 immediately discard its previous Client Secret and/or Registration 493 Access Token. 495 If the Client does not exist on this server, the server MUST return 496 an HTTP 404 Not Found. [[ Editor's note: If the client doesn't exist, 497 then the Refresh Access Token shouldn't be valid, making this kind of 498 error a 403 at the auth layer instead. How best to call this 499 inconsistency out? ]] 501 If the Client is not allowed to update its records, the server MUST 502 respond with HTTP 403 Forbidden. 504 If the Client attempts to set an invalid metadata field and the 505 Authorization Server does not set a default value, the Authorization 506 Server responds with an error as described in Client Registration 507 Error Response (Section 5.2). 509 4.4. Client Delete Request 511 [[ Editor's note: The utility and nature of this function are still 512 under active discussion. This is a proposed set of functionality 513 that a server MAY choose to implement, else give a 405 response to 514 any client that tries, if it can't support it. ]] 516 In order to deprovision itself on the Authorization Server, the 517 Client makes an HTTP DELETE request to the Client Registration Access 518 Endpoint. This request is authenticated by the Registration Access 519 Token issued to the client. 521 Following is a non-normative example request (with line wraps for 522 display purposes only): 523 DELETE /register/s6BhdRkqt3 HTTP/1.1 524 Accept: application/json 525 Host: server.example.com 526 Authorization: Bearer reg-23410913-abewfq.123483 528 A successful delete action will invalidate the client_id, 529 client_secret, and registration_access_token for this client, thereby 530 preventing the client_id from being used at either the Authorization 531 Endpoint or Token Endpoint of the Authorization Server. The 532 Authorization Server SHOULD immediately invalidate all existing 533 authorization grants and currently-active tokens associated with this 534 Client. 536 If a Client has been successfully deprovisioned, the Authorization 537 Server responds with an HTTP 204 No Content message. 539 If there is no such client, the server responds with an HTTP 404 Not 540 Found. [[ Editor's note: This is an inconsistent state and shouldn't 541 happen. See discussion about the Registration Access Token validity 542 above. ]] 544 If the client is not allowed to delete itself, the server responds 545 with HTTP 403 Forbidden. 547 If the server does not support the delete method, it responds with an 548 HTTP 405 Not Supported. 550 Following is a non-normative example response: 551 HTTP/1.1 204 No Content 552 Cache-Control: no-store 554 5. Responses 556 In response to certain requests from the Client to either the Client 557 Registration Endpoint or the Client Registration Access Endpoint as 558 described in this specification, the Authorization Server sends the 559 following response bodies. 561 5.1. Client Information Response 563 The response contains the following fields: 565 , as well as a Client Secret if this client is a confidential client. 566 The response also contains the fully qualified URL to the Client 567 Registration Access Endpoint for this specific client that the client 568 may use to obtain and update information about itself. The response 569 also contains a Registration Access Token that is to be used by the 570 client to perform subsequent operations at the Client Registration 571 Access Endpoint. 573 client_id 574 REQUIRED. The unique Client identifier, MUST NOT be currently 575 valid for any other registered Client. 577 client_secret 578 OPTIONAL. The Client secret. If issued, this MUST be unique for 579 each "client_id". This value is used by confidential clients to 580 authenticate to the Token Endpoint as described in OAuth 2.0 581 Section 2.3.1. 583 expires_at 584 REQUIRED if "client_secret" is issued. The number of seconds from 585 1970-01-01T0:0:0Z as measured in UTC that the "client_secret" will 586 expire or "0" if it does not expire. See RFC 3339 [RFC3339] for 587 details regarding date/times in general and UTC in particular. 589 issued_at 590 OPTIONAL. Specifies the timestamp when the Client Identifier was 591 issued. The timestamp value MUST be a positive integer. The 592 value is expressed in the number of seconds since January 1, 1970 593 00:00:00 GMT. 595 registration_access_token 596 REQUIRED. The Access token to be used by the client to perform 597 actions on the Client Registration Access Endpoint. 599 registration_access_url 600 REQUIRED. The fully qualified URL of the Client Registration 601 Access Endpoint for this client. The Client MUST use this URL as 602 given when communicating with the Client Registration Access 603 Endpoint. [[ Editor's note: The syntax for this parameter is still 604 under active discussion. There have been several alternative 605 proposals to a flat URL here, including a structure based on HAL 606 for JSON and a structure based on JSON-LD. ]] 608 Additionally, the Authorization Server MUST return all registered 609 metadata (Section 2) about this client, including any fields 610 provisioned by the Authorization Server itself. The Authorization 611 Server MAY reject or replace any of the client's requested metadata 612 values submitted during the registration or update requests and 613 substitute them with suitable values. 615 The response is an "application/json" document with all parameters as 616 top-level members of a JSON object [RFC4627] . 618 Following is a non-normative example response: 619 HTTP/1.1 200 OK 620 Content-Type: application/json 621 Cache-Control: no-store 623 { 624 "registration_access_token": "reg-23410913-abewfq.123483", 625 "registration_access_url": 626 "https://server.example.com/register/s6BhdRkqt3", 627 "client_id":"s6BhdRkqt3", 628 "client_secret": "cf136dc3c1fc93f31185e5885805d", 629 "expires_at":2893276800 630 "redirect_uris":["https://client.example.org/callback", 631 "https://client.example.org/callback2"] 632 "scope": "read write dolphin", 633 "grant_type": ["authorization_code", "refresh_token"] 634 "token_endpoint_auth_method": "client_secret_basic", 635 "logo_url": "https://client.example.org/logo.png", 636 "jwk_url": "https://client.example.org/my_rsa_public_key.jwk" 637 } 639 5.2. Client Registration Error Response 641 When an OAuth error condition occurs, such as the client presenting 642 an invalid Registration Access Token, the Authorization Server 643 returns an Error Response as defined in Section 5.2 of the OAuth 2.0 644 specification. 646 When a registration error condition occurs, the Authorization Server 647 returns an HTTP 400 status code with content type "application/json" 648 consisting of a JSON object [RFC4627] describing the error in the 649 response body. 651 The JSON object contains two members: 653 error 654 The error code, a single ASCII string. 656 error_description 657 A human-readable text description of the error for debugging. 659 This specification defines the following error codes: 661 invalid_redirect_uri 662 The value of one or more "redirect_uris" is invalid. 664 invalid_client_metadata 665 The value of one of the client metadata (Section 2) fields is 666 invalid and the server has rejected this request. Note that an 667 Authorization server MAY choose to substitute a valid value for 668 any requested parameter of a client's metadata. 670 invalid_client_id 671 Value of "client_id" is invalid. 673 Following is a non-normative example of an error response (with line 674 wraps for display purposes only): 675 HTTP/1.1 400 Bad Request 676 Content-Type: application/json 677 Cache-Control: no-store 679 { 680 "error":"invalid_redirect_uri", 681 "error_description":"The redirect URI of http://sketchy.example.com 682 is not allowed for this server." 683 } 685 6. IANA Considerations 687 This document makes no requests of IANA. 689 7. Security Considerations 691 [[ Editor's note: Following are some security considerations taken 692 from the UMA and OpenID Connect source drafts. These need to be 693 massaged into a properly generic set of considerations. ]] 695 Since requests to the Client Registration Endpoint result in the 696 transmission of clear-text credentials (in the HTTP request and 697 response), the server MUST require the use of a transport-layer 698 security mechanism when sending requests to the Registration 699 Endpoint. The server MUST support TLS 1.2 RFC 5246 [RFC5246] and/or 700 TLS 1.0 [RFC2246] and MAY support additional transport-layer 701 mechanisms meeting its security requirements. When using TLS, the 702 Client MUST perform a TLS/SSL server certificate check, per RFC 6125 703 [RFC6125]. 705 As this endpoint is an OAuth2 Protected Resource, requests to the 706 Registration Endpoint SHOULD have some rate limiting on failures to 707 prevent the Registration Access Token from being disclosed though 708 repeated access attempts. 710 The authorization server MUST treat all client metadata as self- 711 asserted. A rogue Client might use the name and logo for the 712 legitimate Client, which it is trying to impersonate. An 713 Authorization Server needs to take steps to mitigate this phishing 714 risk, since the logo could confuse users into thinking they're 715 logging in to the legitimate Client. For instance, an Authorization 716 Server could warn if the domain/site of the logo doesn't match the 717 domain/site of redirect URIs. An Authorization Server can also 718 present warning messages to end users about untrusted Clients in all 719 cases, especially if such clients have been dynamically registered 720 and have not been trusted by any users at the Authorization Server 721 before. 723 In a situation where the Authorization Server is supporting open 724 Client registration, it must be extremely careful with any URL 725 provided by the Client that will be displayed to the user (e.g. 726 "logo_url" and "policy_url"). A rogue Client could specify a 727 registration request with a reference to a drive-by download in the 728 "policy_url". The Authorization Server should check to see if the 729 "logo_url" and "policy_url" have the same host as the hosts defined 730 in the array of "redirect_uris". 732 While the Client Secret can expire, the Registration Access Token 733 should not expire while a client is still actively registered. If 734 this token were to expire, a Client could be left in a situation 735 where it has no means of updating itself and must register itself 736 anew. As the Registration Access Tokens are long-term credentials, 737 and since the Registration Access Token is a Bearer token and acts as 738 the sole authentication for use at the Client Registration Access 739 Endpoint, it MUST be protected by the Client as described in OAuth 740 2.0 Bearer [RFC6750]. 742 If a Client is deprovisioned from a server, any outstanding 743 Registration Access Tokens for that client MUST be invalidated at the 744 same time. Otherwise, this can lead to an inconsistent state wherein 745 a Client could make requests to the Client Registration Access 746 Endpoint where the authentication would succeed but the action would 747 fail because the Client is no longer valid. 749 8. Normative References 751 [JWK] Jones, M., "JSON Web Key (JWK)", May 2012. 753 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 754 Requirement Levels", BCP 14, RFC 2119, March 1997. 756 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 757 RFC 2246, January 1999. 759 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 760 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 761 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 763 [RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the 764 Internet: Timestamps", RFC 3339, July 2002. 766 [RFC4627] Crockford, D., "The application/json Media Type for 767 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 769 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 770 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 772 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 773 Verification of Domain-Based Application Service Identity 774 within Internet Public Key Infrastructure Using X.509 775 (PKIX) Certificates in the Context of Transport Layer 776 Security (TLS)", RFC 6125, March 2011. 778 [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", 779 RFC 6749, October 2012. 781 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 782 Framework: Bearer Token Usage", RFC 6750, October 2012. 784 Appendix A. Acknowledgments 786 The authors thank the OAuth Working Group, the User-Managed Access 787 Working Group, and the OpenID Connect Working Group participants for 788 their input to this document. In particular, the following 789 individuals have been instrumental in their review and contribution 790 to various versions of this document: Amanda Anganes, Tim Bray, 791 Domenico Catalano, George Fletcher, Torsten Lodderstedt, Eve Maler, 792 Thomas Hardjono, Nat Sakimura, and Christian Scholz. 794 Appendix B. Document History 796 [[ to be removed by the RFC editor before publication as an RFC ]] 798 -06 800 o Removed secret_rotation as a client-initiated action, including 801 removing client secret rotation endpoint and parameters. 803 o Changed _links structure to single value registration_access_url. 805 o Collapsed create/update/read responses into client info response. 807 o Changed return code of create action to 201. 809 o Added section to describe suggested generation and composition of 810 Client Registration Access URL. 812 o Added clarifying text to PUT and POST requests to specify JSON in 813 the body. 815 o Added Editor's Note to DELETE operation about its inclusion. 817 o Added Editor's Note to registration_access_url about alternate 818 syntax proposals. 820 -05 822 o changed redirect_uri and contact to lists instead of space 823 delimited strings 825 o removed operation parameter 827 o added _links structure 829 o made client update management more RESTful 831 o split endpoint into three parts 833 o changed input to JSON from form-encoded 835 o added READ and DELETE operations 837 o removed Requirements section 839 o changed token_endpoint_auth_type back to 840 token_endpoint_auth_method to match OIDC who changed to match us 842 -04 844 o removed default_acr, too undefined in the general OAuth2 case 846 o removed default_max_auth_age, since there's no mechanism for 847 supplying a non-default max_auth_age in OAuth2 849 o clarified signing and encryption URLs 850 o changed token_endpoint_auth_method to token_endpoint_auth_type to 851 match OIDC 853 -03 855 o added scope and grant_type claims 857 o fixed various typos and changed wording for better clarity 859 o endpoint now returns the full set of client information 861 o operations on client_update allow for three actions on metadata: 862 leave existing value, clear existing value, replace existing value 863 with new value 865 -02 867 o Reorganized contributors and references 869 o Moved OAuth references to RFC 871 o Reorganized model/protocol sections for clarity 873 o Changed terminology to "client register" instead of "client 874 associate" 876 o Specified that client_id must match across all subsequent requests 878 o Fixed RFC2XML formatting, especially on lists 880 -01 882 o Merged UMA and OpenID Connect registrations into a single document 884 o Changed to form-paramter inputs to endpoint 886 o Removed pull-based registration 888 -00 890 o Imported original UMA draft specification 892 Authors' Addresses 894 Justin Richer (editor) 895 The MITRE Corporation 897 Phone: 898 Fax: 899 Email: jricher@mitre.org 900 URI: 902 John Bradley 903 Ping Identity 905 Email: ve7jtb@ve7jtb.com 907 Michael B. Jones 908 Microsoft 910 Email: mbj@microsoft.com 912 Maciej Machulak 913 Newcastle University 915 Email: m.p.machulak@ncl.ac.uk 916 URI: http://ncl.ac.uk/