You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered during review of #10344 (secrets access audit). Latent gap in the forward principal resolver, not introduced by that PR.
services/secrets_principal_resolver.py reads team_memberships / user_roles / llc_company_memberships with no filter on user/team soft-delete (User.is_deleted/is_active, team deleted_at). So a soft-deleted user (or membership in a soft-deleted team) still resolves into PrincipalFacts.accessible_vaults() and would be granted secret access by UnifiedSecretsService.read.
The new access-audit (#10344) faithfully mirrors this (it over-reports exactly as much as the live path over-grants — by design), which is what surfaced it.
Fix: filter soft-deleted principals in resolve_principal_facts (and correspondingly in services/secrets_access_audit.py::_members_of). Confirm the exact soft-delete columns on User/Team.
Priority: medium (requires a still-valid session for the soft-deleted user, but it's a real residual-access path).
Activity
fix(secrets): deny vault access to deactivated/soft-deleted principals (
mrveiss commentedon Jun 20, 2026
Resolved by PR #10351 — squash-merged to Dev_new_gui. PrincipalFacts gains an
activegate (inactive → no vault); resolver short-circuits existing-but-inactive callers; audit drops known-inactive members. Review APPROVED (no findings); 23 authz unit + 11 PG tests.