gnomonlearn
Docs/RFC-0048/Reference catalog

RFC-0048 · Reference catalog

Versioned draft snapshot

RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.

Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.

← Read the authored RFC

Generated reference catalog. This page renders structured Lean data for RFC-0048: defined terms, diagnostics, dependencies, and invariants. It does not establish proof coverage or runtime conformance. The authored narrative lives in RFC-0048.

This page is generated from the lean/Gnomon/Spec/ module for RFC-0048. Edit that source and regenerate this catalog.


Title: Principal and Session Model
Status: draft
Owners: Runtime, Security
Diagnostic range: M48000-M48099

Depends on: RFC-0001, RFC-0006, RFC-0007, RFC-0008, RFC-0010, RFC-0024, RFC-0033, RFC-0036, RFC-0037, RFC-0038, RFC-0039, RFC-0040, RFC-0042

Proof citations in source: 16 / 16. Standalone proof verification is pending.


Definitions

TermMeaning
Anonymous principalThe well-known Principal representing unauthenticated calls.
AuthenticationThe process that resolves an inbound request’s credentials to a Principal.
AuthorizationThe process that checks whether a Principal’s Session permits a specific operation.
PrincipalThe stable identity of a caller. A user, service account, internal system component, or the special anonymous identity.
SessionA bound runtime context: a Principal + tenant + capabilities + timing + scope. The unit of authentication state.
Session tokenAn opaque or signed string that lets a caller resume a previously-authenticated Session across requests.

Diagnostics

CodeSeverityDescription
M48010ErrorAttempt to create a system-kind principal from user code; reserved kind
M48011ErrorPrincipal id is malformed (not opaque text) or empty
M48020ErrorCross-tenant session escalation attempted
M48021ErrorSession tenantId does not match the request’s claimed tenant
M48030ErrorOperation requires capabilities not in the session’s scopes; access denied
M48031ErrorSub-session attenuation produced empty scope set; invocation cannot proceed
M48040ErrorInbound credential of unsupported kind
M48041ErrorAuthentication failed: credential does not resolve to any active Principal
M48050ErrorInbound request missing credential and API does not permit anonymous access
M48051ErrorInbound credential present but malformed; reject without anonymous fallback
M48060ErrorRefresh attempted on a session past its refreshableUntil deadline
M48061ErrorRefresh attempted with widening scopes; refresh MUST NOT widen
M48070DefectSession token equals a Principal id; tokens MUST NOT be principal handles
M48080WarningSession bound to an inactive Principal; treating session as expired
M48090ErrorAnonymous principal modification attempted (anonymous is immutable)

Dependency neighborhood

graph LR
  nRFC_0048["RFC-0048"]
  nRFC_0001["RFC-0001"]
  nRFC_0048 --> nRFC_0001
  nRFC_0006["RFC-0006"]
  nRFC_0048 --> nRFC_0006
  nRFC_0007["RFC-0007"]
  nRFC_0048 --> nRFC_0007
  nRFC_0008["RFC-0008"]
  nRFC_0048 --> nRFC_0008
  nRFC_0010["RFC-0010"]
  nRFC_0048 --> nRFC_0010
  nRFC_0024["RFC-0024"]
  nRFC_0048 --> nRFC_0024
  nRFC_0033["RFC-0033"]
  nRFC_0048 --> nRFC_0033
  nRFC_0036["RFC-0036"]
  nRFC_0048 --> nRFC_0036
  nRFC_0037["RFC-0037"]
  nRFC_0048 --> nRFC_0037
  nRFC_0038["RFC-0038"]
  nRFC_0048 --> nRFC_0038
  nRFC_0039["RFC-0039"]
  nRFC_0048 --> nRFC_0039
  nRFC_0040["RFC-0040"]
  nRFC_0048 --> nRFC_0040
  nRFC_0042["RFC-0042"]
  nRFC_0048 --> nRFC_0042

Invariants

  1. Anonymous sessions are not persisted and live only for the duration of the request. (enforced by: runtime)
  2. Cross-tenant session escalation is prohibited; a different tenant requires a new authentication. (enforced by: runtime)
  3. Refresh MUST NOT widen scopes; it only extends expiresAt. (enforced by: runtime)
  4. Session scopes MUST NOT be widened during the session’s lifetime. (enforced by: runtime)
  5. Session scopes MUST be a subset of the bound principal’s scopes. (enforced by: runtime)
  6. Session tokens MUST NOT be the same as principal ids. (enforced by: runtime)
  7. Sub-session authority is the intersection of resolved parent capabilities and the called operation’s required capabilities. (enforced by: runtime)
  8. The anonymous principal has stable id anonymous and only the kernel-owned public scope across runtime restarts. (enforced by: runtime)
  9. The audit log MUST record principalId, tenantId, and authMethod for every operation. (enforced by: runtime)
  10. system-kind principals MUST NOT be created from user code. (enforced by: runtime)

Normative Statements

Statements are structured source data. Proof citations, where present, have not passed a standalone Gnomon proof gate.

Authentication

  1. MUST — A recognized invalid credential MUST stop authenticator dispatch without anonymous fallback.
  2. MUST — Inbound credentials of an unsupported kind MUST produce M48040. (proof citation: rfc0048_b20_grounded; verification pending)
  3. MUST_NOT — User code MUST NOT use the system installer principal at runtime. (proof citation: rfc0048_b36_grounded; verification pending)

Capability Attenuation

  1. MUST — Every capability resolution MUST be filtered through the active session. (proof citation: rfc0048_b3_grounded; verification pending)
  2. MUST_NOT — Once attenuated, a session’s scopes MUST NOT be widened without fresh authentication. (proof citation: rfc0048_b0_grounded; verification pending)

Compatibility and Migration

  1. MUST — Runtime image MUST seed the system.installer Principal during boot before any module install runs. (proof citation: rfc0048_b23_grounded; verification pending)
  2. MUST — Sessions MUST record authMethod. (proof citation: rfc0048_b11_grounded; verification pending)

Invariants

  1. MUST — Audit log MUST record principalId, tenantId, and authMethod for every operation. (proof citation: rfc0048_b14_grounded; verification pending)
  2. MUST — The anonymous principal MUST retain the stable id anonymous and only the kernel-owned public scope across runtime restarts.
  3. MUST_NOT — system-kind principals MUST NOT be user-created.

Principal

  1. MUST — Anonymous principals MUST hold only the kernel-owned public scope.
  2. MUST_NOT — Public capabilities MUST NOT authorize mutating or tenant-scoped operations.
  3. MUST_NOT — Runtime MUST NOT impose a structural format on Principal id. (proof citation: rfc0048_b27_grounded; verification pending)
  4. MUST_NOT — User code MUST NOT create system-kind principals.

Session

  1. MUST_NOT — Session scope MUST NOT be widened during the session’s lifetime. (proof citation: rfc0048_b9_grounded; verification pending)
  2. MUST — Session scope MUST be recorded at creation. (proof citation: rfc0048_b34_grounded; verification pending)
  3. MUST — Session scopes MUST be a subset of the bound principal’s scopes. (proof citation: rfc0048_b31_grounded; verification pending)
  4. MUST_NOT — Sub-session expiresAt MUST NOT exceed the parent’s expiresAt.
  5. MUST — Sub-session scopes MUST be a subset of the parent’s scopes. (proof citation: rfc0048_b16_grounded; verification pending)

Session Lifecycle

  1. MUST — Every privileged request MUST consult authoritative session or revocation state.
  2. MUST — Expired sessions MUST be rejected with core.errors.Unauthorized. (proof citation: rfc0048_b18_grounded; verification pending)
  3. MUST_NOT — Refresh MUST NOT widen scopes. (proof citation: rfc0048_b25_grounded; verification pending)
  4. MUST — Refresh attempts on expired sessions MUST produce M48060. (proof citation: rfc0048_b29_grounded; verification pending)
  5. MUST — Requests with no token to APIs not permitting anonymous access MUST be rejected (M48050). (proof citation: rfc0048_b39_grounded; verification pending)

Session Token

  1. MUST_NOT — Session tokens MUST NOT be principal IDs.
  2. MUST — Token lifetime MUST be bounded by the session’s expiresAt.
  3. MUST — Token modification MUST be detectable (signed or opaque server-side reference).

Linked References

DirectionTarget
Depends onRFC-0001
Depends onRFC-0006
Depends onRFC-0007
Depends onRFC-0008
Depends onRFC-0010
Depends onRFC-0024
Depends onRFC-0033
Depends onRFC-0036
Depends onRFC-0037
Depends onRFC-0038
Depends onRFC-0039
Depends onRFC-0040
Depends onRFC-0042