Skip to main content

Module governance_project

Module governance_project 

Source
Expand description

Project attribution of governance requests (ADR-103 A6, Phase 2 package I).

A kernel serves at most one project. The daemon records that project once at boot from the only source it trusts for it (the kernel’s own bound project, AttestSource::BoundKernel) with set_instance_project. Every GovernanceRequest is then attributed from that attestation, and never from request parameters:

Honest limit: an attestation is only as strong as the transport that produced it. A same-uid local process can still lie through Request.project on the claim path of a daemon that has no binding; this is an isolation guard between one user’s projects, not a boundary against a hostile local process (Phase 3 peer credentials, Phase 4 sandboxes).

§GovernanceRequest construction sites (production code)

None derives a project from request parameters. The population test weave/tests/project_principal_population.rs greps for new ones.

SiteHow it is attributed
GovernanceRequest::new (http_api, profile_store, hnsw_service, causal, wasm_runner)attributed() inside new
gate::GovernanceGate::checkliteral; strips reserved context keys, attributed()
workload_governance::gate::WorkloadGate::decideliteral; attributed_with the gate’s / instance attestation
governance.rs unit testsexplicit, test-only

Constants§

RESERVED_CONTEXT_KEYS
Context keys only the kernel may set.

Functions§

instance_project
The project this kernel serves, if it has been attested.
set_instance_project
Record the project this kernel serves and its node id (daemon boot, once). Refuses anything but a AttestSource::BoundKernel attestation; returns false if one is already set.