-
Notifications
You must be signed in to change notification settings - Fork 512
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
Rotate remote key endpoint #889
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f623705
Respect the GUN and Role passed to the signer
cyli 6efbfde
Update the signer RPC interface to take a role and a gun, and for the…
cyli 8ff52f4
Add LastUsed field so we can tell when a key was last active
cyli 5815f53
Mark a signer key as active if it is used to sign
cyli 7ffd28e
Do not surface MarkActive to the rpc api - make the private key retur…
cyli d28e0f2
Introduce rotate remote key server endpoint
riyazdf 1d2e832
Rip out timestamp_keys public key table
riyazdf ccbfd28
Wire up pending key method to use on signer create, do not create
riyazdf 8cda3cd
Use keyinfo instead of strings, bring back tests, and add migration to
riyazdf 8f83315
Adding tests to client, server, and httpstore. Update docs
riyazdf 66f35f8
More testing, cleanup
riyazdf d75fcde
Do not bubble up pending key logic to RPC API, instead make signer DB…
riyazdf 1d97f3f
Streamline tests and address review
riyazdf b491b6e
Fix timestamp update logic
riyazdf e29b1ae
Address comments from group review: 0.3 rotation compatibility and cl…
riyazdf 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 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 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 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 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 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 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.
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.
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.
non-blocking: I think this snapshot case may already be tested in the previous batch? Although it rotates all those keys at once, as opposed to one at a time. Possibly we can just add the timestamp role to the list of keys to rotate in these tests?
(although I notice that in
testRotateKeySuccess
I compiled a list of keys that should be created on disk, and then forgot to do anything with it. :( sorry about that)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 snapshot case is definitely tested in the previous case but I wanted to do an additional rotation from a pre-existing server-managed snapshot key.
I can add the check that those keys exist on disk to
testRotateKeySuccess
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.
Ah ok - each invocation of
testRotateKeySuccess
wipes the repo and starts a new server - so if we wanted to test the additional rotation you'd probably want to do :testRotateKeySuccess(t, true, map[string]bool{data.CanonialSnapshotRole: true})
That first boolean says whether to start the the repo off with a server-managed snapshot key.
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.
ah ok. Fixed the test to do that