-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce KeyRing data type and key rotation (#10)
Acts as a store for the keys for the server's different use cases. A KeyStore is initialised separately and then used when building the configuration. A default option is provided which loads the keys from a standard file or generates new keys if the file is not found. Key rotation is also implemented via a function on the keyring, as well as dealing with expired keys which are outside the grace period. It relies on the ordering of the keys, for example, the current signing key will be the first one found in the list of all keys. If there aren't enough active keys available to perform singing and encryption, an automatic key rotation will be performed on startup. There's currently no way to actually perform a key rotation in a running server. It would have to be triggered through an admin API, for example.
- Loading branch information
Showing
5 changed files
with
123 additions
and
34 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