-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add rotate-root endpoint #70
Merged
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
ebce851
Remove bare returns
pcman312 d6bb52e
Readability cleanup
pcman312 6d07ce0
Remove errwrap
pcman312 b6addec
Make tests happy again
pcman312 ebb0325
Add rotate-root endpoint
pcman312 41bd7eb
Use correct response value
pcman312 56227f5
Fix merge failure
pcman312 59884a2
Add additional AAD warnings; Respond to code review
pcman312 5916c4b
Fix test
pcman312 714aff4
Don't pass config as a pointer so it gets a copy
pcman312 c3615a8
Fix expiration date logic; fix inverted warning logic
pcman312 5eb9e4c
Minor code review tweaks
pcman312 4085253
Move expiration to config
pcman312 938122f
Don't error if there isn't an error
pcman312 e5cc93a
Update the config & remove old passwords in the WAL
pcman312 b46951d
Return default_expiration on config get
pcman312 23fadb9
Return expiration from GET config
pcman312 8532464
Update path_rotate_root.go
jasonodonnell bf9c235
Update per review
jasonodonnell a693813
Rebase
jasonodonnell 77ae610
Fix test
jasonodonnell 9d5d3ae
Revert "Rebase"
jasonodonnell 699e815
Remove named returns
jasonodonnell d5b7a4b
Update per review
jasonodonnell 5ba6ffc
Update path_config.go
jasonodonnell 33a8e60
Update per review
jasonodonnell 484eb75
Use periodicFunc, change wal
jasonodonnell 17e7da4
Fix config test
jasonodonnell f76c855
Add expiration date, update logger
jasonodonnell 23e34b4
Fix timer bug
jasonodonnell a3aae79
Change root expiration to timestamp
jasonodonnell 7c9842f
Fix named returns
jasonodonnell 8571e52
Update backend.go
jasonodonnell 7ffdfd4
Update per feedback, add more tests
jasonodonnell d5eb293
Fix conflicts
jasonodonnell de93161
Add wal min age
jasonodonnell 5ac5c26
Update mock
jasonodonnell ac58246
Update go version
jasonodonnell 495d8d8
Revert "Update go version"
jasonodonnell 7236969
Remove unused wal code
jasonodonnell 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
Update per feedback, add more tests
- Loading branch information
commit 7ffdfd4fa5bd4ad7aa0ad4e46868d6e0f7a5540d
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
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.
I haven't totally wrapped by head around this bool, but something about it is giving me a bit of pause. I wonder if having this bool state will play well with concurrent modification (rotate-root handler, periodFunc+walRollbackFunc). I also wonder if a plugin/vault restart could reset this in a way that would produce unexpected results. Not blocking, but just wanted to share my thoughts.
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 primary use case of this bool is to give us a short circuit in the periodic function to avoid needing to read the config from storage when no password updates are needed. I do agree this is a little leaky, but only the periodic function will flip it to false and if set to true, the periodic function will double check the config from storage before proceeding.