The member mail claim at /mail is unreachable — the apex route strips the identity header the mail routes trust, so every member gets 401 #1344
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1344
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
A signed-in member opening
https://<apex>/mail(MAIL-M1/M2/M2x, DDR 0117, #318) never sees a screen: every/api/mailcall answers 401.Cause
WithMemberMail(c.mailPortal, nil)(control-plane/cmd/control-plane/main.go~1486) falls back to the header identity resolver, but the apex route is ungated and deliberately stripsX-Idss-Identity(internal/clan/frontdoor.gorenderPortalRoute, #1094) — so the header is never present and the resolver fails closed. The community session cookie the member DOES hold (idss_session, minted by/authz/callback,Domain=<apex>) is never consulted.Found by the Portal map's session-substrate research (#1337,
docs/research/2026-09-08-portal-session-substrate.md§5 onresearch/portal-session-substrate).Fix shape
Pass the gate session resolver (the same
gateResolverthe IDIP steward routes use viastewardSessionResolver) instead ofnil, so/api/mailauthenticates on the cookie like every other apex-served member route. Note the IDIP tier stays wrong even after this (<AID>@<apex>address;Claimgated through the resting kanidm orchestrator) — that half belongs to the Portal map (#1336 ticket #1342), not this fix.Proof
The mail integration test (
internal/controlapi/mail_integration_test.go) driven through a cookie-bearing request with no identity header must reach MAIL-M1; a public-path drive leg that opens/mailafter sign-in.Agent Brief
Category: bug
Summary: The apex-served member mail claim at
/mailreturns 401 on every/api/mailcall — it's wired with anilsession resolver, so it falls back to the header identity that the ungated apex route deliberately strips.Verification (confirmed against the tree): The composition root wires the member-mail surface with a
nilresolver (WithMemberMail(c.mailPortal, nil)), which falls back to the header identity resolver. The apex portal route (renderPortalRoute) is ungated and strips the identity header on purpose (header_up -X-Idss-Identity, #1094 — nothing upstream vouches for it), so the header is never present and the resolver fails closed → 401. The member DOES hold the community session cookie (idss_session,Domain=<apex>) minted by/authz/callback, but the mail surface never consults it. A concrete resolver already exists to pass:gateResolver(aCookieSessionResolver), the same one the IDIP steward routes use viastewardSessionResolver.internal/controlapi/mail_integration_test.goexists as the proof harness.Current behavior:
A signed-in member opening
https://<apex>/mail(MAIL-M1/M2/M2x, DDR 0117, #318) never reaches a screen — every/api/mailcall answers 401, because the mail surface authenticates on a header identity the apex route strips.Desired behavior:
/api/mailauthenticates on the community SSO session cookie (idss_session) the member already holds, exactly like the other apex-served member routes behind the gate resolver. A cookie-bearing request with no identity header reaches MAIL-M1.Key interfaces:
WithMemberMail(service, resolver)) — must be passed the gate session resolver (theSessionResolverthe auth gate and IDIP steward routes already use) instead ofnil.gateResolver/ theCookieSessionResolver— the existing resolver that reads theidss_sessioncookie; this is the value to thread into the mail wiring.Acceptance criteria:
internal/controlapi/mail_integration_test.godrives a cookie-bearing request with no identity header through/api/mailand reaches MAIL-M1 (not 401).nil, in the composition root.go build ./...,go vet, andgo test ./internal/controlapi/...are green.Out of scope:
<AID>@<apex>address and theClaimgated through the resting kanidm orchestrator. That half belongs to the Portal map (#1336, ticket #1342), not this ticket.swarm-claim host=matou-dev-server-01 run=20420
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1344 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope