Skip to content

Clarify the security implications of using query parameters in client_id to dynamically generate metadata documents #23

@birdhalfbaked

Description

@birdhalfbaked

While reading the draft, it currently seems to allow broad use of query parameters in the client_id for sending information that a guides the use of metadata that should be retrieved in the flows.

Client identifier URLs MAY contain a query string component and MAY contain a port.
This specification places no restrictions on what URL is used as a client identifier. A short URL is RECOMMENDED, since the URL may be displayed to the end user in the authorization interface or in management interfaces. Usage of a stable URL that does not frequently change for the client is also RECOMMENDED.

(emphasis mine)

We already see some implementations using this to facilitate development by passing OAuth metadata (e.g. scope and redirect_uris) such as with ATProto's use of OAuth in the localhost exception case, and as written this may mistakenly encourage the use of dynamically-generated metadata documents from user-given inputs even in non-development use cases which can undermine the mechanisms herein.

e.g. client_id: https://someurl.com?scope=scope1%20scope2 is allowed, but should be strongly discouraged outside of local development contexts.

This discouragement could fit well in the additional Security Considerations I am thinking. Something along the lines "Authorization servers SHOULD reject the use of query params to dynamically generate metadata outside of development contexts where other methods of generating metadata documents are not practical."

Wording probably needs work :P Also reinforces some good ideas I've seen around setting up a service for development metadata documents like in #12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions