Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple JWKS sources / one source per OIDC provider/issuer #6320

Open
djablonski-moia opened this issue May 31, 2024 · 1 comment
Open

Comments

@djablonski-moia
Copy link

djablonski-moia commented May 31, 2024

Is your feature request related to a problem? Please describe.

Tyk nicely supports configuring multiple OIDC identy providers in parallel in the OpenId Connect middleware openid_options
within an apidefintion. Unfortunately, the JWT middleware only supports configuring one global jwt_source endpoint for signature verification, so effectively, only one OIDC IdP can be securely used (i.e. with signature verification).

Describe the solution you'd like

We'd like to be able to configure one JWKS source URL per OIDC IdP, either within the openid_options.providers entry, or alternatively (and likely easier to implement due to being a different middleware), as an alternative jwt_sources property, that could look like this (using the same issuer URLs that are used in the openid_options):

"jwt_sources": [
    {
        "issuer": "<issuer url>",
        "jwt_source": "<key or jwks url>"
    },
    {
        "issuer": "<issuer url>",
        "jwt_source": "<key or jwks url>"
    }
]

Describe alternatives you've considered

The only alternative to solve the issue is to implement an "aggregating proxy", i.e. a component that collects & combines all key sets from all the OIDC IdPs, and generates a huge list containing all keys from all IdPs. In assition to the need for extra infrastructure, this has a significant risk of causing issues due to non-unique kids, that may occur with different providers.

Additional context

none

@djablonski-moia djablonski-moia changed the title Support mulriple JWKS sources / one source per OIDC provider/issuer Support multiple JWKS sources / one source per OIDC provider/issuer May 31, 2024
@andyo-tyk
Copy link
Contributor

Hi @djablonski-moia,
We are actually deprecating the dedicated OIDC Auth middleware from the next release, due to known limitations in the implementation - and recommend that users switch to the JWT Auth middleware (don't worry, we won't be EOL-ing the middleware just yet).
From your description, I'm guessing this recommended alternative won't fit your needs.
I'd be interested to understand what is missing from the JWT Auth capability to support your use case

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

No branches or pull requests

2 participants