2023-11-08 03:55:45 -05:00
|
|
|
/* init_order = 1 */
|
2023-10-19 21:46:09 -05:00
|
|
|
create table sso_connectors (
|
|
|
|
tenant_id varchar(21) not null
|
|
|
|
references tenants (id) on update cascade on delete cascade,
|
|
|
|
/** The globally unique identifier of the SSO connector. */
|
|
|
|
id varchar(128) not null,
|
2023-12-04 02:07:33 -05:00
|
|
|
/** The identifier of connector's SSO provider */
|
2023-10-19 21:46:09 -05:00
|
|
|
provider_name varchar(128) not null,
|
|
|
|
/** The name of the SSO provider for display. */
|
|
|
|
connector_name varchar(128) not null,
|
|
|
|
/** The connector configuration. Different schemas for different provide type */
|
|
|
|
config jsonb /* @use JsonObject */ not null default '{}'::jsonb,
|
|
|
|
/** The SSO email domains. */
|
|
|
|
domains jsonb /* @use SsoDomains */ not null default '[]'::jsonb,
|
|
|
|
/** The SSO branding. */
|
|
|
|
branding jsonb /* @use SsoBranding */ not null default '{}'::jsonb,
|
|
|
|
/** Determines whether to synchronize the user's profile on each login. */
|
|
|
|
sync_profile boolean not null default FALSE,
|
|
|
|
/** When the SSO connector was created. */
|
|
|
|
created_at timestamptz not null default(now()),
|
2023-11-28 00:55:47 -05:00
|
|
|
primary key (id),
|
|
|
|
constraint sso_connectors__connector_name__unique
|
|
|
|
unique (tenant_id, connector_name)
|
2023-10-19 21:46:09 -05:00
|
|
|
);
|
|
|
|
|
|
|
|
create index sso_connectors__id
|
|
|
|
on sso_connectors (tenant_id, id);
|
|
|
|
|
|
|
|
create index sso_connectors__id__provider_name
|
|
|
|
on sso_connectors (tenant_id, id, provider_name);
|