chore: implement user link claims as a typed golang object (#15502)

Move claims from a `debug` column to an actual typed column to be used.
This does not functionally change anything, it just adds some Go typing to build
on.
This commit is contained in:
Steven Masley
2024-11-14 10:05:44 -06:00
committed by GitHub
parent 6b1fafbacc
commit b6d0b7713a
19 changed files with 105 additions and 65 deletions
+2 -2
View File
@@ -1337,14 +1337,14 @@ CREATE TABLE user_links (
oauth_expiry timestamp with time zone DEFAULT '0001-01-01 00:00:00+00'::timestamp with time zone NOT NULL,
oauth_access_token_key_id text,
oauth_refresh_token_key_id text,
debug_context jsonb DEFAULT '{}'::jsonb NOT NULL
claims jsonb DEFAULT '{}'::jsonb NOT NULL
);
COMMENT ON COLUMN user_links.oauth_access_token_key_id IS 'The ID of the key used to encrypt the OAuth access token. If this is NULL, the access token is not encrypted';
COMMENT ON COLUMN user_links.oauth_refresh_token_key_id IS 'The ID of the key used to encrypt the OAuth refresh token. If this is NULL, the refresh token is not encrypted';
COMMENT ON COLUMN user_links.debug_context IS 'Debug information includes information like id_token and userinfo claims.';
COMMENT ON COLUMN user_links.claims IS 'Claims from the IDP for the linked user. Includes both id_token and userinfo claims. ';
CREATE TABLE workspace_agent_log_sources (
workspace_agent_id uuid NOT NULL,