Checklist
Describe the problem you'd like to have solved
With a dynamic issuer configuration via validator.WithIssuerResolver it does not seem possible to specify a non-standard JWKS endpoint for each issuer. What would be handy is a similar function validator.WithJWKSResolver or an additional return value to WithIssuerResolver that sets the custom JWKS endpoint rather than relying on discovery.
In our case we need the dynamic nature of MultiIssuerProvider and WithIssuerResolver, but also need to set custom JWKS endpoints per issuer. These endpoints follow a simple pattern, but there doesn't appear to be an interface to set this. With static issuers this is possible, but unless I'm mistaken it is not with the new MCD implementation. My primary use case is to exchange the full external issuer domain for an internal domain (e.g. Kubernetes service domain). This is particularly useful when testing on localhost.
Describe the ideal solution
WithIssuerResolver allows configuring more details tied to the issuer. E.g. JWKS uri, or strict hostname matching and so forth.
Alternatives and current workarounds
- Set static issuers and be unable to customize per tenant.
- Create custom provider?
Additional context
Really love the new MCD implementation! Very clean implementation!
Checklist
Describe the problem you'd like to have solved
With a dynamic issuer configuration via
validator.WithIssuerResolverit does not seem possible to specify a non-standard JWKS endpoint for each issuer. What would be handy is a similar functionvalidator.WithJWKSResolveror an additional return value to WithIssuerResolver that sets the custom JWKS endpoint rather than relying on discovery.In our case we need the dynamic nature of MultiIssuerProvider and WithIssuerResolver, but also need to set custom JWKS endpoints per issuer. These endpoints follow a simple pattern, but there doesn't appear to be an interface to set this. With static issuers this is possible, but unless I'm mistaken it is not with the new MCD implementation. My primary use case is to exchange the full external issuer domain for an internal domain (e.g. Kubernetes service domain). This is particularly useful when testing on localhost.
Describe the ideal solution
WithIssuerResolverallows configuring more details tied to the issuer. E.g. JWKS uri, or strict hostname matching and so forth.Alternatives and current workarounds
Additional context
Really love the new MCD implementation! Very clean implementation!