Skip to content

feat: HSM/KMS CA rotation reminders via cluster alerts#36780

Merged
nklaassen merged 2 commits intomasterfrom
nklaassen/keys-alert
Jan 23, 2024
Merged

feat: HSM/KMS CA rotation reminders via cluster alerts#36780
nklaassen merged 2 commits intomasterfrom
nklaassen/keys-alert

Conversation

@nklaassen
Copy link
Copy Markdown
Contributor

This is a follow-up to #36549

Here I'm adding a cluster alert when an HSM or KMS is configured but not actively used yet because a CA rotation is needed. Before #36459 tctl status was able to display this warning in some cases because each auth would add newly generated keys to the CA on startup, but now that the auths are able to continue using any existing software keys, they don't do that and tctl status has no way to know that the current state of the CAs doesn't match the auth server's CA configuration (from teleport.yaml). In this case rotation is not strictly necessary for the cluster to continue functioning, but it is necessary in order to start actually using HSM/KMS keys after configuring the feature.

I'm also adding the alert at a higher severity when the auth server is not able to sign with any of the keys currently in the CA. This is most likely to happen if migrating from an HSM/KMS back to using software keys. Since there will only be HSM keys in the CA, and the auth has no reference to them, it can't use them and a CA rotation is required to add new software keys.

Changelog: Increased visibility for necessary CA rotations when configuring HSM or KMS backing of CA keys.

Comment thread lib/auth/rotate.go Outdated
Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
@nklaassen
Copy link
Copy Markdown
Contributor Author

friendly ping @lxea

@nklaassen nklaassen enabled auto-merge January 23, 2024 02:14
@nklaassen nklaassen added this pull request to the merge queue Jan 23, 2024
Merged via the queue into master with commit 8f09fba Jan 23, 2024
@nklaassen nklaassen deleted the nklaassen/keys-alert branch January 23, 2024 14:31
@public-teleport-github-review-bot
Copy link
Copy Markdown

@nklaassen See the table below for backport results.

Branch Result
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants