RFC 7592 — OAuth 2.0 Dynamic Client Registration Management

Implemented (admin/DCRManagementHandler)

RFC 7592 — OAuth 2.0 Dynamic Client Registration Management

Status: Standards Track
Published: 2015-07
L-tier / T-tier: L3 · T0 (setup) + ongoing lifecycle
OneAuth coverage: Implemented (admin/DCRManagementHandler)
See also: RFC_7591.md · LANDSCAPE.md

In one sentence

RFC 7592 is the management half of DCR — after a client registers via
RFC 7591, 7592 lets that client read, update, or delete its
own registration via GET / PUT / DELETE /register/{client_id}, authenticated
by the registration_access_token issued at registration.

What problem does it solve?

Without 7592 With 7592
Once a client is registered, updating its metadata (new redirect URI, name change, scope adjustment) requires admin intervention Client self-services via PUT /register/{client_id}
Decommissioned clients linger forever; cleanup needs custom tooling DELETE /register/{client_id} cleans up
Clients can’t audit their own registered state GET /register/{client_id} returns the live record
Registration access tokens never rotate PUT returns a rotated registration_access_token

7591 is the “create”; 7592 is the “read / update / delete.” Together they
make DCR a full CRUD surface. Most production deployments ship both
together — 7591 alone is half a feature.

Relatable example

Continuing the Slack/Acme calendar example from RFC_7591.md:
six months after the initial registration, Acme renames the integration.
With 7592:

requests.put(
    creds["registration_client_uri"],                    # from initial DCR
    headers={"Authorization": f"Bearer {creds['registration_access_token']}"},
    json={
        "client_id":     "s6BhdRkqt3",                    # required
        "client_name":   "Acme Calendar Pro",              # the actual change
        "redirect_uris": ["https://acme.example.com/oauth/cb"],
        "grant_types":   ["authorization_code", "refresh_token"],
        "scope":         "calendar.read calendar.write events.read"  # also adding a scope
    }
)

The AS validates the registration_access_token, applies the changes,
rotates the registration token (per §2.2), and returns the updated client.
No human in the loop.

Acme later sunsets the integration: DELETE against the same URL with the
same token. Cleanup.

Key concepts

  1. Three operations on /register/{client_id} (= the
    registration_client_uri from the 7591 response):
    • GET — read the current registration
    • PUT — replace (not patch) the registration; whole metadata document
      required
    • DELETE — remove the client
  2. Bearer-token-authed. Every management request carries
    Authorization: Bearer <registration_access_token>. The token is
    client-scoped — it only authorizes operations on that client’s
    registration.
  3. PUT is a full replace, not a patch. Per §2.2, the request body
    must include the complete client metadata; omitted fields are removed.
    This avoids the merge-semantics ambiguity that bites JSON-merge APIs.
  4. PUT rotates the registration access token. Per §2.2, the response
    includes a new registration_access_token that supersedes the one
    used to make the request. Old token is invalidated. This is exactly
    the same pattern as refresh-token rotation (RFC 9700 §4.14).
  5. DELETE is irrevocable. No undo. The registration access token
    dies with the registration (§2.3), so a second DELETE with the same
    token gets 401 invalid_token, the same answer as an unknown client.

Wire example

Read current registration:

GET /apps/dcr/s6BhdRkqt3 HTTP/1.1
Host: as.example.com
Authorization: Bearer reg-tok-abcdef...
HTTP/1.1 200 OK
Content-Type: application/json

{
  "client_id":     "s6BhdRkqt3",
  "client_name":   "Acme Calendar Integration",
  "redirect_uris": ["https://acme.example.com/oauth/cb"],
  ...
}

Update (full replace) with registration-token rotation:

PUT /apps/dcr/s6BhdRkqt3 HTTP/1.1
Host: as.example.com
Authorization: Bearer reg-tok-abcdef...
Content-Type: application/json

{
  "client_id":     "s6BhdRkqt3",
  "client_name":   "Acme Calendar Pro",
  "redirect_uris": ["https://acme.example.com/oauth/cb"],
  "grant_types":   ["authorization_code", "refresh_token"],
  "scope":         "calendar.read calendar.write events.read"
}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "client_id":                 "s6BhdRkqt3",
  "client_name":               "Acme Calendar Pro",
  "redirect_uris":             ["https://acme.example.com/oauth/cb"],
  ...
  "registration_access_token": "reg-tok-NEWROT-xyz...",     ← rotated; old token now invalid
  "registration_client_uri":   "https://as.example.com/apps/dcr/s6BhdRkqt3"
}

Delete:

DELETE /apps/dcr/s6BhdRkqt3 HTTP/1.1
Host: as.example.com
Authorization: Bearer reg-tok-NEWROT-xyz...
HTTP/1.1 204 No Content

Where it lands on the OAuth abstraction

  • L3 client onboarding. 7592 is the manage slot at T0/T8 paired with
    7591’s create slot.
  • T0 (setup) + ongoing. Most management calls happen long after T0 —
    during the deployment lifecycle.
  • 7592 is the spec that makes self-service client management possible. Its
    rotation discipline (§2.2) is a small but important security property
    often missed by hand-rolled management APIs.

OAuth 2.0 status

Part of the 2.0 ecosystem from 2015 (same day as 7591). Adoption is
correlated with 7591 adoption — IdPs that ship one usually ship the other.

OAuth 2.1 status

Not changed by 2.1. The management contract carries through with no spec
deltas.

Migration path

If you’ve shipped 7591 (initial registration) but not 7592 (management):

  1. Stand up the management endpoint at /register/{client_id} (or
    whatever path matches the registration_client_uri you’ve been
    returning).
  2. Validate registration_access_token on every request. The token is
    tied to a specific client_id; reject token-for-A used to manage B.
  3. Rotate on PUT. Don’t ship PUT without rotation; the rotation
    discipline matters.
  4. Add deletion auditing. DELETE removes the client, but you may
    want to retain an audit trail (when, by whom).

The pattern matches OneAuth’s existing implementation:
admin/client_management.go documents the rotation contract explicitly
(“On success the registration_access_token is rotated”).

When NOT to use it

  • Deployments with strict change-control policies may want admin
    approval for any client metadata change. The DCR-management endpoint
    is by design self-service; that bypasses change control.
  • OAuth 2.0 strict-mode deployments without 7591 don’t need 7592 —
    manually provisioned clients have no DCR-issued access token to
    authenticate management calls.

OneAuth status

7592 surface Status Where (grep-verified) Notes
GET /apps/dcr/{client_id} (read) Implemented admin/dcr_management.go DCRManagementHandler.ServeHTTP → ClientRegistrationManager.GetRegistration (admin/client_management.go), implemented by AppRegistrar.GetRegistration Omits client_secret
PUT /apps/dcr/{client_id} (update + rotation) Implemented admin/registrar.go AppRegistrar.UpdateRegistration; rotation contract documented on ClientRegistrationManager.UpdateRegistration Response carries the new token. Changing token_endpoint_auth_method is refused with invalid_client_metadata
PUT metadata validation Implemented AppRegistrar.UpdateRegistration runs validateRedirectURIs and validateClientMetadata, the checks registration uses Bad redirect URIs answer invalid_redirect_uri; unsupported or conflicting auth method and grant types answer invalid_client_metadata (0.1.50)
DELETE /apps/dcr/{client_id} Implemented admin/registrar.go AppRegistrar.DeleteRegistration: token check, store delete, then the client’s key is dropped from KeyStore 204 on success. Not idempotent on the wire: a repeat DELETE finds no registration and answers 401 invalid_token
Bearer-token caller authentication Implemented AppRegistrar.GetRegistration / UpdateRegistration / DeleteRegistration compare AccessToken with the stored registration_access_token in constant time Wrong token, missing token and unknown client all return ErrUnauthorized (401), so client IDs can’t be probed
Token-vs-client matching Implemented Same methods; the token is looked up on the client_id from the path, and DCRManagementHandler.handlePut requires the body client_id to match it Defense against cross-client management
Full-replace semantics (not merge) Implemented AppRegistrar.UpdateRegistration overwrites every editable field from the request —
Response caching Implemented DCRManagementHandler.handleGet / handlePut / handleDelete Cache-Control: no-store on every success response (0.1.44)
Admin view of registrations Implemented AppRegistrar.GetClient / ListClients blank RegistrationAccessToken The admin routes no longer return a client’s management token (0.1.44)
Test coverage Implemented admin/dcr_management_test.go (TestDCRManagement_GET_HappyPath, TestDCRManagement_GET_WrongToken, TestUpdateRegistration_HappyPath_RotatesToken, TestDeleteRegistration_HappyPath, and others); admin/dcr_validation_test.go —
  • RFC 7591 — DCR Initial Registration; the pair to this spec
  • RFC 8414 — AS metadata advertises registration_endpoint
  • RFC 9700 — §4.14 rotation discipline mirrors the 7592 §2.2 rotation pattern (different tokens, same principle)
  • OIDC Dynamic Client Registration 1.0 — OIDC management superset