Skip to content

Commit d69da84

Browse files
authored
Merge pull request #24 from ThisIsMissEm/feat/improve-development-usage
Improve documentation for development usage, prohibiting query parameters in document URLs
2 parents e2fa17b + e3a35cd commit d69da84

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

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

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ This specification defines the client identifier as a URL with the following
131131
restrictions. Client identifier URLs MUST have an "https" scheme, MUST contain a
132132
path component, MUST NOT contain single-dot or double-dot path segments, MUST
133133
NOT contain a fragment component and MUST NOT contain a username or password
134-
component. Client identifier URLs MAY contain a query string component and MAY
135-
contain a port.
134+
Client identifier URLs SHOULD NOT include a query string component, and MAY contain a port.
136135

137136
This specification places no restrictions on what URL is used as
138137
a client identifier. A short URL is RECOMMENDED, since the URL may
@@ -166,15 +165,23 @@ The client metadata document MAY define additional properties in the response.
166165
The client metadata document MAY also be served with more specific content types
167166
as long as the response is JSON and conforms to `application/<AS-defined>+json`.
168167

169-
The `token_endpoint_auth_method` property MUST NOT include `client_secret_post`
170-
or `client_secret_basic`, as there is no way to establish a shared secret to be
171-
used with these authentication methods. See {{client_authentication}} for more details.
168+
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:
171+
172+
* the `token_endpoint_auth_method` property MUST NOT include `client_secret_post`
173+
or `client_secret_basic`
174+
* the `client_secret` and `client_secret_expires_at` properties MUST NOT be used
175+
176+
See {{client_authentication}} for more details.
172177

173178
Other specifications MAY place additional restrictions on the contents of the
174179
client metadata document accepted by authorization servers implementing their
175180
specification, for instance, preventing the registration of confidential clients
176181
by requiring the `token_endpoint_auth_method` property be set to `"none"`.
177182

183+
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.
184+
178185
## Metadata Discovery Errors
179186

180187
If fetching the metadata document fails, the authorization server SHOULD abort the
@@ -219,6 +226,12 @@ This enables clients to avoid sending the user to a dead end, by only redirectin
219226

220227
In addition to the security considerations in OAuth 2.0 Core {{RFC6749}}, and OAuth 2.0 Threat Model and Security Considerations {{RFC6819}}, and {{I-D.draft-ietf-oauth-security-topics}} the additional considerations apply.
221228

229+
## Client ID Metadata Documents for Development Purposes {#documents_for_development}
230+
231+
When developing applications against a service that uses Client ID Metadata Documents, developers often encounter the issue of "how do I serve a Client ID Metadata Document at a https URL whilst developing my application?".
232+
233+
For this purpose, it is recommended to either host a document on a webserver somewhere that describes the application under development (e.g., using localhost redirect URIs), or to use a service which can generate and host a Client ID Metadata Document for you. Such a service should issue URLs that are stable.
234+
222235
## Client Authentication {#client_authentication}
223236

224237
Since the client establishes its own registration data at the authorization server,
@@ -295,6 +308,9 @@ The authors would like to thank the following people for their contributions and
295308
-02
296309

297310
* Added security consideration around displaying logos to end users
311+
* Changed query string parameters in Client ID Metadata Document URLs to "SHOULD NOT", since this encourages bad security practices (e.g., minting documents based on query string parameters)
312+
* Added prohibition on the `client_secret_expires_at` property, as it is not relevant for Client ID Metadata Documents.
313+
* Added security consideration for development use-cases.
298314

299315
-01
300316

0 commit comments

Comments
 (0)