Skip to content

Commit f77abb9

Browse files
committed
Add information addressing redirect security concerns
1 parent f681637 commit f77abb9

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

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

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ normative:
3434
RFC6749:
3535
RFC6819:
3636
RFC7591:
37+
RFC8259:
3738
RFC8414:
3839
RFC9700:
3940

@@ -151,22 +152,37 @@ the client to the user in an authorization consent screen, for example the
151152
client name and logo.
152153

153154
The authorization server SHOULD fetch the document indicated by the `client_id`
154-
to retrieve the client registration information.
155-
156-
## Client Metadata
157-
158-
The client metadata document URL is a JSON document containing the metadata
159-
of the client. The client metadata values are the values defined in
160-
the OAuth Dynamic Client Registration Metadata OAuth Parameters registry
155+
to retrieve the client registration information. A successful response MUST use
156+
the 200 OK HTTP status code, have the content type of `application/json` or a more
157+
specific content type that conforms to `application/<AS-defined>+json`, and be a
158+
valid JSON object {{RFC8259}}. The authorization server MUST treat all other
159+
HTTP status codes and content types as an error response. The authorization
160+
server MUST NOT automatically follow HTTP redirects when retrieving the client
161+
registration information.
162+
163+
If authorization server encounters an error response when retrieving the client
164+
registration information, the authorization server SHOULD abort the
165+
authorization request. The authorization server MAY use error responses to
166+
inform their security policies.
167+
168+
## Client Metadata Document
169+
170+
A Client Metadata Document is a JSON document {{RFC8259}} containing the client
171+
registration information for the client. The properties of the Client Metadata
172+
Document are the values defined in the OAuth Dynamic Client Registration
173+
Metadata OAuth Parameters registry
161174
<https://www.iana.org/assignments/oauth-parameters/oauth-parameters.xhtml#client-metadata>.
162175

163176
The client metadata document MUST contain a `client_id` property whose value
164177
MUST match the URL of the document using simple string comparison as
165178
defined in [RFC3986] Section 6.2.1.
166179

167180
The client metadata document MAY define additional properties in the response.
168-
The client metadata document MAY also be served with more specific content types
169-
as long as the response is JSON and conforms to `application/<AS-defined>+json`.
181+
182+
The client metadata document should be served with a 200 OK HTTP status code,
183+
have the content type of `application/json` or a more specific content type that
184+
conforms to `application/<AS-defined>+json`, and be a valid JSON object
185+
{{RFC8259}}.
170186

171187
As there is no way to establish a shared secret to be used with client metadata
172188
documents, the following restrictions apply on the contents of the
@@ -196,14 +212,8 @@ To enable developers to author applications on their machines, without exposing
196212

197213
A Client ID Metadata Document Service is a web service through which developers can acquire a stable URL to a Client ID Metadata Document. This service MAY expire clients from time to time, and MAY require developers to provide additional information about the client being developed.
198214

199-
200215
By providing at least one Client ID Metadata Document Service, an authorization server can enable developers to create applications, and still indicate to non-technical people that the client that they are about to authorize is currently under-development and may not be trustworthy or secure.
201216

202-
## Metadata Discovery Errors
203-
204-
If fetching the metadata document fails, the authorization server SHOULD abort the
205-
authorization request.
206-
207217
## Metadata Caching
208218

209219
The authorization server MAY cache the client metadata it discovers at the

0 commit comments

Comments
 (0)