pub struct ServiceEnrollmentManifest {
pub version: u32,
pub services: BTreeMap<String, ServiceEnrollment>,
}Expand description
The parsed, validated manifest. Services are keyed by service name.
Fields§
§version: u32Format version; must equal SERVICE_ENROLLMENT_VERSION.
services: BTreeMap<String, ServiceEnrollment>Enrolled services by name.
Implementations§
Source§impl ServiceEnrollmentManifest
impl ServiceEnrollmentManifest
Sourcepub fn load(secrets_dir: &Path) -> Result<Option<Self>>
pub fn load(secrets_dir: &Path) -> Result<Option<Self>>
Load the manifest from the secrets directory. Ok(None) when the file
is absent (legacy deployment — logged by the caller). Any present but
malformed content is a hard error.
Sourcepub fn validate_key_agreement(
&self,
bootstrap_pubkeys: &HashMap<String, BootstrapPubkey>,
) -> Result<()>
pub fn validate_key_agreement( &self, bootstrap_pubkeys: &HashMap<String, BootstrapPubkey>, ) -> Result<()>
The manifest must agree with the bootstrap trust anchors on BOTH key halves: every bootstrap-registered service appears here with the SAME Ed25519 key, the ML-DSA-65 half matches where either side carries one (a present-but-different, missing, or extra PQ half is a mismatch), and the manifest names no unknown service. Any divergence is a startup error — the two trust-anchor inputs must never silently disagree.
Sourcepub fn load_and_validate(secrets_dir: &Path) -> Result<Option<Self>>
pub fn load_and_validate(secrets_dir: &Path) -> Result<Option<Self>>
Load the manifest and validate it against the bootstrap trust anchors
in one step — the startup path’s helper. Ok(None) = absent (legacy);
any present-but-invalid or disagreeing manifest is a hard error.
Sourcepub fn from_bootstrap(pubkeys: &HashMap<String, BootstrapPubkey>) -> Self
pub fn from_bootstrap(pubkeys: &HashMap<String, BootstrapPubkey>) -> Self
Build a manifest from freshly provisioned bootstrap keys. The wizard
default target is Internal level with assurance DERIVED FROM THE
BOOTSTRAP KEY MATERIAL: a hybrid (Ed25519 + ML-DSA-65) identity gets
PqHybrid, a classical one Classical — a hybrid-authenticated
service must be able to dominate the reviewed generated dispatch
target (internal:pq-hybrid), which a Classical default would deny at
fresh boot. No session/audience restrictions by default; the operator
reviews every target label at gate 5.
Sourcepub fn reconcile_with_bootstrap(
&self,
pubkeys: &HashMap<String, BootstrapPubkey>,
) -> Result<()>
pub fn reconcile_with_bootstrap( &self, pubkeys: &HashMap<String, BootstrapPubkey>, ) -> Result<()>
Re-provision validation (wizard re-run). The manifest is authoritative
for key binding, so this NEVER rewrites it: a missing/extra service, a
changed Ed25519 key, or a missing/extra/changed PQ half is a hard
error until the operator deliberately edits the manifest (the
reviewed rotation). Fresh installation derives both artifacts once via
Self::from_bootstrap; re-provisioning only validates.
Sourcepub fn write(&self, secrets_dir: &Path) -> Result<()>
pub fn write(&self, secrets_dir: &Path) -> Result<()>
Persist the manifest (public keys + policy only — no secret material).
Sourcepub fn clearance_for_service(&self, service: &str) -> Option<SecurityLabel>
pub fn clearance_for_service(&self, service: &str) -> Option<SecurityLabel>
Authority-issued target clearance for a service, if enrolled.
Sourcepub fn allows_audience(&self, service: &str, audience: Option<&str>) -> bool
pub fn allows_audience(&self, service: &str, audience: Option<&str>) -> bool
Whether issuance for audience is permitted for the service.
None audience list = unrestricted (legacy); Some(list) = the
effective audience must be PRESENT and a member — an enrolled service
with a declared list cannot mint without an exact allowed audience
(fail-closed).
Sourcepub fn workload_session_policy(&self, service: &str) -> bool
pub fn workload_session_policy(&self, service: &str) -> bool
Whether the service runs an enrolled workload credential family that
may carry a workload_session_id.
Trait Implementations§
Source§impl Clone for ServiceEnrollmentManifest
impl Clone for ServiceEnrollmentManifest
Source§fn clone(&self) -> ServiceEnrollmentManifest
fn clone(&self) -> ServiceEnrollmentManifest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServiceEnrollmentManifest
impl Debug for ServiceEnrollmentManifest
Source§impl<'de> Deserialize<'de> for ServiceEnrollmentManifest
impl<'de> Deserialize<'de> for ServiceEnrollmentManifest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ServiceEnrollmentManifest
impl RefUnwindSafe for ServiceEnrollmentManifest
impl Send for ServiceEnrollmentManifest
impl Sync for ServiceEnrollmentManifest
impl Unpin for ServiceEnrollmentManifest
impl UnsafeUnpin for ServiceEnrollmentManifest
impl UnwindSafe for ServiceEnrollmentManifest
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request