fix: portal user headers only from the portal's service client #91

Merged
sharang merged 1 commits from fix/portal-actor-headers into main 2026-10-26 20:39:03 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 3fadfebbb0 fix: portal user headers only from the portal's service client
ci / shared (pull_request) Successful in 30s
ci / test (pull_request) Successful in 25m30s
ci / image (pull_request) Skipped
X-Portal-User-Subject and X-Portal-User-Email named the acting person for
any service client. Any tenants.read client (werkmeister-svc, pruefwerk-svc,
firmwerk-svc) could thereby set the audit actor of a document download, and
a future tenants.write client could act in a user's name on the team routes.

portalUser honours the headers only from a client that holds the users
group (group users.act, satisfied by the existing users grant: only the
portal's service client in stage and prod), as staffActor does for
X-Staff-*. A user token speaks for itself and the headers are ignored.
Used by teamActor, projectActor/projectActorType, the document download
audit and the trial extension. No AUTHZ_RULES change is needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
2026-10-26 21:12:39 +01:00