Skip to content

Identity Assertion Grant uses raw authorization server URL as token-exchange audience #1617

Description

@halter73

IdentityAssertionGrantProvider.GetAccessTokenAsync (added in #1305) passes authorizationServerUrl.ToString() directly as the audience (and resourceUrl.ToString() as the resource) for the RFC 8693 token exchange at the IdP.

The Python SDK (PR #1721) normalizes the audience to the discovered OAuth issuer (override_audience_with_issuer) rather than the caller-supplied URL. Without that normalization, a trailing slash or path difference between the configured authorizationServerUrl and the issuer advertised in the authorization server metadata can produce an audience that the IdP rejects as a mismatch.

Suggested direction

Consider normalizing the audience to the issuer discovered during authorization server metadata discovery (which GetAccessTokenAsync already fetches as mcpAuthMetadata) per RFC 8693, instead of using the raw configured URL.

Low priority — no reported failures yet, surfacing it so it isn't lost.

Related: #1305

Activity

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

Metadata

Metadata

Assignees

Labels

P2Moderate issues, valuable feature requestsarea-authbugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions