Skip to content

[v13] Fix cleanup of unused GCP KMS keys#34469

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

[v13] Fix cleanup of unused GCP KMS keys#34469
nklaassen merged 1 commit intobranch/v13from
bot/backport-34052-branch/v13

Conversation

@nklaassen
Copy link
Copy Markdown
Contributor

Backport #34052 to branch/v13

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/v13 with commit f6f91f2 Nov 10, 2023
@nklaassen nklaassen deleted the bot/backport-34052-branch/v13 branch November 10, 2023 23:18
This was referenced Nov 16, 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