Skip to content

Secrets RBAC: principal resolver doesn't filter soft-deleted users/teams (residual access) #10346

Closed

Description

@mrveiss

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

  1. mrveiss commented on Jun 20, 2026

    @mrveiss
    OwnerAuthor

    Resolved by PR #10351 — squash-merged to Dev_new_gui. PrincipalFacts gains an active gate (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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions