Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fe2463e
Plan native SCIM identity provider connections
MTG-Thomas Nov 16, 2026
e9bebad
Add native SCIM provisioning for identity provider connections
MTG-Thomas Nov 16, 2026
f8146c8
Regenerate client types for identity provider connections
MTG-Thomas Nov 16, 2026
59fb088
Plan multi-connection behavior, sign-in claims and the RFC order
MTG-Thomas Nov 16, 2026
cb9f0b7
Add the Identity Providers admin UI
MTG-Thomas Nov 16, 2026
bc05d45
Warn before identity provider tokens expire
MTG-Thomas Nov 16, 2026
d3a65a5
Release domain claims when an organization is disabled
MTG-Thomas Nov 16, 2026
c9a26d3
Batch provisioning grants so a sync burst can't churn every token
MTG-Thomas Nov 17, 2026
826e99a
Lock members' users before changing group membership
MTG-Thomas Nov 17, 2026
2cd899b
Answer deadlock-aborted requests with an explicit error
MTG-Thomas Nov 17, 2026
32acf06
Show when identity provider access is waiting to apply
MTG-Thomas Nov 17, 2026
69f24c7
Fit user tables at 1280px and list new hires while they activate
MTG-Thomas Nov 18, 2026
f47bda0
Merge origin/main into feat/scim-identity-providers
MTG-Thomas Nov 18, 2026
7accde2
Resolve the event registry merge conflict
MTG-Thomas Nov 18, 2026
09097e3
Close identity provider gaps found in peer review
MTG-Thomas Nov 18, 2026
149c8be
Close the races and gaps from the second review round
MTG-Thomas Nov 18, 2026
050fa41
Make privileged linked users revoke-only and fix lock order
MTG-Thomas Nov 18, 2026
985ea00
Share-lock roles in read-only guards and close the last races
MTG-Thomas Nov 18, 2026
767a269
Unlink privileged users on DELETE and avoid the admin lock upgrade
MTG-Thomas Nov 18, 2026
1356564
Lock users first in role assignment writes and fix suite failures
MTG-Thomas Nov 18, 2026
da96f4f
Merge remote-tracking branch 'origin/main' into feat/scim-identity-pr…
MTG-Thomas Nov 18, 2026
a55129b
Match the design doc's UI section to the reviewed screens
MTG-Thomas Nov 18, 2026
830cff5
Stop advertising the SCIM password attribute
MTG-Thomas Nov 18, 2026
9bb6c66
Add the Product Updates disposition and draft entry for SCIM providers
MTG-Thomas Nov 18, 2026
5ebe88b
Sync the plugin skill mirror and address CodeQL findings in the tests
MTG-Thomas Nov 18, 2026
52a34f3
Merge remote-tracking branch 'origin/main' into feat/scim-identity-pr…
MTG-Thomas Nov 18, 2026
235b04b
Record approval of the SCIM providers Product Updates entry
MTG-Thomas Nov 18, 2026
976e379
fix: preserve SCIM group access policy and audit role deltas
jackmusick Nov 18, 2026
bfc5d53
test: include identity provider tasks in scheduler diagnostics
jackmusick Nov 18, 2026
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
13 changes: 13 additions & 0 deletions .claude/skills/bifrost-build/generated/openapi-digest.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,19 @@
| POST | `/api/identities` |
| DELETE | `/api/identities/{identity_id}` |
| PATCH | `/api/identities/{identity_id}` |
| GET | `/api/identity-providers` |
| POST | `/api/identity-providers` |
| GET | `/api/identity-providers/domains` |
| POST | `/api/identity-providers/domains` |
| DELETE | `/api/identity-providers/domains/{claim_id}` |
| POST | `/api/identity-providers/domains/{claim_id}/verify` |
| DELETE | `/api/identity-providers/{identity_provider_id}` |
| GET | `/api/identity-providers/{identity_provider_id}` |
| PATCH | `/api/identity-providers/{identity_provider_id}` |
| GET | `/api/identity-providers/{identity_provider_id}/groups` |
| DELETE | `/api/identity-providers/{identity_provider_id}/groups/{group_id}/mapping` |
| PUT | `/api/identity-providers/{identity_provider_id}/groups/{group_id}/mapping` |
| POST | `/api/identity-providers/{identity_provider_id}/token` |
| GET | `/api/integrations` |
| POST | `/api/integrations` |
| GET | `/api/integrations/by-name/{name}` |
Expand Down
13 changes: 13 additions & 0 deletions .claude/skills/bifrost-build/generated/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,16 @@ caller's own items.
| `workspace.files.editor.folder.create` | — | — | `repository.readwrite` |
| `workspace.files.editor.delete` | — | — | `repository.readwrite` |
| `workspace.files.editor.rename` | — | — | `repository.readwrite` |
| `identityproviders.domains.list` | — | — | `identityproviders.read` |
| `identityproviders.domains.create` | — | — | `identityproviders.readwrite` |
| `identityproviders.domains.verify` | — | — | `identityproviders.readwrite` |
| `identityproviders.domains.delete` | — | — | `identityproviders.readwrite` |
| `identityproviders.list` | — | — | `identityproviders.read` |
| `identityproviders.create` | — | — | `identityproviders.readwrite` |
| `identityproviders.get` | — | — | `identityproviders.read` |
| `identityproviders.update` | — | — | `identityproviders.readwrite` |
| `identityproviders.delete` | — | — | `identityproviders.readwrite` |
| `identityproviders.token.rotate` | — | — | `identityproviders.readwrite` |
| `identityproviders.groups.list` | — | — | `identityproviders.read` |
| `identityproviders.groups.map` | — | — | `identityproviders.readwrite`, `roleassignments.readwrite` |
| `identityproviders.groups.unmap` | — | — | `identityproviders.readwrite` |
256 changes: 256 additions & 0 deletions api/alembic/versions/20261116_identity_providers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
"""Add identity provider connections, organization domain claims and the
directory state SCIM provisioning keeps in step.

Revision ID: 20261116_identity_providers
Revises: 20261117_integ_secret_encrypt
"""

import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects.postgresql import JSONB, UUID

revision = "20261116_identity_providers"
down_revision = "20261117_integ_secret_encrypt"
branch_labels = None
depends_on = None


def _timestamps(*, updated: bool) -> list[sa.Column]:
columns = [
sa.Column(
"created_at", sa.DateTime(timezone=True), nullable=False, server_default=sa.text("NOW()")
)
]
if updated:
columns.append(
sa.Column(
"updated_at",
sa.DateTime(timezone=True),
nullable=False,
server_default=sa.text("NOW()"),
)
)
return columns


def upgrade() -> None:
op.create_table(
"organization_domains",
sa.Column("id", UUID(as_uuid=True), primary_key=True),
sa.Column(
"organization_id",
UUID(as_uuid=True),
sa.ForeignKey("organizations.id", ondelete="CASCADE"),
nullable=False,
),
sa.Column("domain", sa.String(253), nullable=False),
sa.Column("verification_token", sa.String(64), nullable=False),
sa.Column("verified_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("last_checked_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("created_by", sa.String(255), nullable=False),
*_timestamps(updated=False),
sa.UniqueConstraint("organization_id", "domain", name="uq_organization_domains_org_domain"),
sa.CheckConstraint("domain = lower(domain)", name="ck_organization_domains_lowercase"),
)
op.create_index(
"uq_organization_domains_verified_domain",
"organization_domains",
["domain"],
unique=True,
postgresql_where=sa.text("verified_at IS NOT NULL"),
)

op.create_table(
"identity_providers",
sa.Column("id", UUID(as_uuid=True), primary_key=True),
sa.Column(
"organization_id",
UUID(as_uuid=True),
sa.ForeignKey("organizations.id", ondelete="CASCADE"),
nullable=False,
),
sa.Column("name", sa.String(255), nullable=False),
sa.Column("source_type", sa.String(32), nullable=False),
sa.Column("vendor", sa.String(32), nullable=False),
sa.Column("is_enabled", sa.Boolean(), nullable=False, server_default=sa.text("true")),
sa.Column(
"provision_as_external", sa.Boolean(), nullable=False, server_default=sa.text("false")
),
sa.Column("settings", JSONB(), nullable=False, server_default=sa.text("'{}'::jsonb")),
sa.Column("last_request_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("last_sync_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("created_by", sa.String(255), nullable=False),
*_timestamps(updated=True),
sa.CheckConstraint(
"source_type IN ('scim', 'google_directory')", name="ck_identity_providers_source_type"
),
sa.CheckConstraint(
"vendor IN ('entra', 'okta', 'jumpcloud', 'google', 'other')",
name="ck_identity_providers_vendor",
),
)
op.create_index(
"ix_identity_providers_organization_id", "identity_providers", ["organization_id"]
)

op.create_table(
"identity_provider_tokens",
sa.Column("id", UUID(as_uuid=True), primary_key=True),
sa.Column(
"identity_provider_id",
UUID(as_uuid=True),
sa.ForeignKey("identity_providers.id", ondelete="CASCADE"),
nullable=False,
),
sa.Column("token_hash", sa.String(64), nullable=False, unique=True),
sa.Column("token_hint", sa.String(8), nullable=False),
sa.Column("expires_at", sa.DateTime(timezone=True), nullable=False),
sa.Column("revoked_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("last_used_at", sa.DateTime(timezone=True), nullable=True),
sa.Column("created_by", sa.String(255), nullable=False),
*_timestamps(updated=False),
)
op.create_index(
"ix_identity_provider_tokens_identity_provider_id",
"identity_provider_tokens",
["identity_provider_id"],
)

op.create_table(
"identity_provider_users",
sa.Column("id", UUID(as_uuid=True), primary_key=True),
sa.Column(
"identity_provider_id",
UUID(as_uuid=True),
sa.ForeignKey("identity_providers.id", ondelete="CASCADE"),
nullable=False,
),
sa.Column(
"user_id",
UUID(as_uuid=True),
sa.ForeignKey("users.id", ondelete="CASCADE"),
nullable=False,
unique=True,
),
sa.Column("external_id", sa.String(255), nullable=True),
sa.Column("user_name", sa.String(320), nullable=False),
sa.Column("active", sa.Boolean(), nullable=False),
sa.Column("attributes", JSONB(), nullable=False, server_default=sa.text("'{}'::jsonb")),
sa.Column("created_user", sa.Boolean(), nullable=False),
*_timestamps(updated=True),
sa.UniqueConstraint(
"identity_provider_id", "external_id", name="uq_identity_provider_users_external_id"
),
)
# SCIM matches userName without regard to case, so uniqueness does too.
op.create_index(
"uq_identity_provider_users_user_name_ci",
"identity_provider_users",
["identity_provider_id", sa.text("lower(user_name)")],
unique=True,
)

op.create_table(
"identity_provider_groups",
sa.Column("id", UUID(as_uuid=True), primary_key=True),
sa.Column(
"identity_provider_id",
UUID(as_uuid=True),
sa.ForeignKey("identity_providers.id", ondelete="CASCADE"),
nullable=False,
),
sa.Column("external_id", sa.String(255), nullable=True),
sa.Column("display_name", sa.String(255), nullable=False),
sa.Column("attributes", JSONB(), nullable=False, server_default=sa.text("'{}'::jsonb")),
*_timestamps(updated=True),
sa.UniqueConstraint(
"identity_provider_id", "external_id", name="uq_identity_provider_groups_external_id"
),
sa.UniqueConstraint(
"identity_provider_id",
"display_name",
name="uq_identity_provider_groups_display_name",
),
)

op.create_table(
"identity_provider_group_members",
sa.Column(
"group_id",
UUID(as_uuid=True),
sa.ForeignKey("identity_provider_groups.id", ondelete="CASCADE"),
primary_key=True,
),
sa.Column(
"identity_provider_user_id",
UUID(as_uuid=True),
sa.ForeignKey("identity_provider_users.id", ondelete="CASCADE"),
primary_key=True,
),
)
op.create_index(
"ix_identity_provider_group_members_user",
"identity_provider_group_members",
["identity_provider_user_id"],
)

op.create_table(
"identity_provider_group_mappings",
sa.Column(
"group_id",
UUID(as_uuid=True),
sa.ForeignKey("identity_provider_groups.id", ondelete="CASCADE"),
primary_key=True,
),
sa.Column("created_by", sa.String(255), nullable=False),
*_timestamps(updated=False),
)

op.create_table(
"identity_provider_group_roles",
sa.Column(
"group_id",
UUID(as_uuid=True),
sa.ForeignKey("identity_provider_group_mappings.group_id", ondelete="CASCADE"),
primary_key=True,
),
sa.Column(
"role_id",
UUID(as_uuid=True),
sa.ForeignKey("roles.id", ondelete="CASCADE"),
primary_key=True,
),
)

op.add_column(
"user_roles",
sa.Column(
"identity_provider_id",
UUID(as_uuid=True),
sa.ForeignKey(
"identity_providers.id",
ondelete="SET NULL",
name="fk_user_roles_identity_provider_id",
),
nullable=True,
),
)


def downgrade() -> None:
op.drop_constraint("fk_user_roles_identity_provider_id", "user_roles", type_="foreignkey")
op.drop_column("user_roles", "identity_provider_id")
op.drop_table("identity_provider_group_roles")
op.drop_table("identity_provider_group_mappings")
op.drop_index("ix_identity_provider_group_members_user", "identity_provider_group_members")
op.drop_table("identity_provider_group_members")
op.drop_table("identity_provider_groups")
op.drop_table("identity_provider_users")
op.drop_index(
"ix_identity_provider_tokens_identity_provider_id", "identity_provider_tokens"
)
op.drop_table("identity_provider_tokens")
op.drop_index("ix_identity_providers_organization_id", "identity_providers")
op.drop_table("identity_providers")
op.drop_index("uq_organization_domains_verified_domain", "organization_domains")
op.drop_table("organization_domains")
34 changes: 34 additions & 0 deletions api/alembic/versions/20261116_idp_token_expiry_stage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""Record which token-expiry warning stage was announced.

Revision ID: 20261116_idp_token_expiry_stage
Revises: 20261116_identity_providers
"""

import sqlalchemy as sa
from alembic import op

revision = "20261116_idp_token_expiry_stage"
down_revision = "20261116_identity_providers"
branch_labels = None
depends_on = None


def upgrade() -> None:
op.add_column(
"identity_provider_tokens",
sa.Column("expiry_warning_stage", sa.String(16), nullable=True),
)
op.create_check_constraint(
"ck_identity_provider_tokens_expiry_warning_stage",
"identity_provider_tokens",
"expiry_warning_stage IN ('expiring', 'expired')",
)


def downgrade() -> None:
op.drop_constraint(
"ck_identity_provider_tokens_expiry_warning_stage",
"identity_provider_tokens",
type_="check",
)
op.drop_column("identity_provider_tokens", "expiry_warning_stage")
43 changes: 43 additions & 0 deletions api/alembic/versions/20261117_idp_access_pending.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"""Batch identity provider grants into a periodic access pass.

Revision ID: 20261117_idp_access_pending
Revises: 20261116_idp_token_expiry_stage

Every role or activation change bumps the global authority epoch, which
retires every access token on the instance. Provisioning applies revocations
in the request but records grants here for a pass that applies them all in
one transaction.
"""

import sqlalchemy as sa
from alembic import op

revision = "20261117_idp_access_pending"
down_revision = "20261116_idp_token_expiry_stage"
branch_labels = None
depends_on = None


def upgrade() -> None:
op.add_column(
"identity_provider_users",
sa.Column("display_name", sa.String(255), nullable=True),
)
op.add_column(
"identity_provider_users",
sa.Column("access_pending_since", sa.DateTime(timezone=True), nullable=True),
)
op.create_index(
"ix_identity_provider_users_access_pending",
"identity_provider_users",
["access_pending_since"],
postgresql_where=sa.text("access_pending_since IS NOT NULL"),
)


def downgrade() -> None:
op.drop_index(
"ix_identity_provider_users_access_pending", table_name="identity_provider_users"
)
op.drop_column("identity_provider_users", "access_pending_since")
op.drop_column("identity_provider_users", "display_name")
Loading
Loading