-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
New JWT verify/decode #967
Conversation
Signed-off-by: Richard Kettlewell <[email protected]>
Signed-off-by: Richard Kettlewell <[email protected]>
Signed-off-by: Richard Kettlewell <[email protected]>
This implements JWT verification and decoding in a single function, supporting the exp and nbf claims automatically and permitting constraints on the algorithm and issuer to be imposed. re open-policy-agent#884 Signed-off-by: Richard Kettlewell <[email protected]>
re open-policy-agent#884 Signed-off-by: Richard Kettlewell <[email protected]>
docs/book/language-reference.md
Outdated
|
||
Exactly one of ``cert`` and ``secret`` must be present. | ||
If there are any unrecognized constraints then the token is considered invalid. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to add another column Required
to specify which constraint members are required vs optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of them are required - the only requirement is that one of cert
and secret
must be present. Still, you're right, breaking out a separate column improves clarity.
@optnfast This looks good. Some minor comments. |
re open-policy-agent#884 re open-policy-agent#967 Signed-off-by: Richard Kettlewell <[email protected]>
re open-policy-agent#884 re open-policy-agent#967 Signed-off-by: Richard Kettlewell <[email protected]>
This sequence of changes implements JWT verification and decoding in a single call. It allows verification to be constrained by key, algorithm, issuer, audience and time (i.e. the
exp
andnbf
fields).See #884 for discussion.