idnits 2.17.1 draft-ietf-oauth-dyn-reg-05.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 6, 2013) is 4090 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 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: 4 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Richer, Ed. 3 Internet-Draft The MITRE Corporation 4 Intended status: Standards Track J. Bradley 5 Expires: August 10, 2013 Ping Identity 6 M. Jones 7 Microsoft 8 M. Machulak 9 Newcastle University 10 February 6, 2013 12 OAuth Dynamic Client Registration Protocol 13 draft-ietf-oauth-dyn-reg-05 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 10, 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 . . . . . . . . . . . . . . . 8 61 3.3. Client Registration Error Response . . . . . . . . . . . . 10 62 4. Client Update Endpoint . . . . . . . . . . . . . . . . . . . . 11 63 4.1. Client Update Request . . . . . . . . . . . . . . . . . . 12 64 4.2. Client Read Request . . . . . . . . . . . . . . . . . . . 12 65 4.3. Client Update or Read Response . . . . . . . . . . . . . . 13 66 4.4. Client Delete Request . . . . . . . . . . . . . . . . . . 14 67 5. Client Secret Rotation . . . . . . . . . . . . . . . . . . . . 15 68 5.1. Rotate Secret Request . . . . . . . . . . . . . . . . . . 15 69 5.2. Rotate Secret Response . . . . . . . . . . . . . . . . . . 15 70 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 71 7. Security Considerations . . . . . . . . . . . . . . . . . . . 16 72 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18 73 9. Document History . . . . . . . . . . . . . . . . . . . . . . . 18 74 10. Normative References . . . . . . . . . . . . . . . . . . . . . 20 75 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20 77 1. Introduction 79 In some use-case scenarios, it is desirable or necessary to allow 80 OAuth clients to obtain authorization from an OAuth authorization 81 server without requiring the two parties to interact before hand. 82 Nevertheless, in order for the authorization server to accurately and 83 securely represent to end-users which client is seeking authorization 84 to access the end-user's resources, a method for automatic and unique 85 registration of clients is needed. The OAuth2 authorization 86 framework does not define how the relationship between the Client and 87 the Authorization Server is initialized, or how a given client is 88 assigned a unique Client Identifier. Historically, this has happened 89 out-of-band from the OAuth protocol. This draft provides a mechanism 90 for a client to register itself with the Authorization Server, which 91 can be used to dynamically provision a Client Identifier, and 92 optionally a Client Secret. 94 As part of the registration process, this specification also defines 95 a mechanism for the client to present the Authorization Server with a 96 set of metadata, such as a display name and icon to be presented to 97 the user during the authorization step. This draft provides a method 98 for the client to register and update this information over time. 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. 122 o Client Update Endpoint: The OAuth 2.0 Endpoint through which a 123 specific Client can manage its registration information, provided 124 by the Authorization Server to the Client. 126 o Client Secret Rotation Endpoint: The OAuth 2.0 Endpoint through 127 which a specific Client can request refreshes of its Client Secret 128 and Registration Access Token. 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 update 133 and secret rotation 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. A list 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. List of email addresses for people responsible for this 182 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 scopes (as described in OAuth 218 2.0 Section 3.3 [RFC6749]) that the client will be allowed to 219 request tokens for. If omitted, an Authorization Server MAY 220 register a Client with a default set of allowed scopes. 222 grant_type 223 OPTIONAL. List of grant types that a client may use. These grant 224 types are defined as follows: 226 * "authorization_code": The Authorization Code Grant described in 227 OAuth2 Section 4.1. 229 * "implicit": The Implicit Grant described in OAuth2 Section 4.2. 231 * "password": The Resource Owner Password Credentials Grant 232 described in OAuth2 Section 4.3 234 * "client_credentials": The Client Credentials Grant described in 235 OAuth2 Section 4.4 237 * "refresh_token": The Refresh Token Grant described in OAuth2 238 Section 6. 240 Authorization Servers MAY allow for other values as defined in 241 grant type extensions to OAuth2. The extension process is 242 described in OAuth2 Section 2.5, and the value of this parameter 243 MUST be the same as the value of the "grant_type" parameter 244 defined in the extension. 246 policy_url 247 OPTIONAL. A URL location that the Client provides to the End-User 248 to read about the how the profile data will be used. The 249 Authorization Server SHOULD display this URL to the End-User if it 250 is given. 252 jwk_url 253 OPTIONAL. URL for the Client's JSON Web Key [JWK] document that 254 is used for signing requests, such as requests to the Token 255 Endpoint using the "private_key_jwt" assertion client credential. 256 If the Client registers both "x509_url" and "jwk_url", the keys 257 contained in both formats MUST be the same. 259 jwk_encryption_url 260 OPTIONAL. URL for the Client's JSON Web Key [JWK] that the server 261 can use to encrypt responses to the Client. If the Client 262 registers both "jwk_encryption_url" and "x509_encryption_url", the 263 keys contained in both formats MUST be the same. 265 x509_url 266 OPTIONAL. URL for the Client's PEM encoded X.509 Certificate or 267 Certificate chain that is used for signing requests, such as 268 requests to the Token Endpoint using the "private_key_jwt" 269 assertion client credential. If the Client registers both 270 "x509_url" and "jwk_url", the keys contained in both formats MUST 271 be the same. 273 x509_encryption_url 274 OPTIONAL. URL for the Client's PEM encoded X.509 Certificate or 275 Certificate chain that the server can use to encrypt responses to 276 the Client. If the Client registers both "jwk_encryption_url" and 277 "x509_encryption_url", the keys contained in both formats MUST be 278 the same. 280 3. Client Registration Endpoint 282 The Client Registration Endpoint is an OAuth 2.0 Endpoint defined in 283 this document that is designed to allow a Client to register itself 284 with the Authorization Server. The Client Registration Endpoint MUST 285 accept HTTP POST messages with request parameters encoded in the 286 entity body using the "application/json" format. The Client 287 Registration Endpoint MUST be protected by a transport-layer security 288 mechanism, and the server MUST support TLS 1.2 RFC 5246 [RFC5246] 289 and/or TLS 1.0 [RFC2246] and MAY support additional transport-layer 290 mechanisms meeting its security requirements. When using TLS, the 291 Client MUST perform a TLS/SSL server certificate check, per RFC 6125 292 [RFC6125]. 294 The Client Registration Endpoint MAY accept an initial authorization 295 credential in the form of an OAuth 2.0 [RFC6749] access token in 296 order to limit registration to only previously authorized parties. 297 The method by which this access token is obtained by the registrant 298 is generally out-of-band and is out of scope of this specification. 300 In order to support open registration and facilitate wider 301 interoperability, the Client Registration Endpoint SHOULD allow 302 initial registration requests with no authentication. These requests 303 MAY be rate-limited or otherwise limited to prevent a denial-of- 304 service attack on the Client Registration Endpoint. 306 In order to facilitate registered clients updating their information, 307 the Client Registration Endpoint issues a Request Access Token for 308 clients to securely identify themselves in future connections to the 309 Client Update Endpoint. As such, the Client Update Endpoint MUST 310 accept requests with OAuth 2.0 Bearer Tokens [RFC6750] for these 311 operations, whether or not the initial registration call requires 312 authentication of some form. 314 The Client Registration Endpoint MUST ignore all parameters it does 315 not understand. 317 3.1. Client Registration Request 319 This operation registers a new Client to the Authorization Server. 320 The Authorization Server assigns this client a unique Client 321 Identifier, optionally assigns a Client Secret, and associates the 322 metadata given in the request with the issued Client Identifier. The 323 request includes any parameters described in Client Metadata 324 (Section 2) that the client wishes to specify for itself during the 325 registration. The Authorization Server MAY provision default values 326 for any items omitted in the Client Metadata. 328 The Client sends an HTTP POST to the Client Registration Endpoint 329 with a content type of "application/json" and all parameters as top- 330 level members of a JSON object. 332 For example, a client could send the following registration request 333 to the Client Registration Endpoint: 335 Following is a non-normative example request (with line wraps for 336 display purposes only): 337 POST /register HTTP/1.1 338 Accept: application/json 339 Host: server.example.com 341 { 342 "redirect_uris":["https://client.example.org/callback", 343 "https://client.example.org/callback2"] 344 "client_name":"My Example Client", 345 "token_endpoint_auth_method":"client_secret_basic", 346 "scope":"read write dolphin", 347 "logo_url":"https://client.example.org/logo.png", 348 "jwk_url":"https://client.example.org/my_rsa_public_key.jwk" 349 } 351 3.2. Client Registration Response 353 Upon successful registration, the Client Registration Endpoint 354 returns the newly-created Client Identifier and, if applicable, a 355 Client Secret. 357 Additionally, the Authorization Server SHOULD return all registered 358 metadata (Section 2) about this client, including any fields 359 provisioned by the Authorization Server itself. The Authorization 360 Server MAY reject or replace any of the client's requested metadata 361 values submitted during the registration request and substitute them 362 with suitable values. If the Authorization Server performs any such 363 substitutions to the requested values, it MUST return these values in 364 the response. 366 The response contains a "_links" structure which contains fully 367 qualified URLs to the Client Update Endpoint and the Client Secret 368 Rotation Endpoint for this specific client. The response also 369 contains a Registration Access Token that is to be used by the client 370 to perform subsequent operations at the Client Update Endpoint and 371 the Client Secret Rotation Endpoint. 373 The response is an "application/json" document with the following 374 parameters in addition to any applicable client metadata fields as 375 top-level members of a JSON object [RFC4627] . 377 client_id 378 REQUIRED. The unique Client identifier, MUST NOT be currently 379 valid for any other registered Client. 381 client_secret 382 OPTIONAL. The Client secret. If issued, this MUST be unique for 383 each "client_id". This value is used by confidential clients to 384 authenticate to the Token Endpoint as described in OAuth 2.0 385 Section 2.3.1. 387 registration_access_token 388 REQUIRED. The Access token to be used by the client to perform 389 actions on the Client Update Endpoint and the Client Secret 390 Rotation Endpoint. 392 issued_at 393 OPTIONAL. Specifies the timestamp when the Client Identifier was 394 issued. The timestamp value MUST be a positive integer. The 395 value is expressed in the number of seconds since January 1, 1970 396 00:00:00 GMT. 398 expires_at 399 REQUIRED if "client_secret" is issued. The number of seconds from 400 1970-01-01T0:0:0Z as measured in UTC that the "client_secret" will 401 expire or "0" if it does not expire. See RFC 3339 [RFC3339] for 402 details regarding date/times in general and UTC in particular. 404 _links 405 REQUIRED. A JSON object that contains references to the Client 406 Update Endpoint and Client Secret Rotation Endpoint, via the 407 following members: 409 self REQUIRED. A JSON object that contains the member href which 410 contains the fully qualified URL of the Client Update Endpoint 411 for this client. This MAY be constructed using a URL Template 412 of the Client Registration Endpoint with the issued client_id. 414 rotate_secret REQUIRED. A JSON object that contains the member 415 href which contains the fully qualified URL of the Client 416 Secret Rotation Endpoint for this client. This MAY be 417 constructed using a URL Template of the Client Registration 418 Endpoint with the issued client_id. 420 Following is a non-normative example response: 421 HTTP/1.1 200 OK 422 Content-Type: application/json 423 Cache-Control: no-store 425 { 426 _links: { 427 "self": { 428 "href": 429 "https://server.example.com/register/s6BhdRkqt3" 430 }, 431 "rotate_secret": { 432 "href": 433 "https://server.example.com/register/rotate_secret/s6BhdRkqt3" 434 } 435 "redirect_uris":["https://client.example.org/callback", 436 "https://client.example.org/callback2"] 437 "client_id":"s6BhdRkqt3", 438 "client_secret": "cf136dc3c1fc93f31185e5885805d", 439 "scope": "read write dolphin", 440 "grant_type": ["authorization_code", "refresh_token"] 441 "token_endpoint_auth_method": "client_secret_basic", 442 "logo_url": "https://client.example.org/logo.png", 443 "jwk_url": "https://client.example.org/my_rsa_public_key.jwk", 444 "registration_access_token": "reg-23410913-abewfq.123483", 445 "expires_at":2893276800 446 } 448 3.3. Client Registration Error Response 450 When an OAuth error condition occurs, the Client Registration 451 Endpoint returns an Error Response as defined in Section 5.2 of the 452 OAuth 2.0 specification. 454 When a registration error condition occurs, the Client Registration 455 Endpoint returns a HTTP 400 status code including a JSON object 456 [RFC4627] describing the error in the response body. 458 The JSON object contains two members: 460 error 461 The error code, a single ASCII string. 463 error_description 464 The additional text description of the error for debugging. 466 This specification defines the following error codes: 468 invalid_redirect_uri 469 The value of one or more "redirect_uris" is invalid. 471 invalid_client_metadata 472 The value of one of the client metadata (Section 2) fields is 473 invalid and the server has rejected this request. Note that an 474 Authorization server MAY choose to substitute a valid value for 475 any requested parameter of a client's metadata. 477 Following is a non-normative example of an error response (with line 478 wraps for display purposes only): 479 HTTP/1.1 400 Bad Request 480 Content-Type: application/json 481 Cache-Control: no-store 483 { 484 "error":"invalid_redirect_uri", 485 "error_description":"The redirect URI of http://sketchy.example.com 486 is not allowed for this server." 487 } 489 4. Client Update Endpoint 491 The Client Update Endpoint is an OAuth 2.0 protected endpoint that is 492 provisioned by the server for a specific client to be able to view 493 and update its registered information. It is RECOMMENDED that this 494 endpoint URL be formed through the use of a URL template which 495 combines the Client Registration Endpoint and the issued client_id 496 for this client, either as a path parameter 497 (https://server.example.com/register/client_id) or as a query 498 parameter (https://server.example.com/register/?update=client_id). 499 The Authorization Server MUST provide the client with the fully 500 qualified URL in the _links structure described in section 3 and MUST 501 NOT require the client to construct this URL on its own. 503 The Authorization Server MUST be able to determine the appropriate 504 client_id from the context of the request without requiring the 505 Client to explicitly send its own "client_id" in the request. 507 Operations on this endpoint are switched through the use of specific 508 HTTP verbs. 510 4.1. Client Update Request 512 This operation updates a previously-registered client with new 513 metadata at the Authorization Server. This request is authenticated 514 by the Registration Access Token issued to the client. 516 The Client makes an HTTP PUT request to the Client Update Endpoint 517 with a content type of "application/json". This request MAY include 518 any fields described in Client Metadata (Section 2). If included in 519 the request, valid values of Client Metadata fields in this request 520 MUST replace, not augment, the values previously associated with this 521 Client. Any fields with the value of a JSON "null" in Client 522 Metadata MUST be taken as a request to clear any existing value of 523 that field. Omitted values in the Client Metadata MUST remain 524 unchanged by the Authorization Server. The Authorization Server MAY 525 replace any invalid values with suitable values, and it MUST return 526 any such fields to the Client in the response. 528 For example, a client could send the following request to the Client 529 Registration Endpoint to update the client registration in the above 530 example: 532 Following is a non-normative example request (with line wraps for 533 display purposes only): 534 PUT /register/s6BhdRkqt3 HTTP/1.1 535 Accept: application/json 536 Host: server.example.com 537 Authorization: Bearer reg-23410913-abewfq.123483 539 { 540 "redirect_uri":["https://client.example.org/callback", 541 "https://client.example.org/alt"], 542 "client_name":"My New Example", 543 "logo_url":"https://client.example.org/newlogo.png" 544 } 546 4.2. Client Read Request 548 In order to read the current configuration of the Client on the 549 Authorization Server, the Client makes an HTTP GET request to the 550 Client Update Endpoint with the Registration Access Token. 552 Following is a non-normative example request (with line wraps for 553 display purposes only): 554 GET /register/s6BhdRkqt3 HTTP/1.1 555 Accept: application/json 556 Host: server.example.com 557 Authorization: Bearer reg-23410913-abewfq.123483 559 4.3. Client Update or Read Response 561 Upon successful update or read operation, the Client Update Endpoint 562 returns the Client ID. Additionally, the Authorization Server SHOULD 563 return all registered metadata (Section 2) about this client, 564 including any fields provisioned by the Authorization Server itself. 566 The Authorization Server MAY reject or replace any of the client's 567 requested metadata values submitted during an update request and 568 substitute them with suitable values. If the Authorization Server 569 performs any such substitutions to the requested values, it MUST 570 return these values in the response. 572 The Authorization Server MUST NOT include the Client Secret or 573 Request Access Token in this response. 575 The response is a JSON Document [RFC4627] with the following fields 576 as well as any applicable client metadata as top-level members of a 577 JSON object. 579 client_id 580 REQUIRED. The unique Client identifier, MUST equal the value of 581 the client_id returned in the original client_register request. 583 _links 584 REQUIRED. A JSON object that contains references to the Client 585 Update Endpoint and Client Secret Rotation Endpoint, via the 586 following members: 588 self REQUIRED. A JSON object that contains the member href which 589 contains the fully qualified URL of the Client Update Endpoint 590 for this client. This MAY be constructed using a URL Template 591 of the Client Registration Endpoint with the issued client_id. 593 rotate_secret REQUIRED. A JSON object that contains the member 594 href which contains the fully qualified URL of the Client 595 Secret Rotation Endpoint for this client. This MAY be 596 constructed using a URL Template of the Client Registration 597 Endpoint with the issued client_id. 599 Following is a non-normative example response: 600 HTTP/1.1 200 OK 601 Content-Type: application/json 602 Cache-Control: no-store 604 { 605 _links: { 606 "self": { 607 "href": "https://server.example.com/register/s6BhdRkqt3" 608 }, 609 "rotate_secret": { 610 "href": "https://server.example.com/register/s6BhdRkqt3/secret" 611 } 612 "client_id": "s6BhdRkqt3", 613 "client_name": "My New Example", 614 "redirect_uri": ["https://client.example.org/callback", 615 "https://client.example.org/alt"] 616 "scope": "read write dolphin", 617 "grant_type": ["authorization_code", "refresh_token"], 618 "token_endpoint_auth_method": "client_secret_basic", 619 "logo_url": "https://client.example.org/newlogo.png", 620 "jwk_url": "https://client.example.org/my_rsa_public_key.jwk", 621 } 623 4.4. Client Delete Request 625 In order to deprovision itself on the Authorization Server, the 626 Client makes an HTTP DELETE request to the Client Update Endpoint 627 with the Registration Access Token. This request is authenticated by 628 the Registration Access Token issued to the client. 630 Following is a non-normative example request (with line wraps for 631 display purposes only): 632 DELETE /register/s6BhdRkqt3 HTTP/1.1 633 Accept: application/json 634 Host: server.example.com 635 Authorization: Bearer reg-23410913-abewfq.123483 637 If a client has been successfully deprovisioned, the Authorization 638 Server responds with an HTTP 204 No Content message. 640 Following is a non-normative example response: 641 HTTP/1.1 204 No Content 642 Cache-Control: no-store 644 5. Client Secret Rotation 646 The Client Secret Rotation Endpoint is an OAuth 2.0 protected 647 endpoint that is provisioned by the server for a specific client to 648 be able to request rotation of its Registration Access Token and, if 649 it has one, Client Secret. It is RECOMMENDED that this endpoint URL 650 be formed through the use of a URL template which combines the Client 651 Registration Endpoint and the issued client_id for this client, 652 either as a path parameter 653 (https://server.example.com/register/rotate_secret/client_id) or as a 654 query parameter 655 (https://server.example.com/register/?rotate_secret=client_id). The 656 Authorization Server MUST provide the client with the fully qualified 657 URL in the _links structure described in section 3, and MUST NOT 658 require the Client to construct this URL on its own. 660 The Authorization Server MUST be able to determine the appropriate 661 client_id from the context of the request without requiring the 662 Client to explicitly send its own "client_id" in the request. 664 5.1. Rotate Secret Request 666 This operation allows the client to rotate its current Registration 667 Access Token as well as its Client Secret, if it has one. The client 668 sends an HTTP POST with its current Registration Access Token. This 669 request is authenticated by the Registration Access Token issued to 670 the client. 672 Following is a non-normative example request (with line wraps for 673 display purposes only): 674 POST /register/rotate_secret/s6BhdRkqt3 HTTP/1.1 675 Accept: application/json 676 Host: server.example.com 677 Authorization: Bearer reg-23410913-abewfq.123483 679 5.2. Rotate Secret Response 681 Upon successful rotation of the Registration Access Token, and 682 optionally the Client Secret, the Client Registration Endpoint 683 returns a JSON document [RFC4627] with the following fields as top- 684 level members of the root JSON object. This response MUST NOT 685 include any other client metadata. 687 client_id 688 REQUIRED. The unique Client identifier, MUST match the client_id 689 issued in the original registration request. 691 client_secret 692 REQUIRED if the server initially issued this Client a Client 693 Secret, otherwise the server MUST NOT return a value. The value 694 MUST be unique for each "client_id". 696 registration_access_token 697 REQUIRED. The Access token to be used by the client to perform 698 subsequent "client_update" and "rotate_secret" requests. 700 issued_at 701 OPTIONAL. Specifies the timestamp when the identifier was issued. 702 The timestamp value MUST be a positive integer. The value is 703 expressed in the number of seconds since January 1, 1970 00:00:00 704 GMT. 706 expires_at 707 REQUIRED if the server issues a Client Secret. The number of 708 seconds from 1970-01-01T0:0:0Z as measured in UTC that the 709 "client_secret" will expire or "0" if they do not expire. See RFC 710 3339 [RFC3339] for details regarding date/times in general and UTC 711 in particular. 713 Following is a non-normative example response: 714 HTTP/1.1 200 OK 715 Content-Type: application/json 716 Cache-Control: no-store 718 { 719 "client_id":"s6BhdRkqt3", 720 "client_secret": "7fce6c93f31185e5885805d", 721 "registration_access_token": "reg-02348913-oieqer.983421", 722 "expires_at":2893276800 723 } 725 The Authorization Server SHOULD discard and invalidate the Request 726 Access Token and the Client Secret associated with this Client after 727 successful completion of this request. 729 6. IANA Considerations 731 This document makes no requests of IANA. 733 7. Security Considerations 735 [[ Editor's note: Following are some security considerations taken 736 from the UMA and OpenID Connect source drafts. These need to be 737 massaged into a properly generic set of considerations. ]] 739 Since requests to the Client Registration Endpoint result in the 740 transmission of clear-text credentials (in the HTTP request and 741 response), the server MUST require the use of a transport-layer 742 security mechanism when sending requests to the Registration 743 Endpoint. The server MUST support TLS 1.2 RFC 5246 [RFC5246] and/or 744 TLS 1.0 [RFC2246] and MAY support additional transport-layer 745 mechanisms meeting its security requirements. When using TLS, the 746 Client MUST perform a TLS/SSL server certificate check, per RFC 6125 747 [RFC6125]. 749 As this endpoint is an OAuth2 Protected Resource, requests to the 750 Registration Endpoint SHOULD have some rate limiting on failures to 751 prevent the Registration Access Token from being disclosed though 752 repeated access attempts. 754 The authorization server MUST treat all client metadata as self- 755 asserted. A rogue Client might use the name and logo for the 756 legitimate Client, which it is trying to impersonate. An 757 Authorization Server needs to take steps to mitigate this phishing 758 risk, since the logo could confuse users into thinking they're 759 logging in to the legitimate Client. For instance, an Authorization 760 Server could warn if the domain/site of the logo doesn't match the 761 domain/site of redirect URIs. An Authorization Server can also 762 present warning messages to end users about untrusted Clients in all 763 cases, especially if such clients have been dynamically registered 764 and have not been trusted by any users at the Authorization Server 765 before. 767 In a situation where the Authorization Server is supporting open 768 Client registration, it must be extremely careful with any URL 769 provided by the Client that will be displayed to the user (e.g. 770 "logo_url" and "policy_url"). A rogue Client could specify a 771 registration request with a reference to a drive-by download in the 772 "policy_url". The Authorization Server should check to see if the 773 "logo_url" and "policy_url" have the same host as the hosts defined 774 in the array of "redirect_uris". 776 While the Client Secret can expire, the Registration Access Token 777 should not expire while a client is still actively registered. If 778 this token were to expire, a Client could be left in a situation 779 where it has no means of updating itself and must register itself 780 anew. As the Registration Access Tokens are long-term credentials, 781 they MUST be protected by the Client as a secret. [[ Editor's note: 782 with the right error codes returned from client_update, the AS could 783 force the Client to call rotate_secret before going forward, 784 lessening the window for abuse of a leaked registration token. ]] 785 Since the Registration Access Token is a Bearer token and acts as the 786 sole authentication for use at the Client Update Endpoint, it MUST be 787 protected by the Client as described in OAuth 2.0 Bearer [RFC6750]. 789 8. Acknowledgments 791 The authors thank the OAuth Working Group, the User-Managed Access 792 Working Group, and the OpenID Connect Working Group participants for 793 their input to this document. In particular, the following 794 individuals have been instrumental in their review and contribution 795 to various versions of this document: Torsten Lodderstedt, Eve Maler, 796 Thomas Hardjono, Christian Scholz, Nat Sakimura, George Fletcher, 797 Amanda Anganes, and Domenico Catalano. 799 9. Document History 801 [[ to be removed by RFC editor before publication as an RFC ]] 803 - 05 805 o changed redirect_uri and contact to lists instead of space 806 delimited strings 808 o removed operation parameter 810 o added _links structure 812 o made client update management more RESTful 814 o split endpoint into three parts 816 o changed input to JSON from form-encoded 818 o added READ and DELETE operations 820 o removed Requirements section 822 o changed token_endpoint_auth_type back to 823 token_endpoint_auth_method to match OIDC who changed to match us 825 - 04 827 o removed default_acr, too undefined in the general OAuth2 case 829 o removed default_max_auth_age, since there's no mechanism for 830 supplying a non-default max_auth_age in OAuth2 832 o clarified signing and encryption URLs 834 o changed token_endpoint_auth_method to token_endpoint_auth_type to 835 match OIDC 837 - 03 839 o added scope and grant_type claims 841 o fixed various typos and changed wording for better clarity 843 o endpoint now returns the full set of client information 845 o operations on client_update allow for three actions on metadata: 846 leave existing value, clear existing value, replace existing value 847 with new value 849 - 02 851 o Reorganized contributors and references 853 o Moved OAuth references to RFC 855 o Reorganized model/protocol sections for clarity 857 o Changed terminology to "client register" instead of "client 858 associate" 860 o Specified that client_id must match across all subsequent requests 862 o Fixed RFC2XML formatting, especially on lists 864 - 01 866 o Merged UMA and OpenID Connect registrations into a single document 868 o Changed to form-paramter inputs to endpoint 870 o Removed pull-based registration 872 - 00 874 o Imported original UMA draft specification 876 10. Normative References 878 [JWK] Jones, M., "JSON Web Key (JWK)", May 2012. 880 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 881 Requirement Levels", BCP 14, RFC 2119, March 1997. 883 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 884 RFC 2246, January 1999. 886 [RFC3339] Klyne, G., Ed. and C. Newman, "Date and Time on the 887 Internet: Timestamps", RFC 3339, July 2002. 889 [RFC4627] Crockford, D., "The application/json Media Type for 890 JavaScript Object Notation (JSON)", RFC 4627, July 2006. 892 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 893 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 895 [RFC6125] Saint-Andre, P. and J. Hodges, "Representation and 896 Verification of Domain-Based Application Service Identity 897 within Internet Public Key Infrastructure Using X.509 898 (PKIX) Certificates in the Context of Transport Layer 899 Security (TLS)", RFC 6125, March 2011. 901 [RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", 902 RFC 6749, October 2012. 904 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 905 Framework: Bearer Token Usage", RFC 6750, October 2012. 907 Authors' Addresses 909 Justin Richer (editor) 910 The MITRE Corporation 912 Phone: 913 Fax: 914 Email: jricher@mitre.org 915 URI: 917 John Bradley 918 Ping Identity 920 Email: ve7jtb@ve7jtb.com 922 Michael B. Jones 923 Microsoft 925 Email: mbj@microsoft.com 927 Maciej Machulak 928 Newcastle University 930 Email: m.p.machulak@ncl.ac.uk 931 URI: http://ncl.ac.uk/