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

topdown/tokens: Fix verifying with multi-key JWKS #1923

Merged
merged 1 commit into from
Nov 26, 2019

Conversation

patrick-east
Copy link
Contributor

We were previously ignoring any keys beyond the first index in a set
of keys contained in a JWKS provided to the JWT builtins. We now will
attempt to use any of the keys found.

In addition we no longer raise an error if the key type doesn't match
the header. We will return the correct result as if the verification
failed (because it did..)

Fixes: #1901
Signed-off-by: Patrick East [email protected]

We were previously ignoring any keys beyond the first index in a set
of keys contained in a JWKS provided to the JWT builtins. We now will
attempt to use any of the keys found.

In addition we no longer raise an error if the key type doesn't match
the header. We will return the correct result as if the verification
failed (because it did..)

Fixes: open-policy-agent#1901
Signed-off-by: Patrick East <[email protected]>
Copy link
Member

@tsandall tsandall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Migth be useful to include a comment that links to the RFC on how these multi-key JWKS should be handled.

@patrick-east patrick-east merged commit 16a0aca into open-policy-agent:master Nov 26, 2019
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.

io.jwt.decode_verify should not short-circuit
2 participants