question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DiscoveryClient doesn't obey DiscoveryPolicy.Authority

See original GitHub issue

DiscoveryClient 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:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leastprivilegecommented, Sep 20, 2017

yes - sounds good! thanks

1reaction
leastprivilegecommented, Sep 19, 2017

…or if you want to make a PR for that - this would probably speed up the process.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DiscoveryClient doesn't obey DiscoveryPolicy.Authority #58
DiscoveryClient allows you to specify a DiscoveryPolicy to aid in validation. However, the first thing it does in DiscoveryClient.
Read more >
Getting DiscoveryClient fails with "Issuer name does not ...
For example, I am attempting to use DiscoveryClient on the Azure Rest API, and the issuer is https://sts.windows.net/{{ tenant_id }} while ...
Read more >
How to resolve "Issuer name does not match authority" - Help
We are getting a "Issuer name does not match authority: https://oauth.platform.intuit.com/op/v1" response when using "DiscoveryClient" in ...
Read more >
Volunteer Handbook
Ocean Discovery does not offer paid internship opportunities and therefor all content covered and required in this document applies to those with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found