Skip to content

Advertise Client ID Metadata Document support in discovery (client_id_metadata_document_supported) #904

Description

@jmarette

Preflight Checklist

  • I could not find a solution in the existing issues, docs, nor discussions

Describe your problem

The OAuth Client ID Metadata Document draft (draft-ietf-oauth-client-id-metadata-document, OAuth WG) lets a client use an HTTPS URL as its client_id, where the URL resolves to a client metadata document. An Authorization Server that supports this advertises it through a standard Authorization Server Metadata field, client_id_metadata_document_supported (boolean, Section 5 of the draft).

DiscoveryConfiguration in pkg/oidc/discovery.go has no field for this today, so a provider built on this library cannot announce the capability in its /.well-known/openid-configuration.

Motivation: this is the discovery building block for adding MCP authorization to providers built on zitadel/oidc. MCP's client identification work (modelcontextprotocol SEP-991) relies on CIMD so MCP clients can be identified by URL without prior registration.

Describe your ideal solution

Add a single additive boolean field to DiscoveryConfiguration:

// ClientIDMetadataDocumentSupported indicates whether the OP can resolve a client_id that is an
// HTTPS URL pointing to a client metadata document, per the OAuth Client ID Metadata Document spec.
ClientIDMetadataDocumentSupported bool `json:"client_id_metadata_document_supported,omitempty"`

plus a JSON (de)serialization test.

Scope is intentionally minimal:

  • No change to the op.Server interface.
  • No handler and no CIMD resolution logic (that lives in the AS implementation).
  • omitempty, so existing providers see no change in their discovery output.

Wiring an op option to set the flag from configuration can be a follow-up, following the pattern discussed for registration_endpoint in #763 / #782.

Additional context

Happy to raise the PR (additive, no interface change).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions