-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: periodic key revocation (#401)
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`.
- Loading branch information
1 parent
3c12e10
commit 92033e9
Showing
30 changed files
with
1,044 additions
and
760 deletions.
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
Oops, something went wrong.