feat: enable key rotation (#15066)

This PR contains the remaining logic necessary to hook up key rotation
to the product.
This commit is contained in:
Jon Ayers
2024-10-25 17:14:35 +01:00
committed by GitHub
parent ccfffc6911
commit cd890aa3a0
54 changed files with 1412 additions and 1129 deletions

View File

@ -0,0 +1,18 @@
-- Create a new enum type with the desired values
CREATE TYPE new_crypto_key_feature AS ENUM (
'workspace_apps_token',
'workspace_apps_api_key',
'oidc_convert',
'tailnet_resume'
);
DELETE FROM crypto_keys WHERE feature = 'workspace_apps';
-- Drop the old type and rename the new one
ALTER TABLE crypto_keys
ALTER COLUMN feature TYPE new_crypto_key_feature
USING (feature::text::new_crypto_key_feature);
DROP TYPE crypto_key_feature;
ALTER TYPE new_crypto_key_feature RENAME TO crypto_key_feature;