Skip to content

[v12] Fix cleanup of unused GCP KMS keys#34470

Merged
nklaassen merged 1 commit intobranch/v12from
bot/backport-34052-branch/v12
Nov 10, 2023
Merged

[v12] Fix cleanup of unused GCP KMS keys#34470
nklaassen merged 1 commit intobranch/v12from
bot/backport-34052-branch/v12

Conversation

@nklaassen
Copy link
Copy Markdown
Contributor

Backport #34052 to branch/v12

This PR fixes the cleanup code for unused keys in GCP KMS which is
currently failing to delete unused keys and emitting confusing warning
logs whenever keys have been generated by multiple different Auth
servers (no actual functionality is currently broken).

This bug was introduced in
#25025. This issue
introduced there is that the function now checks that all currently
active keys have actually been found in the keyring, but the
ListCryptoKeys call used a filter that excluded all keys created by
different Auth servers.

This fix improves some of the error messages, and also uses a more
permissive filter in the ListCryptoKeys call to make sure we can list
keys created by any auth server, but will only delete keys created by
the local auth server.

changelog: Fix cleanup of unused GCP KMS keys
@nklaassen nklaassen enabled auto-merge November 10, 2023 21:08
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from zmb3 November 10, 2023 23:01
@nklaassen nklaassen added this pull request to the merge queue Nov 10, 2023
Merged via the queue into branch/v12 with commit c46c9a7 Nov 10, 2023
@nklaassen nklaassen deleted the bot/backport-34052-branch/v12 branch November 10, 2023 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants