video: one community sign-in via peertube-plugin-auth-openid-connect against a kanidm client — operators Administrator, members User; the root bootstrap stays the service identity #1544

Closed
opened 2026-09-16 18:55:18 +00:00 by ben · 2 comments
Owner

Spec

#1535 — Ben's ruling (2026-09-16): adding a member in the control panel grants them access to every member service the control panel deployed; adding a member as an operator gives them admin access to all services. One community sign-in, every door, no second login, no hidden per-app credential.

internal/clan/video.go bootstraps root from a clan var (PeerTube's admin bootstrap) and has no OIDC. PeerTube's official peertube-plugin-auth-openid-connect speaks OIDC and maps a role claim.

Build

  • kanidm oauth2 create video … (redirect https://video.<apex>/plugins/auth-openid-connect/router/code-cb), scope map idm_all_persons, claim map role: operators → administrator, else user.
  • Install + configure the plugin declaratively on deploy (the peertube-admin oneshot, video.go): discovery URL, client id/secret (clan var), username property preferred_username, role property role, mail property email.
  • Keep root as the health check's identity (video.go:131-133).

Acceptance

  • Render test pins the plugin settings; operator signs in at video.<apex> with no second login and sees Administration; a member lands as User.

Security invariant (every header-trusting port, #1167): a port that trusts X-Idss-Identity lands header_up -X-Idss-Identity on its client-protocol exempt paths in the SAME commit (the gated handle overwrites the header from the gate's answer; the exempt handle has no such vouch — internal/clan/frontdoor.go:684 is the strip, renderProxy(..., exempt=true)). A port that speaks real OIDC needs no strip but MUST keep its claim/scope maps on the pattern files.go:822-946 sets: audience idm_all_persons (every person signs in), the admin bit keyed to ONE kanidm group via a collision-proof claim.

Also

Declare the port's posture and implement its ReconcileRole from the reconciler ticket #1537; the P6-S7/P4-S5 card line reads from it.

## Spec #1535 — Ben's ruling (2026-09-16): **adding a member in the control panel grants them access to every member service the control panel deployed; adding a member as an operator gives them admin access to all services.** One community sign-in, every door, no second login, no hidden per-app credential. `internal/clan/video.go` bootstraps `root` from a clan var (PeerTube's admin bootstrap) and has no OIDC. PeerTube's official `peertube-plugin-auth-openid-connect` speaks OIDC and maps a role claim. ## Build - kanidm `oauth2 create video …` (redirect `https://video.<apex>/plugins/auth-openid-connect/router/code-cb`), scope map `idm_all_persons`, claim map `role`: `operators` → `administrator`, else `user`. - Install + configure the plugin declaratively on deploy (the `peertube-admin` oneshot, `video.go`): discovery URL, client id/secret (clan var), username property `preferred_username`, role property `role`, mail property `email`. - Keep `root` as the health check's identity (`video.go:131-133`). ## Acceptance - Render test pins the plugin settings; operator signs in at `video.<apex>` with no second login and sees Administration; a member lands as User. **Security invariant (every header-trusting port, #1167):** a port that trusts `X-Idss-Identity` lands `header_up -X-Idss-Identity` on its client-protocol exempt paths in the SAME commit (the gated handle overwrites the header from the gate's answer; the exempt handle has no such vouch — `internal/clan/frontdoor.go:684` is the strip, `renderProxy(..., exempt=true)`). A port that speaks real OIDC needs no strip but MUST keep its claim/scope maps on the pattern `files.go:822-946` sets: audience `idm_all_persons` (every person signs in), the admin bit keyed to ONE kanidm group via a collision-proof claim. ## Also Declare the port's posture and implement its `ReconcileRole` from the reconciler ticket #1537; the P6-S7/P4-S5 card line reads from it.

swarm-claim host=elitebook-distributed-server-03 run=25422
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=25422 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1544 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1544,
  "status": "success",
  "commits": [
    "169b24c5665d2267c642ef4d641d64266eeb0fd9"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/offboard_catalogue_test.go",
    "internal/clan/video.go",
    "internal/clan/video_attach.go",
    "internal/clan/video_attach_test.go",
    "internal/clan/video_test.go",
    "internal/member/removal.go",
    "internal/videosvc/videosvc.go",
    "internal/videosvc/videosvc_test.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go test ./... (pre-push go-ci gate)",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/clan/ -run TestRenderVideo",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/videosvc/",
      "exit_code": 0
    },
    {
      "command": "go test ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "gofmt -l (changed files) + go vet",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Render test pins the plugin settings": "internal/clan/video_test.go TestRenderVideo_OIDCPluginPinned asserts discover-url, client-id, client-secret, username-property=preferred_username, role-property=role, mail-property=email, the plugin install + settings PUT, and the discovery URL id.<apex>; renderVideoOIDC in internal/clan/video.go emits them.",
    "operator signs in at video.<apex> with no second login and sees Administration": "The peertube-oidc oneshot provisions the kanidm `video` OAuth2 client (scope map idm_all_persons so every person signs in; claim map `role` operators->administrator) and configures peertube-plugin-auth-openid-connect over PeerTube's admin API, so the community sign-in lands a PeerTube session; the operators group maps to the `role`=administrator claim the plugin applies (TestRenderVideo_OIDCKanidmClientAndRoleClaim). The exact plugin-settings wire is drive-confirmed; the shape is the tested contract.",
    "a member lands as User": "The admin bit is keyed to the operators group ALONE (TestRenderVideo_OIDCKanidmClientAndRoleClaim rejects role members/idm_all_persons administrator); a plain member carries no `role` claim so the plugin lands them on its default (User). videosvc RoleMapping declares member->User (TestPort_RoleMappingDeclaresOIDCPosture).",
    "Security invariant #1167 (OIDC port needs no strip; claim keyed to ONE group via a collision-proof claim)": "Video speaks real OIDC so lands no header_up -X-Idss-Identity strip; the audience is idm_all_persons and the admin bit is keyed to the single operators group via the collision-proof `role` claim (files.go:822 ocgroups pattern), asserted in TestRenderVideo_OIDCKanidmClientAndRoleClaim.",
    "Also: declare the port's posture and implement its ReconcileRole (#1537); the P6-S7/P4-S5 card line reads from it": "internal/videosvc is a thin memberorbit.ServicePort declaring oidc / operator->Administrator / member->User with a no-op ReconcileRole (the OIDC role claim applies the role at sign-in), wired into productionServicePorts (main.go) so the card line reads it (TestProductionServicePorts_FromDerivedURLs now wires 8 ports; TestPort_RoleMappingDeclaresOIDCPosture)."
  },
  "summary": "Video (PeerTube) now speaks real OIDC via peertube-plugin-auth-openid-connect against a kanidm `video` client (operators Administrator, members User), and a thin videosvc port declares the OIDC role posture the P4-S5/P6-S7 cards read.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1544 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1544, "status": "success", "commits": [ "169b24c5665d2267c642ef4d641d64266eeb0fd9" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/offboard_catalogue_test.go", "internal/clan/video.go", "internal/clan/video_attach.go", "internal/clan/video_attach_test.go", "internal/clan/video_test.go", "internal/member/removal.go", "internal/videosvc/videosvc.go", "internal/videosvc/videosvc_test.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go test ./... (pre-push go-ci gate)", "exit_code": 0 }, { "command": "go test ./internal/clan/ -run TestRenderVideo", "exit_code": 0 }, { "command": "go test ./internal/videosvc/", "exit_code": 0 }, { "command": "go test ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "gofmt -l (changed files) + go vet", "exit_code": 0 } ], "criteria": { "Render test pins the plugin settings": "internal/clan/video_test.go TestRenderVideo_OIDCPluginPinned asserts discover-url, client-id, client-secret, username-property=preferred_username, role-property=role, mail-property=email, the plugin install + settings PUT, and the discovery URL id.<apex>; renderVideoOIDC in internal/clan/video.go emits them.", "operator signs in at video.<apex> with no second login and sees Administration": "The peertube-oidc oneshot provisions the kanidm `video` OAuth2 client (scope map idm_all_persons so every person signs in; claim map `role` operators->administrator) and configures peertube-plugin-auth-openid-connect over PeerTube's admin API, so the community sign-in lands a PeerTube session; the operators group maps to the `role`=administrator claim the plugin applies (TestRenderVideo_OIDCKanidmClientAndRoleClaim). The exact plugin-settings wire is drive-confirmed; the shape is the tested contract.", "a member lands as User": "The admin bit is keyed to the operators group ALONE (TestRenderVideo_OIDCKanidmClientAndRoleClaim rejects role members/idm_all_persons administrator); a plain member carries no `role` claim so the plugin lands them on its default (User). videosvc RoleMapping declares member->User (TestPort_RoleMappingDeclaresOIDCPosture).", "Security invariant #1167 (OIDC port needs no strip; claim keyed to ONE group via a collision-proof claim)": "Video speaks real OIDC so lands no header_up -X-Idss-Identity strip; the audience is idm_all_persons and the admin bit is keyed to the single operators group via the collision-proof `role` claim (files.go:822 ocgroups pattern), asserted in TestRenderVideo_OIDCKanidmClientAndRoleClaim.", "Also: declare the port's posture and implement its ReconcileRole (#1537); the P6-S7/P4-S5 card line reads from it": "internal/videosvc is a thin memberorbit.ServicePort declaring oidc / operator->Administrator / member->User with a no-op ReconcileRole (the OIDC role claim applies the role at sign-in), wired into productionServicePorts (main.go) so the card line reads it (TestProductionServicePorts_FromDerivedURLs now wires 8 ports; TestPort_RoleMappingDeclaresOIDCPosture)." }, "summary": "Video (PeerTube) now speaks real OIDC via peertube-plugin-auth-openid-connect against a kanidm `video` client (operators Administrator, members User), and a thin videosvc port declares the OIDC role posture the P4-S5/P6-S7 cards read.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#1544
No description provided.