Skip to content

Add support to validate against multiple keys#1033

Merged
lcobucci merged 3 commits into
5.2.xfrom
add-support-to-validate-against-multiple-keys
Nov 20, 2023
Merged

Add support to validate against multiple keys#1033
lcobucci merged 3 commits into
5.2.xfrom
add-support-to-validate-against-multiple-keys

Conversation

@lcobucci

@lcobucci lcobucci commented Nov 4, 2023

Copy link
Copy Markdown
Owner

This implements the design I suggested on #1011 (comment) to solve the limitation raised by @rhertogh

@lcobucci lcobucci added this to the 5.2.0 milestone Nov 4, 2023
@lcobucci
lcobucci requested review from Ocramius and Slamdunk November 4, 2023 21:54
@lcobucci lcobucci self-assigned this Nov 4, 2023
@lcobucci
lcobucci force-pushed the add-support-to-validate-against-multiple-keys branch from 4b96fe0 to a6afecf Compare November 4, 2023 21:56
Comment thread .readthedocs.yaml
@lcobucci
lcobucci force-pushed the add-support-to-validate-against-multiple-keys branch from a6afecf to 7914f55 Compare November 4, 2023 22:18
Comment thread docs/rotating-keys.md
@lcobucci
lcobucci force-pushed the add-support-to-validate-against-multiple-keys branch from 7914f55 to 26960f1 Compare November 19, 2023 22:07
@lcobucci
lcobucci requested a review from Slamdunk November 19, 2023 22:11
Comment thread docs/rotating-keys.md
This allows us to stop using PHPUnit mocks in every place that needs,
making tests more obvious.

Signed-off-by: Luís Cobucci <[email protected]>
When dealing with key rotations, we will likely have to verify
previously issued tokens (signed with the old key) and new tokens
(signed with the new key).

This introduces a handy constraint that can take multiple `SignedWith`
constraints and only raise exceptions when the signature can't be
validated by any of them.

Signed-off-by: Luís Cobucci <[email protected]>
Signed-off-by: Luís Cobucci <[email protected]>
@lcobucci
lcobucci force-pushed the add-support-to-validate-against-multiple-keys branch from 26960f1 to 4a98f10 Compare November 20, 2023 21:11
@lcobucci
lcobucci merged commit 3529291 into 5.2.x Nov 20, 2023
@lcobucci
lcobucci deleted the add-support-to-validate-against-multiple-keys branch November 20, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants