-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat: periodic key revocation #401
Merged
Merged
Conversation
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
cwaldren-ld
commented
Jun 19, 2024
cwaldren-ld
commented
Jun 19, 2024
cwaldren-ld
commented
Jun 19, 2024
cwaldren-ld
commented
Jun 19, 2024
cwaldren-ld
commented
Jun 19, 2024
cwaldren-ld
commented
Jun 19, 2024
cwaldren-ld
commented
Jun 19, 2024
cwaldren-ld
commented
Jun 19, 2024
1c4a165
to
260640b
Compare
6754991
to
84427b0
Compare
cwaldren-ld
commented
Jun 21, 2024
cwaldren-ld
commented
Jun 24, 2024
louis-launchdarkly
approved these changes
Jun 24, 2024
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.
We pair reviewed this together and the clean up, and encapsulate the add/remove credential as the update function is good.
cwaldren-ld
pushed a commit
that referenced
this pull request
Jun 25, 2024
🤖 I have created a release *beep* *boop* --- ## [8.8.0](v8.7.1...v8.8.0) (2024-06-25) ### Features * offline mode key rotation ([#408](#408)) ([b3f03a4](b3f03a4)) * periodic key revocation ([#401](#401)) ([92033e9](92033e9)) ### Bug Fixes * offline mode would spam logs when file changes ([#406](#406)) ([3c12e10](3c12e10)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This replaces Relay's key rotation system with a new abstraction:
credential.Rotator
Previously, key rotation was the concern of the stream message handler, project manager, environment manager, and environments. This was because SDK key expiry was handled by the stream manager at the highest level, even though the actual credential handling needed to be delegated to the lowest level (environments.)
Now, key rotation happens locally within an environment. Key deprecation messages are pushed down the stack until they get to an environment, which hands it off to the
Rotator
.A
Rotator
can be queried at any time to determine what keys should be added or removed from an environment. It is purely logical and doesn't deal with goroutines or channels, making it easy to test.Behavioral Change
Key expiration is no longer instantaneous, it now happens on a configurable interval - for example, expired keys are checked every minute. The tradeoff is higher latency, but easier to test and predict the behavior.
The interval can be controlled with config option
EXPIRED_CREDENTIAL_CLEANUP_INTERVAL
.