Skip to content

feat(auth): explicit local-admin OIDC linking (B2 release blocker) - #644

Merged
athNdev merged 12 commits into
mainfrom
codex/oidc-admin-linking
Nov 20, 2026
Merged

athNdev merged 12 commits into
mainfrom
codex/oidc-admin-linking

Conversation

@athNdev

@athNdev athNdev commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Scope

Add a Settings action for explicit, browser-bound local-admin OIDC linking. The controller verifies issuer and subject, rechecks the initiating local session, and commits identity binding and provider-role reconciliation together. Local and provider-owned role grants stay independent in storage, login authorization, and operator edits. API credential management for linked local accounts requires local access.

Verification

  • PR head da869d661fd89000758f9d1285fc39c49b93bf4f. The full MCP package passed in WSL after regenerating catalog metadata, classifying the link as browser-only, and refreshing audit anchors. The hosted verification run is pending.
  • The packaged authentik 2026.8.5 test build required provider reauthentication, linked the existing account, and preserved its local session. Fresh SSO used mapped grants. Removing the IdP admin group produced HTTP 403 from ListUsers and preserved password-based admin access. SQLite contained one linked local identity and separate local/OIDC grants, and passed integrity checking. Binary SHA-256 6b40cce6d936a1d259d2466eb398a1f2e007efa7c8597db2e3643d003575f342. The change from that build to the current PR head is limited to MCP audit source references.
  • Local WSL tests cover live-session and browser refusal, competing links, injected rollback, legacy state migration, role edits and API credentials. Packaged Chromium covers the Settings link and role editor.
  • An authorized Okta tenant, confidential OIDC app with the registered callback, and assigned group-bearing test user are still required. The provider evidence covers fresh sign-in and RPC authorization. ADR 0051 records shared direct server grants and the existing socket reauthentication boundary.

OSS-367 · OSS-246

Add a local-admin-only BeginOIDCLink RPC and a short-lived single-use intent that binds verified issuer+subject only after the OIDC callback. Preserve local break-glass grants and role ownership, require explicit role mapping for privileged roles, and keep state/nonce/PKCE/session rotation protections. Add fail-closed REST/RPC fixtures for replay, expiry, identity collision, role conflict, stale sessions, and local-login preservation. Document operator steps and ADR 0051. Regenerate proto/MCP artifacts. No live IdP or credential evidence.
@athNdev
athNdev force-pushed the codex/oidc-admin-linking branch from 395dbc5 to c3b1913 Compare November 20, 2026 06:23
@athNdev

athNdev commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

OpenCode implementation-owner checkpoint at exact head 9fb1ee28c036c78bd524d2e8a2d9c9072e9f3ee1 (merged current main; auth code unchanged from reviewed da869d66). Hosting CI is still queued; no merge yet.

Verified locally at this head:

  • go test ./internal/auth ./internal/db ./internal/rpc/... ./internal/mcp/... -count=1 ok; go vet clean; buf lint clean.
  • bun install --frozen-lockfile, bun run check (0 errors/0 warnings), bun run test (472 pass / 6 skip / 0 fail).
  • knowledge-lint -fix then verify: 201 concepts, 40/40 queries.
  • Packaged Chromium linking/role-editor fixture with task-owned browser override: PASS (browser binding, denial, local session retention, independent local role edit).
  • Recovery-key use-once/rotation/restart and ChangePassword tests pass at exact head.

Independent free-model exact-head review: MERGE, no HIGH/MEDIUM findings. Packaged authentik 2026.8.5 provider journey remains as evidenced at tested build 4bf992d8 (binary SHA-256 6b40cce6…); only MCP audit source anchors differ from this head. Real Okta tenant interoperability is not verified and is not claimed. OSS-367 and OSS-246 stay open for provider/release acceptance; Stable publication remains with the sole release owner.

# Conflicts:
#	README.md
#	docs/adr/0034-mcp-server-distribution.md
#	docs/carbon-panel/src/content/docs/guides/mcp-server.mdx
#	docs/evidence/mcp-gate-separation.md
#	docs/runbook-mcp-smoke.md
#	internal/mcp/family_audit_matrix.json
#	internal/mcp/integration_catalog.go
#	internal/mcp/integration_coverage_test.go
# Conflicts:
#	README.md
#	docs/adr/0034-mcp-server-distribution.md
#	docs/carbon-panel/src/content/docs/guides/mcp-server.mdx
#	docs/evidence/mcp-gate-separation.md
#	docs/runbook-mcp-smoke.md
#	internal/mcp/family_audit_matrix.json
#	internal/mcp/integration_catalog.go
#	internal/mcp/integration_coverage_test.go
# Conflicts:
#	knowledge/decisions/adrs-decision-records-2.md
@athNdev
athNdev merged commit 26daf7f into main Nov 20, 2026
45 of 46 checks passed
@athNdev
athNdev deleted the codex/oidc-admin-linking branch November 20, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant