Thanks to visit codestin.com
Credit goes to github.com

Skip to content

oidc: verify claims before signatures#97

Merged
ericchiang merged 1 commit into
coreos:masterfrom
ericchiang:oidc-verify-claims-before-signature
Aug 18, 2016
Merged

oidc: verify claims before signatures#97
ericchiang merged 1 commit into
coreos:masterfrom
ericchiang:oidc-verify-claims-before-signature

Conversation

@ericchiang
Copy link
Copy Markdown
Collaborator

Checking claims is a much lighter weight operation than verifying
signatures and re-syncing keys. While we still ensure that all JWTs
are correctly signed and valid, throw out tokens we know are invalid
based on claims before attempting to validate the signature.

Closes #93

Checking claims is a much lighter weight operation than verifying
signatures and re-syncing keys. While we still ensure that all JWTs
are correctly signed and valid, throw out tokens we know are invalid
based on claims before attempting to validate the signature.
@ericchiang
Copy link
Copy Markdown
Collaborator Author

cc @chancez @sym3tri

@chancez
Copy link
Copy Markdown
Contributor

chancez commented Aug 18, 2016

This seems reasonable to me.

@ericchiang ericchiang merged commit 5644a2f into coreos:master Aug 18, 2016
ericchiang added a commit to ericchiang/kubernetes that referenced this pull request Aug 26, 2016
This change updates the github.com/coreos/go-oidc package.

Notable changes:

- Throw out JWTs with invalid claims early (coreos/go-oidc#97, brougt up in kubernetes#30457)
- Remove the capnslog dependency (coreos/go-oidc#95)
- Support for Azure AD oddities (coreos/go-oidc#87)
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this pull request Sep 12, 2016
Automatic merge from submit-queue

vendor: update github.com/coreos/go-oidc client package

This change updates the github.com/coreos/go-oidc package to it's latest commit
(since we don't version that package).

Notable changes:

- Throw out JWTs with invalid claims early (coreos/go-oidc#97, brougt up in #30457)
- Remove the capnslog dependency (coreos/go-oidc#95)
- Support for Azure AD oddities (coreos/go-oidc#87)

cc @kubernetes/sig-auth
coro added a commit to signal-ai/louketo-proxy that referenced this pull request Feb 17, 2025
Louketo has a bug revolving around this PR: coreos/go-oidc#97
essentially, the JWT verification function first checks the claims of the JWT are valid (including expiry times), then checks the signature of the token is valid.
Louketo checks the response of this and returns a custom error if the token has expired to allow the auth middleware to use a refresh token to regenerate an access token.
Unfortunately, the access token it generates uses the user context for the incoming request. This user context is parsed from the access token JWT but is not verified, meaning it is blindly trusted.
Louketo will then regenerate a correct accessToken from Keycloak, which will be valid and have the correct claim/scopes as generated in Keycloak. I think the issue is that for the rest of the request, it has this new token in the context but still has the leftover rubbish user context parsed from the fake user we injected earlier.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants