The company I work for has acquired multiple products over the years.
We've been developing a shared microservice ecosystem.
The products (currently) authenticate to different IDPs (e.g. Auth0, Azure B2C).
The back-end microservices can handle multiple issuers just fine, but we also want to do authN checks at the API gateway - Azure APIM, and short-circuit if the JWT acces-token is invalid.
How do I validate multiple issuers in Azure APIM?
In the docs, I can see that I can specify multiple issuers, but there's only 1 openid-config. How would it be getting the public signing keys for multiple issuers if there's only 1 openid-config? Presumably it goes to this to get the JWKS endpoint and then the info to verify token signatures...
Here's part of the APIM (inbound) policy I'm talking about:
<validate-jwt header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized" require-expiration-time="true" require-signed-tokens="true">
<openid-config url="https://example-company.au.auth0.com/.well-known/openid-configuration" />
<audiences>
<audience>test</audience>
<audience>blah</audience>
</audiences>
<issuers>
<issuer>https://example-company.au.auth0.com</issuer>
<issuer>http://contoso.com/</issuer>
</issuers>
</validate-jwt>