Skip to content

Commit 4b09863

Browse files
committed
Rework for Client ID Prefix draft compatibility
1 parent 6be825a commit 4b09863

File tree

1 file changed

+73
-18
lines changed

1 file changed

+73
-18
lines changed

draft-parecki-oauth-client-id-metadata-document.md

Lines changed: 73 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ normative:
3636
RFC7591:
3737
RFC8414:
3838
I-D.draft-ietf-oauth-security-topics:
39+
I-D.draft-parecki-oauth-client-id-prefix:
40+
title: "OAuth 2.0 Client ID Prefix"
41+
target: https://drafts.aaronpk.com/oauth-client-id-prefix/draft-parecki-oauth-client-id-prefix.html
42+
date: 2025-04-24
3943

4044
informative:
4145
IndieAuth:
@@ -127,17 +131,27 @@ at each authorization server.
127131

128132
# Client Identifier
129133

130-
This specification defines the client identifier as a URL with the following
131-
restrictions. Client identifier URLs MUST have an "https" scheme, MUST contain a
132-
path component, MUST NOT contain single-dot or double-dot path segments, MUST
133-
NOT contain a fragment component and MUST NOT contain a username or password
134-
Client identifier URLs SHOULD NOT include a query string component, and MAY contain a port.
134+
This specification defines the `client-id-metadata-document` prefix for OAuth 2.0
135+
Client Identifiers, per {{I-D.draft-parecki-oauth-client-id-prefix}}.
136+
137+
This Client Identifier scheme can also use bare `https://` URLs for backwards
138+
compatibility with previous versions of this specification and the prior-art
139+
upon which this specification is based (i.e., [Solid-OIDC]), however, this is discouraged.
140+
141+
This specification defines the Client Identifier as a string starting with
142+
`client-id-metadata-document:` followed by a URL (the client ID metadata
143+
document URL) with the following restrictions:
144+
145+
* The URL MUST have a "https" scheme, MUST contain a path component, MUST NOT contain single-dot or
146+
double-dot path segments, MUST NOT contain a fragment component and MUST NOT
147+
contain a username or password.
148+
* The URL SHOULD NOT include a query string component, and MAY contain a port.
135149

136150
This specification places no restrictions on what URL is used as
137151
a client identifier. A short URL is RECOMMENDED, since the URL may
138152
be displayed to the end user in the authorization interface or in
139153
management interfaces. Usage of a stable URL that does not frequently
140-
change for the client is also RECOMMENDED.
154+
change for the client is RECOMMENDED.
141155

142156
# Client Information Discovery
143157

@@ -147,27 +161,45 @@ can be used during an OAuth flow, such as presenting information about
147161
the client to the user in an authorization consent screen, for example the
148162
client name and logo.
149163

150-
The authorization server SHOULD fetch the document indicated by the `client_id`
151-
to retrieve the client registration information.
164+
The authorization server MUST check that the `client_id` starts with
165+
`client-id-metadata-document:` and then fetch the document indicated by the
166+
URL that follows to retrieve the client registration information.
167+
168+
The authorization server MAY allow following this specification and fetching the
169+
client ID metadata document using a bare `https://` URL as the `client_id`,
170+
however this is discouraged in favour of using the client ID prefix scheme.
152171

153-
## Client Metadata
172+
The authorization server SHOULD respect `cache-control` headers returned by the
173+
HTTP request for the Client ID Metadata Document. For more information see
174+
{{client-metadata-caching}}.
154175

155-
The client metadata document URL is a JSON document containing the metadata
176+
## Client Metadata Documents
177+
178+
The client ID metadata document URL is a JSON document containing the metadata
156179
of the client. The client metadata values are the values defined in
157180
the OAuth Dynamic Client Registration Metadata OAuth Parameters registry
158181
<https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#client-metadata>.
159182

160183
The client metadata document MUST contain a `client_id` property whose value
161-
MUST compare and match the URL of the document using simple string comparison as
184+
MUST compare and match the URL of the document prefixed with
185+
`client-id-metadata-document:` using simple string comparison as defined in
186+
[RFC3986] Section 6.2.1.
187+
188+
If the `client_id` used with the authorization server does not use the
189+
`client-id-metadata-document:` scheme, then the `client_id` property MUST
190+
compare and match the URL of the document using simple string comparison as
162191
defined in [RFC3986] Section 6.2.1.
163192

164193
The client metadata document MAY define additional properties in the response.
165194
The client metadata document MAY also be served with more specific content types
166195
as long as the response is JSON and conforms to `application/<AS-defined>+json`.
167196

197+
All URLs contained within the Client ID Metadata Document must be absolute and
198+
SHOULD NOT use the `data:` or `javascript:` scheme.
199+
168200
As there is no way to establish a shared secret to be used with client metadata
169-
documents, the following restrictions apply on the contents of the
170-
client metadata document:
201+
documents, the following restrictions apply on the contents of the client metadata
202+
document:
171203

172204
* the `token_endpoint_auth_method` property MUST NOT include `client_secret_post`
173205
or `client_secret_basic`
@@ -176,21 +208,25 @@ or `client_secret_basic`
176208
See {{client_authentication}} for more details.
177209

178210
Other specifications MAY place additional restrictions on the contents of the
179-
client metadata document accepted by authorization servers implementing their
211+
client ID metadata document accepted by authorization servers implementing their
180212
specification, for instance, preventing the registration of confidential clients
181213
by requiring the `token_endpoint_auth_method` property be set to `"none"`.
182214

183215
TBD: We may want a property such as `client_id_expires_at` for indicating that the client is ephemeral and not valid after a given timestamp, especially for documents issued by a service for development purposes.
184216

185-
## Metadata Discovery Errors
217+
## Client Metadata Discovery Errors
186218

187219
If fetching the metadata document fails, the authorization server SHOULD abort the
188220
authorization request.
189221

190-
## Metadata Caching
222+
## Client Metadata Caching {#client-metadata-caching}
191223

192224
The authorization server MAY cache the client metadata it discovers at the
193-
client metadata document URL.
225+
client metadata document URL. The authorization server SHOULD respect the
226+
cache-control headers returned by the server serving the client ID metadata
227+
document.
228+
229+
TBD: Is there an RFC we should reference with regards to cache-control headers?
194230

195231
TBD: recommend a cache lifetime? considerations about stale data?
196232

@@ -221,6 +257,9 @@ Authorization servers that publish Authorization Server Metadata {{RFC8414}} MUS
221257

222258
This enables clients to avoid sending the user to a dead end, by only redirecting the user to an authorization server that supports this specification. Otherwise, the client would redirect the user and the user would be met with an error about an invalid client as described by Section 4.1.2.1 of {{RFC6749}}.
223259

260+
The `client_id_prefixes_supported` property of the Authorization Server Metadata {{RFC8414}} SHOULD include `client-id-metadata-document` if following {{I-D.draft-parecki-oauth-client-id-prefix}}.
261+
262+
TBD: Do we need this paragraph, or is defining it in the IANA considerations enough?
224263

225264
# Security Considerations
226265

@@ -283,11 +322,21 @@ Caching of the `logo_uri` response can additionally prevent cross-domain trackin
283322

284323
The following authorization server metadata value is defined by this specification and registered in the IANA "OAuth Authorization Server Metadata" registry established in OAuth 2.0 Authorization Server Metadata [RFC8414].
285324

286-
* Metadata Name: `client_id_metadata_document_supported`:
325+
* Metadata Name: `client_id_metadata_document_supported`
287326
* Metadata Description: JSON boolean value specifying whether the authorization server supports retrieving client metadata from a `client_id` URL.
288327
* Change Controller: IETF
289328
* Specification Document: {{as-metadata}} of {{&SELF}}
290329

330+
## OAuth Client ID Prefix
331+
332+
TBD: Is there a registry for these values?
333+
334+
The following value is defined for the {{I-D.draft-parecki-oauth-client-id-prefix}} scheme is defined:
335+
336+
* Name: `client-id-metadata-document`
337+
* Description: Indicates support for the Client ID Metadata Documents specification.
338+
* Change Controller: IETF
339+
* Specification Document: {{I-D.draft-parecki-oauth-client-id-prefix}} and {{&SELF}}
291340

292341

293342
--- back
@@ -305,6 +354,12 @@ The authors would like to thank the following people for their contributions and
305354

306355
(This appendix to be deleted by the RFC editor in the final specification.)
307356

357+
-03
358+
359+
* Reworked for {{I-D.draft-parecki-oauth-client-id-prefix}}
360+
* Added caching considerations
361+
* Added restrictions on URLs contained within Client ID Metadata Documents.
362+
308363
-02
309364

310365
* Added security consideration around displaying logos to end users

0 commit comments

Comments
 (0)