feat: add schema for key rotation (#14662)

This commit is contained in:
Jon Ayers
2024-09-17 18:08:18 +01:00
committed by GitHub
parent 45420b95f3
commit 45160c7679
29 changed files with 977 additions and 2 deletions

View File

@ -0,0 +1,16 @@
CREATE TYPE crypto_key_feature AS ENUM (
'workspace_apps',
'oidc_convert',
'tailnet_resume'
);
CREATE TABLE crypto_keys (
feature crypto_key_feature NOT NULL,
sequence integer NOT NULL,
secret text NULL,
secret_key_id text NULL REFERENCES dbcrypt_keys(active_key_digest),
starts_at timestamptz NOT NULL,
deletes_at timestamptz NULL,
PRIMARY KEY (feature, sequence)
);