document-archive on IDIP: members get Paperless's password form and a button labelled "kanidm"; go straight to the community sign-in #2030

Closed
opened 2026-09-30 16:50:24 +00:00 by ben · 2 comments
Owner

What

On an IDIP community the Document archive (Paperless) greets a member with a username and password form they can never use, and a single sign-on button labelled "kanidm". There is no kanidm on IDIP and no member has a Paperless password, so the door looks broken.

The sign-in path itself works: the "kanidm" button goes to the idss-idp bridge (id.<apex>/authorize?client_id=paperless…), the bridge accepts it and hands the member to the app approval. The button is misnamed and hidden behind a form that can't work.

Reported by Ben on whakatohea-demo, 2026-09-30, the day before the wānanga.

Why

renderPaperlessOIDCBridge (internal/clan/paperless.go) writes the allauth provider with provider_id AND name both set to paperlessOIDCProviderName ("kanidm"). The provider id has to stay, because it is baked into the callback path /accounts/oidc/kanidm/login/callback/ that the bridge registered. But the display name doesn't need to match it. Nothing tells Paperless to skip its own login form.

Fix

In the IDIP render only:

  1. Set the provider's display name to the community's sign-in wording (e.g. "Community sign-in"). Leave provider_id alone, so the registered redirect URI still matches.
  2. Set PAPERLESS_REDIRECT_LOGIN_TO_SSO=true, so the login page forwards straight to the one configured provider. Written with the provider JSON into the oidc env file paperless-web already reads.

Do not set PAPERLESS_DISABLE_REGULAR_LOGIN: the health check and the role reconciler authenticate as the service admin over the API.

Acceptance criteria

  • On an IDIP render, opening document-archive.<apex> signed in at the front door goes straight to the community sign-in, never Paperless's password form.
  • If the form is ever shown, the button reads the community sign-in wording, not "kanidm".
  • The callback path and the bridge's registered redirect URI are unchanged; a render test pins both.
  • The kanidm path's render is unchanged.
  • The document-archive health check still passes (service admin over the API).

Also found: the demo's Paperless config is stale

whakatohea-demo's paperless.nix was rendered on 2026-09-29, before e4943ee4. It still has email_authentication: true on the bridge provider, which Ben's ADR 0255 amendment ruled OFF on IDIP. The release lane doesn't re-render a port's module (#1881), so the demo keeps the old behaviour until Paperless is redeployed from the control panel. That's a sign-in trust setting, so the demo change waits for Ben's word; this ticket's fix, once released, and a Paperless redeploy together bring the demo in line.

## What On an IDIP community the Document archive (Paperless) greets a member with a username and password form they can never use, and a single sign-on button labelled **"kanidm"**. There is no kanidm on IDIP and no member has a Paperless password, so the door looks broken. The sign-in path itself works: the "kanidm" button goes to the idss-idp bridge (`id.<apex>/authorize?client_id=paperless…`), the bridge accepts it and hands the member to the app approval. The button is misnamed and hidden behind a form that can't work. Reported by Ben on whakatohea-demo, 2026-09-30, the day before the wānanga. ## Why `renderPaperlessOIDCBridge` (`internal/clan/paperless.go`) writes the allauth provider with `provider_id` AND `name` both set to `paperlessOIDCProviderName` ("kanidm"). The provider id has to stay, because it is baked into the callback path `/accounts/oidc/kanidm/login/callback/` that the bridge registered. But the display `name` doesn't need to match it. Nothing tells Paperless to skip its own login form. ## Fix In the IDIP render only: 1. Set the provider's display `name` to the community's sign-in wording (e.g. "Community sign-in"). Leave `provider_id` alone, so the registered redirect URI still matches. 2. Set `PAPERLESS_REDIRECT_LOGIN_TO_SSO=true`, so the login page forwards straight to the one configured provider. Written with the provider JSON into the oidc env file `paperless-web` already reads. Do not set `PAPERLESS_DISABLE_REGULAR_LOGIN`: the health check and the role reconciler authenticate as the service admin over the API. ## Acceptance criteria - [ ] On an IDIP render, opening `document-archive.<apex>` signed in at the front door goes straight to the community sign-in, never Paperless's password form. - [ ] If the form is ever shown, the button reads the community sign-in wording, not "kanidm". - [ ] The callback path and the bridge's registered redirect URI are unchanged; a render test pins both. - [ ] The kanidm path's render is unchanged. - [ ] The document-archive health check still passes (service admin over the API). ## Also found: the demo's Paperless config is stale whakatohea-demo's `paperless.nix` was rendered on 2026-09-29, before e4943ee4. It still has `email_authentication: true` on the bridge provider, which Ben's ADR 0255 amendment ruled OFF on IDIP. The release lane doesn't re-render a port's module (#1881), so the demo keeps the old behaviour until Paperless is redeployed from the control panel. That's a sign-in trust setting, so the demo change waits for Ben's word; this ticket's fix, once released, and a Paperless redeploy together bring the demo in line.

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

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

close-report for #2030 — status success

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

envelope
{
  "issue": 2030,
  "status": "success",
  "commits": [
    "4bc6d149"
  ],
  "changed_files": [
    "internal/clan/paperless.go",
    "internal/clan/paperless_test.go",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "go test ./internal/clan/",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/clan/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "On an IDIP render, opening document-archive.<apex> goes straight to the community sign-in, never Paperless's password form": "renderPaperlessOIDCBridge now writes PAPERLESS_REDIRECT_LOGIN_TO_SSO=true into the oidc env file paperless-web reads (internal/clan/paperless.go); pinned by TestRenderPaperless_IDIPBridgeOIDC asserting `PAPERLESS_REDIRECT_LOGIN_TO_SSO=true`",
    "If the form is ever shown, the button reads the community sign-in wording, not kanidm": "the provider display name is set from paperlessBridgeProviderDisplayName=\"Community sign-in\" (jq name:$pname, pname=$displayname) in paperless.go; pinned by TestRenderPaperless_IDIPBridgeOIDC asserting `displayname=\"Community sign-in\"`",
    "The callback path and the bridge's registered redirect URI are unchanged; a render test pins both": "provider_id stays \"kanidm\" (jq provider_id:$pid, pid=$provider=kanidm) so /accounts/oidc/kanidm/login/callback/ is unchanged; TestRenderPaperless_IDIPBridgeKeepsKanidmCallbackRoute pins the render's callback route, idssidp_test.go:309 pins the bridge's registered redirect URI (idssidp.go untouched)",
    "The kanidm path's render is unchanged": "only renderPaperlessOIDCBridge changed; TestRenderPaperless_KanidmPathUnchangedBy2030 asserts the kanidm render carries no Community sign-in / PAPERLESS_REDIRECT_LOGIN_TO_SSO / displayname and keeps provider_id:$pname,name:$pname",
    "The document-archive health check still passes (service admin over the API)": "PAPERLESS_DISABLE_REGULAR_LOGIN is deliberately NOT set (only the login PAGE forwards, the API token still authenticates); TestRenderPaperless_IDIPBridgeOIDC asserts the render never contains PAPERLESS_DISABLE_REGULAR_LOGIN"
  },
  "summary": "On IDIP, the document-archive login page forwards straight to the community sign-in and the SSO button reads that wording, not \"kanidm\", while keeping the kanidm callback route and regular-login (health-check) API auth.",
  "blockers": [],
  "unproven_by_seam": "The seam is the Nix render; it does not exercise a live Paperless honouring PAPERLESS_REDIRECT_LOGIN_TO_SSO / rendering the display name, nor the login-page forward end to end — that rides a live IDIP drive / the whakatohea-demo Paperless redeploy."
}
**close-report** for #2030 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 2030, "status": "success", "commits": [ "4bc6d149" ], "changed_files": [ "internal/clan/paperless.go", "internal/clan/paperless_test.go", "STATUS.md" ], "tests": [ { "command": "go test ./internal/clan/", "exit_code": 0 }, { "command": "go vet ./internal/clan/", "exit_code": 0 } ], "criteria": { "On an IDIP render, opening document-archive.<apex> goes straight to the community sign-in, never Paperless's password form": "renderPaperlessOIDCBridge now writes PAPERLESS_REDIRECT_LOGIN_TO_SSO=true into the oidc env file paperless-web reads (internal/clan/paperless.go); pinned by TestRenderPaperless_IDIPBridgeOIDC asserting `PAPERLESS_REDIRECT_LOGIN_TO_SSO=true`", "If the form is ever shown, the button reads the community sign-in wording, not kanidm": "the provider display name is set from paperlessBridgeProviderDisplayName=\"Community sign-in\" (jq name:$pname, pname=$displayname) in paperless.go; pinned by TestRenderPaperless_IDIPBridgeOIDC asserting `displayname=\"Community sign-in\"`", "The callback path and the bridge's registered redirect URI are unchanged; a render test pins both": "provider_id stays \"kanidm\" (jq provider_id:$pid, pid=$provider=kanidm) so /accounts/oidc/kanidm/login/callback/ is unchanged; TestRenderPaperless_IDIPBridgeKeepsKanidmCallbackRoute pins the render's callback route, idssidp_test.go:309 pins the bridge's registered redirect URI (idssidp.go untouched)", "The kanidm path's render is unchanged": "only renderPaperlessOIDCBridge changed; TestRenderPaperless_KanidmPathUnchangedBy2030 asserts the kanidm render carries no Community sign-in / PAPERLESS_REDIRECT_LOGIN_TO_SSO / displayname and keeps provider_id:$pname,name:$pname", "The document-archive health check still passes (service admin over the API)": "PAPERLESS_DISABLE_REGULAR_LOGIN is deliberately NOT set (only the login PAGE forwards, the API token still authenticates); TestRenderPaperless_IDIPBridgeOIDC asserts the render never contains PAPERLESS_DISABLE_REGULAR_LOGIN" }, "summary": "On IDIP, the document-archive login page forwards straight to the community sign-in and the SSO button reads that wording, not \"kanidm\", while keeping the kanidm callback route and regular-login (health-check) API auth.", "blockers": [], "unproven_by_seam": "The seam is the Nix render; it does not exercise a live Paperless honouring PAPERLESS_REDIRECT_LOGIN_TO_SSO / rendering the display name, nor the login-page forward end to end — that rides a live IDIP drive / the whakatohea-demo Paperless redeploy." } ``` </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.

Dependencies

No dependencies set.

Reference
Matou/idss#2030
No description provided.