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

Harden the key invalidation process #23

Merged
merged 2 commits into from
Jul 19, 2024
Merged

Conversation

convenient
Copy link
Contributor

@convenient convenient commented Jul 19, 2024

See #22

While these invalidated keys should never be used, we need to ensure they're not predictable in case there are edge cases where some parts of the system still try and utilise them.

Anything trying to decrypt will fail, but possibly they're used for initialising other sensitive bits of the site like we had in SecretBasedJwksFactory so it makes senes to make them not predictable.

Before invalidation

    'crypt' => [
        'key' => '84c9d7c0b305adf9ea7e19a05478bf11
2951b41e2b7f4c26e60a8e7ee00ca17b'
    ],

After invalidation

    'crypt' => [
        'key' => 'invalidpwecbVeGpoL3Jxa4PXEOdn1ej
2951b41e2b7f4c26e60a8e7ee00ca17b',
        'invalidated_key' => '84c9d7c0b305adf9ea7e19a05478bf11'
    ],

@convenient convenient linked an issue Jul 19, 2024 that may be closed by this pull request
@convenient convenient mentioned this pull request Jul 19, 2024
@convenient convenient merged commit 88bd425 into master Jul 19, 2024
1 check passed
@convenient convenient deleted the harden-key-invalidation branch July 19, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Invalidate Question
1 participant