members: the self-signup form asks for the person's email too (ADR 0251 follow-up) #1583

Closed
opened 2026-09-18 15:33:46 +00:00 by ben · 3 comments
Owner

Why

ADR 0251 (Ben's ruling on #1580) gives a by-hand member a real email address, held as kanidm mail. A person who joins through an invite link still submits only a name (SignupSubmission{Name, Credential, Password, RequestID}), so they have no address. On the services that file a person under their email they read "not yet applied" (Grist, newsletters), and the gate refuses them at data-collections with GateReasonNoEmail.

What

  • SignupSubmission and SignupSpec gain Email, validated and folded by member.NormalizeEmail, with the same one-address-one-person refusal as the by-hand path.
  • kanidm.CreatePendingPerson writes mail in the create (it passes an empty mail today).
  • POST /api/v1/join/{token} and the OpenAPI schema take email. MemberJoinsScreen.vue gains the field, refusals shown verbatim.
  • UX contract: docs/ux/wireframes/p6-members/p6-s3-member-joins.html and the S2→S3 edge in p6-members.mermaid. The IDIP twin already draws an email field (optional there); decide whether the two should agree.

Acceptance

  • A self-signed member, once approved, carries their address as kanidm mail and reads applied on data-collections.
  • A signup with no, a malformed, or an already-held address is refused in the seam's words before a person is created.
  • Wireframe and flow updated in the same change.
## Why ADR 0251 (Ben's ruling on #1580) gives a by-hand member a real email address, held as kanidm `mail`. A person who joins through an invite link still submits only a name (`SignupSubmission{Name, Credential, Password, RequestID}`), so they have no address. On the services that file a person under their email they read "not yet applied" (Grist, newsletters), and the gate refuses them at data-collections with `GateReasonNoEmail`. ## What - `SignupSubmission` and `SignupSpec` gain `Email`, validated and folded by `member.NormalizeEmail`, with the same one-address-one-person refusal as the by-hand path. - `kanidm.CreatePendingPerson` writes `mail` in the create (it passes an empty mail today). - `POST /api/v1/join/{token}` and the OpenAPI schema take `email`. `MemberJoinsScreen.vue` gains the field, refusals shown verbatim. - UX contract: `docs/ux/wireframes/p6-members/p6-s3-member-joins.html` and the S2→S3 edge in `p6-members.mermaid`. The IDIP twin already draws an email field (optional there); decide whether the two should agree. ## Acceptance - [ ] A self-signed member, once approved, carries their address as kanidm `mail` and reads applied on data-collections. - [ ] A signup with no, a malformed, or an already-held address is refused in the seam's words before a person is created. - [ ] Wireframe and flow updated in the same change.

swarm-claim host=bens-mac-04 run=26650
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=26650 (automated multi-host claim — lowest live claim id works this ticket)

Ruled by agent under ADR 0174 — veto anytime.

The issue's open question — the IDIP twin (p6-members-idip/p6-s3i-member-joins.html) draws an optional email field; should the two agree?

Ruling: they DIVERGE on the requirement, deliberately, while sharing the element contract:

  • The P6 operator-app track (p6-members/p6-s3-member-joins.html, this slice) makes the address required — ADR 0251 mandates a real email for every member, and this ticket's acceptance refuses a signup with no/malformed/already-held address. So P6-S3 cannot ship an optional email.
  • The IDIP twin stays optional as its own identity track (its email sits next to a self-minted username + recovery phrase, a different model); nothing in this slice touches it.
  • Both use the same data-field="email" element so the contract element is shared even though the requirement is not.

Why two-way door: revertible by a later commit and provable by the wireframe + the shipped component tests (membersJoin/joinEntry assert the field arms the submit; the seam suite refuses the absent address). If a future decision wants the twin to require it too, that is a one-line label/validation change on the twin — no data destruction, no security-posture change, no member-facing trust accept.

**Ruled by agent under ADR 0174 — veto anytime.** The issue's open question — the IDIP twin (`p6-members-idip/p6-s3i-member-joins.html`) draws an *optional* email field; should the two agree? **Ruling:** they DIVERGE on the requirement, deliberately, while sharing the element contract: - The **P6 operator-app track** (`p6-members/p6-s3-member-joins.html`, this slice) makes the address **required** — ADR 0251 mandates a real email for every member, and this ticket's acceptance refuses a signup with no/malformed/already-held address. So P6-S3 cannot ship an optional email. - The **IDIP twin** stays **optional** as its own identity track (its email sits next to a self-minted username + recovery phrase, a different model); nothing in this slice touches it. - Both use the same `data-field="email"` element so the contract element is shared even though the requirement is not. **Why two-way door:** revertible by a later commit and provable by the wireframe + the shipped component tests (`membersJoin`/`joinEntry` assert the field arms the submit; the seam suite refuses the absent address). If a future decision wants the twin to require it too, that is a one-line label/validation change on the twin — no data destruction, no security-posture change, no member-facing trust accept.

close-report for #1583 — status success

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

envelope
{
  "issue": 1583,
  "status": "success",
  "commits": [
    "d2a38504f5c856abeccba6c6a70f6f9740e0ab50"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/components/members/JoinSurface.vue",
    "dashboard/src/components/members/MemberJoinsScreen.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/members.ts",
    "dashboard/tests/fakes/members.ts",
    "dashboard/tests/unit/joinEntry.test.ts",
    "dashboard/tests/unit/membersJoin.test.ts",
    "docs/ux/flows/p6-members.mermaid",
    "docs/ux/wireframes/p6-members/p6-s3-member-joins.html",
    "internal/controlapi/member_join.go",
    "internal/controlapi/member_join_integration_test.go",
    "internal/kanidm/kanidm.go",
    "internal/kanidm/kanidm_test.go",
    "internal/member/idp.go",
    "internal/member/signup.go",
    "internal/member/signup_test.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/member/ ./internal/kanidm/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./internal/member/ ./internal/kanidm/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./internal/member/... ./internal/kanidm/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    },
    {
      "command": "CI=true node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm --filter @idss/dashboard exec vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "CI=true pnpm --filter @idss/dashboard exec vitest run",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A self-signed member, once approved, carries their address as kanidm mail and reads applied on data-collections": "internal/member/signup.go: SubmitSignup folds the email via NormalizeEmail and passes it to SignupSpec.Email; internal/kanidm/kanidm.go CreatePendingPerson writes it as the `mail` attribute in the create. Proven by internal/member/signup_test.go TestSubmitSignup_EmailReachesThePersonAndReadsAppliedOnDataCollections (person Email folds to mere@marae.nz; GateDecision on data-collections allows carrying that address) and internal/kanidm/kanidm_test.go TestCreatePendingPerson_EmailBecomesTheMailAttribute (mail written and read back).",
    "A signup with no, a malformed, or an already-held address is refused in the seam's words before a person is created": "internal/member/signup.go: SubmitSignup calls NormalizeEmail (ErrNoEmail/ErrBadEmail) before the ledger load and Admit, and runs the one-address-one-person check (ErrEmailInUse) after the idempotent early-return but before Admit/CreatePendingPerson. Proven by internal/member/signup_test.go TestSubmitSignup_RefusesEmailProblemsBeforeCreatingAnyone (no/malformed/display-name/in-use all refused; invite left open, no person minted). Over the wire the control plane returns these as 400 act_failed verbatim (internal/controlapi/member_join.go + writeMemberErr).",
    "Wireframe and flow updated in the same change": "docs/ux/wireframes/p6-members/p6-s3-member-joins.html gains the data-field=\"email\" field (YOUR EMAIL) and caption note; docs/ux/flows/p6-members.mermaid S2->S3 edge now names the required email and its refusal — both in commit d2a38504."
  },
  "summary": "Self-signup joiners now submit their real email, validated/folded by the same seam rule as the by-hand path, written as kanidm mail so an approved joiner reads applied on email-keyed services; screen, wire, wireframe and flow all updated.",
  "blockers": []
}
**close-report** for #1583 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1583, "status": "success", "commits": [ "d2a38504f5c856abeccba6c6a70f6f9740e0ab50" ], "changed_files": [ "STATUS.md", "dashboard/src/components/members/JoinSurface.vue", "dashboard/src/components/members/MemberJoinsScreen.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/members.ts", "dashboard/tests/fakes/members.ts", "dashboard/tests/unit/joinEntry.test.ts", "dashboard/tests/unit/membersJoin.test.ts", "docs/ux/flows/p6-members.mermaid", "docs/ux/wireframes/p6-members/p6-s3-member-joins.html", "internal/controlapi/member_join.go", "internal/controlapi/member_join_integration_test.go", "internal/kanidm/kanidm.go", "internal/kanidm/kanidm_test.go", "internal/member/idp.go", "internal/member/signup.go", "internal/member/signup_test.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/member/ ./internal/kanidm/ ./internal/controlapi/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./internal/member/ ./internal/kanidm/ ./internal/controlapi/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./internal/member/... ./internal/kanidm/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 }, { "command": "CI=true node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "CI=true pnpm --filter @idss/dashboard exec vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "CI=true pnpm --filter @idss/dashboard exec vitest run", "exit_code": 0 } ], "criteria": { "A self-signed member, once approved, carries their address as kanidm mail and reads applied on data-collections": "internal/member/signup.go: SubmitSignup folds the email via NormalizeEmail and passes it to SignupSpec.Email; internal/kanidm/kanidm.go CreatePendingPerson writes it as the `mail` attribute in the create. Proven by internal/member/signup_test.go TestSubmitSignup_EmailReachesThePersonAndReadsAppliedOnDataCollections (person Email folds to mere@marae.nz; GateDecision on data-collections allows carrying that address) and internal/kanidm/kanidm_test.go TestCreatePendingPerson_EmailBecomesTheMailAttribute (mail written and read back).", "A signup with no, a malformed, or an already-held address is refused in the seam's words before a person is created": "internal/member/signup.go: SubmitSignup calls NormalizeEmail (ErrNoEmail/ErrBadEmail) before the ledger load and Admit, and runs the one-address-one-person check (ErrEmailInUse) after the idempotent early-return but before Admit/CreatePendingPerson. Proven by internal/member/signup_test.go TestSubmitSignup_RefusesEmailProblemsBeforeCreatingAnyone (no/malformed/display-name/in-use all refused; invite left open, no person minted). Over the wire the control plane returns these as 400 act_failed verbatim (internal/controlapi/member_join.go + writeMemberErr).", "Wireframe and flow updated in the same change": "docs/ux/wireframes/p6-members/p6-s3-member-joins.html gains the data-field=\"email\" field (YOUR EMAIL) and caption note; docs/ux/flows/p6-members.mermaid S2->S3 edge now names the required email and its refusal — both in commit d2a38504." }, "summary": "Self-signup joiners now submit their real email, validated/folded by the same seam rule as the by-hand path, written as kanidm mail so an approved joiner reads applied on email-keyed services; screen, wire, wireframe and flow all updated.", "blockers": [] } ``` </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#1583
No description provided.