surveys: one community sign-in via the trusted identity header (AuthWebServer, the datacollections.go template) — no core OIDC in CE; operators become superadmin via the limesurvey-admin path; STRIP the header on exempt paths #1540

Closed
opened 2026-09-16 18:55:02 +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.

LimeSurvey CE ships AuthDB / AuthLDAP / AuthWebServer only (the LS6 OIDC plugin is a 3-star community project — not shipped).

Build

  • AuthWebServer plugin: serverkey = the header as PHP sees it (HTTP_X_IDSS_IDENTITY), auth_webserver_autocreate_user=true, auth_webserver_autocreate_profile = the member permission template the port declares (create/own surveys, no global settings). Activate it through the limesurvey-admin oneshot's existing config path (internal/clan/surveys.go:85-140), never by editing the DB by hand.
  • Operator → superadmin: AuthWebServer gives one static template, so the reconciler sets superadmin for operators through the same admin identity the health check drives (surveys.go:130, RemoteControl) — verify RemoteControl exposes it; if not, the oneshot's console path is the fallback and the ticket says which.
  • SurveysExemptPaths MUST carry header_up -X-Idss-Identity (frontdoor render + frontdoor_test.go case) — this is the first port after Grist to trust the header.

Acceptance

  • Render test pins plugin config + the strip; a forged X-Idss-Identity on an exempt path is dropped (test).
  • Operator opens surveys.<apex> signed in as superadmin with no second login; a member lands with the declared template.

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. LimeSurvey CE ships `AuthDB` / `AuthLDAP` / `AuthWebServer` only (the LS6 OIDC plugin is a 3-star community project — not shipped). ## Build - `AuthWebServer` plugin: `serverkey` = the header as PHP sees it (`HTTP_X_IDSS_IDENTITY`), `auth_webserver_autocreate_user=true`, `auth_webserver_autocreate_profile` = the member permission template the port declares (create/own surveys, no global settings). Activate it through the `limesurvey-admin` oneshot's existing config path (`internal/clan/surveys.go:85-140`), never by editing the DB by hand. - Operator → **superadmin**: `AuthWebServer` gives one static template, so the reconciler sets `superadmin` for operators through the same admin identity the health check drives (`surveys.go:130`, RemoteControl) — verify RemoteControl exposes it; if not, the oneshot's console path is the fallback and the ticket says which. - `SurveysExemptPaths` MUST carry `header_up -X-Idss-Identity` (frontdoor render + `frontdoor_test.go` case) — this is the first port after Grist to trust the header. ## Acceptance - Render test pins plugin config + the strip; a forged `X-Idss-Identity` on an exempt path is dropped (test). - Operator opens `surveys.<apex>` signed in as superadmin with no second login; a member lands with the declared template. **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 #1540 — status success

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

envelope
{
  "issue": 1540,
  "status": "success",
  "commits": [
    "e91d709cfb1af3f02ee767a622ee133f003c2ba5"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "control-plane/cmd/control-plane/offboard_catalogue_test.go",
    "internal/clan/frontdoor_test.go",
    "internal/clan/portroute.go",
    "internal/clan/surveys.go",
    "internal/clan/surveys_attach.go",
    "internal/clan/surveys_attach_test.go",
    "internal/clan/surveys_test.go",
    "internal/member/removal.go",
    "internal/surveyssvc/surveyssvc.go",
    "internal/surveyssvc/surveyssvc_test.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./...",
      "exit_code": 0
    },
    {
      "command": "go test ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Render test pins plugin config + the strip; a forged X-Idss-Identity on an exempt path is dropped (test)": "internal/clan/surveys.go renders the limesurvey-auth oneshot (AuthWebServer: serverKey=HTTP_X_IDSS_IDENTITY, activation, autocreate member template, operator superadmin seed) pinned by surveys_test.go TestRenderSurveys_AuthWebServerTrustsTheIdentityHeader / _AuthConsoleCarriesLimeSurveyConfigEnv / _OperatorIsSeededSuperadmin; the exempt-path strip is pinned by frontdoor_test.go TestRenderFrontDoor_SurveysExemptPathStripsIdentity (a forged X-Idss-Identity on SurveysExemptPaths is dropped via header_up -X-Idss-Identity; the gated handle keeps copy_headers).",
    "Operator opens surveys.<apex> signed in as superadmin with no second login; a member lands with the declared template": "SurveysConfig.Operator (from PortPlacement.Operator, portroute.go) seeds the founding operator a superadmin via the Permission model at deploy (renderSurveysAuth, the #1536 seed-the-owner shape) so their first header sign-in lands them as superadmin; AuthWebServer autocreates a member with the idss-member template (create/own surveys). Live end-to-end sign-in is the deferred clan-lab drive (the port's #225/#229 precedent); the render lands the config to the interface and the render tests pin it.",
    "Declare the port's posture and implement its ReconcileRole from reconciler #1537; the P6-S7/P4-S5 card line reads from it": "internal/surveyssvc declares RoleMapping front-door-only . header . operator->superadmin . member->survey creator, wired into productionServicePorts (main.go) so the catalogue/cards read it; ReconcileRole is a hard no-op (RemoteControl 2 exposes no user-permission setter, verified against surveyshealth.go — the operator superadmin is seeded on the node at deploy, never a fabricated HTTP success, ADR 0100). Pinned by surveyssvc_test.go.",
    "Security invariant #1167 (header-trusting port strips X-Idss-Identity on client-protocol exempt paths in the SAME commit)": "SurveysExemptPaths flows through portroute.go to the front-door route; renderRoute's generic exempt handle emits header_up -X-Idss-Identity, pinned for surveys by frontdoor_test.go TestRenderFrontDoor_SurveysExemptPathStripsIdentity (same commit)."
  },
  "summary": "Surveys trusts the front door's identity header via AuthWebServer (no OIDC in CE): members autocreate with the member template, the operator is seeded superadmin on the node, the header is stripped on exempt paths, and internal/surveyssvc declares the header sign-in posture.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #1540 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1540, "status": "success", "commits": [ "e91d709cfb1af3f02ee767a622ee133f003c2ba5" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "control-plane/cmd/control-plane/offboard_catalogue_test.go", "internal/clan/frontdoor_test.go", "internal/clan/portroute.go", "internal/clan/surveys.go", "internal/clan/surveys_attach.go", "internal/clan/surveys_attach_test.go", "internal/clan/surveys_test.go", "internal/member/removal.go", "internal/surveyssvc/surveyssvc.go", "internal/surveyssvc/surveyssvc_test.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./...", "exit_code": 0 }, { "command": "go test ./...", "exit_code": 0 } ], "criteria": { "Render test pins plugin config + the strip; a forged X-Idss-Identity on an exempt path is dropped (test)": "internal/clan/surveys.go renders the limesurvey-auth oneshot (AuthWebServer: serverKey=HTTP_X_IDSS_IDENTITY, activation, autocreate member template, operator superadmin seed) pinned by surveys_test.go TestRenderSurveys_AuthWebServerTrustsTheIdentityHeader / _AuthConsoleCarriesLimeSurveyConfigEnv / _OperatorIsSeededSuperadmin; the exempt-path strip is pinned by frontdoor_test.go TestRenderFrontDoor_SurveysExemptPathStripsIdentity (a forged X-Idss-Identity on SurveysExemptPaths is dropped via header_up -X-Idss-Identity; the gated handle keeps copy_headers).", "Operator opens surveys.<apex> signed in as superadmin with no second login; a member lands with the declared template": "SurveysConfig.Operator (from PortPlacement.Operator, portroute.go) seeds the founding operator a superadmin via the Permission model at deploy (renderSurveysAuth, the #1536 seed-the-owner shape) so their first header sign-in lands them as superadmin; AuthWebServer autocreates a member with the idss-member template (create/own surveys). Live end-to-end sign-in is the deferred clan-lab drive (the port's #225/#229 precedent); the render lands the config to the interface and the render tests pin it.", "Declare the port's posture and implement its ReconcileRole from reconciler #1537; the P6-S7/P4-S5 card line reads from it": "internal/surveyssvc declares RoleMapping front-door-only . header . operator->superadmin . member->survey creator, wired into productionServicePorts (main.go) so the catalogue/cards read it; ReconcileRole is a hard no-op (RemoteControl 2 exposes no user-permission setter, verified against surveyshealth.go — the operator superadmin is seeded on the node at deploy, never a fabricated HTTP success, ADR 0100). Pinned by surveyssvc_test.go.", "Security invariant #1167 (header-trusting port strips X-Idss-Identity on client-protocol exempt paths in the SAME commit)": "SurveysExemptPaths flows through portroute.go to the front-door route; renderRoute's generic exempt handle emits header_up -X-Idss-Identity, pinned for surveys by frontdoor_test.go TestRenderFrontDoor_SurveysExemptPathStripsIdentity (same commit)." }, "summary": "Surveys trusts the front door's identity header via AuthWebServer (no OIDC in CE): members autocreate with the member template, the operator is seeded superadmin on the node, the header is stripped on exempt paths, and internal/surveyssvc declares the header sign-in posture.", "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#1540
No description provided.