Skip to content

Record the certificate-principal invariant in security/DESIGN.md #4126

Closed

Description

@harper-joseph

Problem

#4069 adds an invariant: every place a verified client certificate selects the principal (security/auth.ts for HTTPS and WSS, server/mqtt.ts for MQTT over TLS) must install certificatePrincipal(user, getUser). The mark it sets holds the certificate admission, and every view that replaces such a principal must carry it: a recheck's cloneUserView(fresh, undefined, admission) and an MCP refresh's withCertificateAdmission. A path that does not fails closed, and its clients' live subscriptions then need a role. The live-subscription role latch (latchRoleRequirement) is keyed on that admission.

Resolution

#4280 brought security/DESIGN.md under its budget, so #4069 now records the invariant there: a subsection of the user-lookup notes ("A certificate's principal keeps one admission across its views"). The scoped-token rehydration rule names carrying a certificate admission, and server/DESIGN.md's recheck note points to the subsection. This issue closes when #4069 merges.

Review-Deferral: 4123c8ae08b0bfe1 severity=nit category=documentation
Review-Deferral: 58705daddf8ce6ba severity=nit category=documentation

🤖 Generated by Claude (Anthropic, Claude Code); posted via @harper-joseph.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions