Skip to main content

Module service_enrollment

Module service_enrollment 

Source
Expand description

Service enrollment manifest — the authority-owned declaration of service identity, target clearance, allowed audiences, and workload-session policy (v16 §11).

One manifest per deployment lives at <secrets>/service-enrollment.json, produced by the wizard/bootstrap path. It is consumed once at startup:

  • service verifying keys carried here must AGREE with the hybrid bootstrap-pubkeys file (the enrolled key set is the trust-anchor input — a disagreement is a startup error, never a silent preference);
  • the target clearance stamped into service credentials at issuance and renewal comes from here (renewal re-derives: authority removed from the manifest cannot survive a renewal, and no issuance can exceed it);
  • the workload-session policy decides whether a service credential family may carry a workload_session_id (a standalone service credential omits it — v16 manufactures no session to populate a claim).

Absence is legacy-tolerated for this staging wave (a loud warning; service tokens then carry no manifest-backed clearance). Presence with any malformed entry is a hard startup error — fail-closed.

Structs§

ServiceEnrollment
One enrolled service: identity key, target clearance, audience ceiling, and workload-session policy.
ServiceEnrollmentAlreadySet
Error returned when a second manifest install is attempted.
ServiceEnrollmentManifest
The parsed, validated manifest. Services are keyed by service name.

Constants§

SERVICE_ENROLLMENT_FILE
Manifest file name within the resolved secrets directory.
SERVICE_ENROLLMENT_VERSION
Current manifest format version.

Functions§

ensure_node_authority
Initialize only the node authority, without provisioning a service roster. Existing authority always wins; disagreement is an error, never rotation.
global_service_enrollment
The installed manifest, if any.
reconcile_existing_services
Reconcile credentials for the exact already-provisioned local bootstrap set. Unlike the wizard, this never generates keys or changes bootstrap-pubkeys. Validate the entire retained authority before publishing any credentials.
set_global_service_enrollment
Install the process-global manifest. A second install is an error — two manifests in one process is a startup bug, not a race to absorb.