-
Notifications
You must be signed in to change notification settings - Fork 411
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
Validate ID Token when OIDC is set #5414
Comments
Hey, I'm looking to start working on Envoy Gateway and wouldn't mind picking this one up |
/assign @markwinter |
thanks for picking this one up @markwinter, recommend starting off with an API PR |
@arkodg @markwinter I believe this needs to be supported by the Envoy OAuth2 filter first, then we can enable validation in EG. |
@zhaohuabing can't we add jwt authn if this field is set ? |
I found related discussions here I checked that the Perhaps this can be implemented by combining oauth2 filter and jwt filter as you mentioned @arkodg , and using jwtExtrator/from_cookies to get the id token from the cookie set by oauth2 filter. I think I know the path forward here so will start on the API PR |
@arkodg @markwinter I think JWT authentication is used for general-purpose authentication with JWT tokens. However, ID Token Validation requires additional checks specific to OIDC ID tokens. Some general checks, such as iss and claim validation, can be done with the JWT filter, but others—such as alg, nonce, and acr—require validation rules that are unique to OIDC and can't be achieved with the JWT filter. If our immediate goal is to validate only the iss and claims, this can be handled within the JWT section of a SecurityPolicy. Introducing partial validation within the OIDC API does not provide significant value, as it would duplicate existing functionality of the JWT authn. |
Verifying the alg is part of JWT signed token verification, that's why JWKS can be supplied in the JWT Authentication filter. https://github.com/google/jwt_verify_lib/blob/master/src/verify.cc#L210 The nonce and acr are oidc specific though and are dependent on whether they were requested in the initial authentication request |
I mean this alg validation: The alg value SHOULD be the default of RS256 or the algorithm sent by the Client in the id_token_signed_response_alg parameter during Registration |
Description:
The OIDC spec calls out verifying the ID Token https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation
This be be enabled by default or opt in
[optional Relevant Links:]
The text was updated successfully, but these errors were encountered: