Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,587 changes: 3,128 additions & 2,459 deletions connect-go/gen/proto/wg/cosmo/platform/v1/platform.pb.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

35 changes: 34 additions & 1 deletion connect/src/wg/cosmo/platform/v1/platform_connect.ts

Large diffs are not rendered by default.

481 changes: 481 additions & 0 deletions connect/src/wg/cosmo/platform/v1/platform_pb.ts

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions controlplane/migrations/0139_nappy_fallen_one.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CREATE TABLE IF NOT EXISTS "namespace_sso_providers" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"namespace_id" uuid NOT NULL,
"sso_provider_id" uuid,
"is_password_login" boolean DEFAULT false NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT "nssp_xor_check" CHECK (("namespace_sso_providers"."sso_provider_id" IS NOT NULL) <> "namespace_sso_providers"."is_password_login")
);
--> statement-breakpoint
ALTER TABLE "oidc_providers" ADD COLUMN "created_at" timestamp with time zone DEFAULT now() NOT NULL;--> statement-breakpoint
ALTER TABLE "sessions" ADD COLUMN "idp_alias" text;--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "namespace_sso_providers" ADD CONSTRAINT "namespace_sso_providers_namespace_id_namespaces_id_fk" FOREIGN KEY ("namespace_id") REFERENCES "public"."namespaces"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "namespace_sso_providers" ADD CONSTRAINT "namespace_sso_providers_sso_provider_id_oidc_providers_id_fk" FOREIGN KEY ("sso_provider_id") REFERENCES "public"."oidc_providers"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "nssp_namespace_id_idx" ON "namespace_sso_providers" USING btree ("namespace_id");--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "nssp_sso_provider_id_idx" ON "namespace_sso_providers" USING btree ("sso_provider_id");--> statement-breakpoint
CREATE UNIQUE INDEX IF NOT EXISTS "nssp_unique_sso" ON "namespace_sso_providers" USING btree ("namespace_id","sso_provider_id") WHERE "namespace_sso_providers"."sso_provider_id" IS NOT NULL;--> statement-breakpoint
CREATE UNIQUE INDEX IF NOT EXISTS "nssp_unique_password" ON "namespace_sso_providers" USING btree ("namespace_id") WHERE "namespace_sso_providers"."is_password_login" = true;
Loading
Loading