-
-
Notifications
You must be signed in to change notification settings - Fork 177
feat(mint): introduce automatic keyset rotations #1058
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
Open
a1denvalu3
wants to merge
14
commits into
main
Choose a base branch
from
automatic-keyset-rotations
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+782
−50
Open
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9969797
feat(mint): introduce automatic keyset rotations
a1denvalu3 f5d8825
fix(mint): preserve keyset redemption grace period on automatic rotation
a1denvalu3 e86de27
docs(mint): document multiple formats in _parse_valid_from
a1denvalu3 2097763
fix(mint): update default keyset and check rotations on key requests
a1denvalu3 34863a9
test(mint): add background keyset rotation test and remove on-demand …
a1denvalu3 d3f8732
update default rotation interval to 90 days
a1denvalu3 63af301
test(mint): fix flakiness and incorrect assertions in keyset rotation…
a1denvalu3 3a97c45
docs(mint): update default keyset rotation interval to 90 days and re…
a1denvalu3 93227a6
fix(mint): resolve atomicity, concurrency, and selection bugs in keys…
a1denvalu3 5f2ba3c
test(mint): clean up regression test names and hoist imports
a1denvalu3 9d12d2f
fix(mint): adopt keyset from concurrent rotation
a1denvalu3 987b937
fix(mint): select newest keyset after concurrent rotation
a1denvalu3 990d937
fix(mint): preserve keyset state on rotation failure
callebtc f6f9906
fix(mint): fail closed on unparseable keyset valid_from
a1denvalu3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
The effective rotation time is
MINT_KEYSET_ROTATION_INTERVAL_SECONDS + up to MINT_REGULAR_TASKS_INTERVAL_SECONDS, but the latter (a) isn't in .env.example, (b) defaults to 3600s, and (c) is described only as the invoice-checker interval, with no mention of rotation.It's also overloaded, the same tick drives pending_proof checks. I suggest we either document this coupling in the rotation section of .env.example, or decoupling rotation onto its own timer so
ROTATION_INTERVAL_SECONDSfor example means what it says.