DiscoveryClient doesn't obey DiscoveryPolicy.Authority
See original GitHub issueDiscoveryClient
allows you to specify a DiscoveryPolicy
to aid in validation. However, the first thing it does in DiscoveryClient.GetAsync
is overwrite the policy Authority
so there’s no way to cause validation to obey the specified Authority
.
The use case in which I’m hitting this is multitenancy. I have a multitenant OIDC provider much like Azure AD where the tenant ID in the URL is case-sensitive and contains upper-case letters - https://my.identity.server/TenantIdHere/.well-known/openid-configuration
However, Identity Server forces the base URL to lowercase as the issuer like https://my.identity.server/tenantidhere
. I wanted to set the authority in the validation policy to be the “normalized lowercase” version of the URL so validation would work, but that gets overwritten. I also can’t address it by adding to the AdditionalEndpointBaseAddresses
because only the authority is used for issuer validation
My current workaround is to disable issuer validation entirely.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
yes - sounds good! thanks
…or if you want to make a PR for that - this would probably speed up the process.