Skip to content

[v14] Fix cleanup of unused GCP KMS keys#34468

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

[v14] Fix cleanup of unused GCP KMS keys#34468
nklaassen merged 1 commit intobranch/v14from
bot/backport-34052-branch/v14

Conversation

@nklaassen
Copy link
Copy Markdown
Contributor

Backport #34052 to branch/v14

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:02
@nklaassen nklaassen added this pull request to the merge queue Nov 10, 2023
Merged via the queue into branch/v14 with commit f6dd6de Nov 10, 2023
@nklaassen nklaassen deleted the bot/backport-34052-branch/v14 branch November 10, 2023 23:27
This was referenced Nov 15, 2023
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