pub struct VerifiedState { /* private fields */ }Expand description
A verified history prefix. Its fields cannot be mutated without validation.
Implementations§
Source§impl VerifiedState
impl VerifiedState
Sourcepub fn transport_host(&self, node: &str) -> Result<&str>
pub fn transport_host(&self, node: &str) -> Result<&str>
Resolve a live logical node to its native transport host. This does not check freshness or authenticate the host’s key.
Check only the signed transport mapping. The caller must first use authorize_node on this same verified state to authenticate the carrier’s exact node key and check freshness at the current wall-clock time. Hosting permits chat transport only, never configuration operations, and does not replace per-chat permission checks.
Sourcepub fn host_node(
&self,
owner: &(impl ConfigurationSigner + ?Sized),
node_id: &str,
parent: &str,
now: u64,
) -> Result<SignedState>
pub fn host_node( &self, owner: &(impl ConfigurationSigner + ?Sized), node_id: &str, parent: &str, now: u64, ) -> Result<SignedState>
Assign a native parent using existing configuration signing authority. Repeating the same mapping is allowed and changes no configuration grants.
Source§impl VerifiedState
impl VerifiedState
Sourcepub fn migrate_to_peers(
&self,
owner: &OwnerKey,
node: &NodeIdentity,
header: Header,
now: u64,
) -> Result<SignedState>
pub fn migrate_to_peers( &self, owner: &OwnerKey, node: &NodeIdentity, header: Header, now: u64, ) -> Result<SignedState>
Prepare the single owner-authenticated migration. The caller first durably fences the legacy writer, then publishes this candidate through the log. Existing restrictions and identities are preserved exactly.
Sourcepub fn advance_committed(
&mut self,
update: SignedState,
commit: &Commit,
head: &Head,
) -> Result<Head>
pub fn advance_committed( &mut self, update: SignedState, commit: &Commit, head: &Head, ) -> Result<Head>
Called only after opening the committed ciphertext. head is the
durable local log checkpoint, never a value supplied by the proposal.
The runtime must persist the returned head and authority transactionally.
Source§impl VerifiedState
impl VerifiedState
Persist a write fence before returning this authorization to another node.
The caller snapshots completed decisions in the same transaction that freezes signing. The digest authenticates that exact transfer manifest.
Verifies authorization at its original issue time. Once issued, retrying completion after the candidate deadline must preserve the same decision.
Source§impl VerifiedState
impl VerifiedState
pub fn owner_epoch(&self) -> u32
Sourcepub fn transfer_owner(
&self,
owner: &OwnerKey,
successor: &OwnerKey,
now: u64,
) -> Result<SignedState>
pub fn transfer_owner( &self, owner: &OwnerKey, successor: &OwnerKey, now: u64, ) -> Result<SignedState>
Requires possession of both the current signer and a fresh successor. This creates a record only; persistence, fencing and recovery approval belong to the caller. An expired lease does not invalidate the signer.
Source§impl VerifiedState
impl VerifiedState
Sourcepub fn bootstrap(anchor: TrustAnchor, genesis: SignedState) -> Result<Self>
pub fn bootstrap(anchor: TrustAnchor, genesis: SignedState) -> Result<Self>
Bootstrap from the genesis whose digest and owner key were pinned independently. Expired state can be loaded for synchronization, but cannot authorize operations.
Sourcepub fn restore(
anchor: TrustAnchor,
checkpoint: Checkpoint,
signed: SignedState,
) -> Result<Self>
pub fn restore( anchor: TrustAnchor, checkpoint: Checkpoint, signed: SignedState, ) -> Result<Self>
Restore only the exact checkpoint held in trusted endpoint storage.
pub fn anchor(&self) -> &TrustAnchor
pub fn checkpoint(&self) -> &Checkpoint
pub fn signed(&self) -> &SignedState
pub fn state(&self) -> &ClusterState
pub fn require_fresh(&self, now: u64) -> Result<()>
Authorizes a node key, not chat discovery or messaging. Check chat policy separately.
Sourcepub fn apply_chain(&mut self, updates: &[SignedState], now: u64) -> Result<()>
pub fn apply_chain(&mut self, updates: &[SignedState], now: u64) -> Result<()>
Validate a full contiguous update chain before changing any in-memory authority. Historical intermediate records may be expired; the final record must be fresh.
Sourcepub fn advance_history(&mut self, updates: &[SignedState]) -> Result<()>
pub fn advance_history(&mut self, updates: &[SignedState]) -> Result<()>
Advance verified history in bounded batches while offline or catching up. This may leave expired state; authorize_node still requires fresh authority.
Sourcepub fn renew(
&self,
owner: &(impl ConfigurationSigner + ?Sized),
now: u64,
) -> Result<SignedState>
pub fn renew( &self, owner: &(impl ConfigurationSigner + ?Sized), now: u64, ) -> Result<SignedState>
Renewal may repair an expired configuration using endpoint-held owner authority.
pub fn set_release_channel( &self, signer: &(impl ConfigurationSigner + ?Sized), channel: ReleaseChannel, now: u64, ) -> Result<SignedState>
pub fn set_policy( &self, owner: &(impl ConfigurationSigner + ?Sized), policy: Policy, now: u64, ) -> Result<SignedState>
Sourcepub fn configure(
&self,
owner: &(impl ConfigurationSigner + ?Sized),
name: &str,
node: (&str, &str),
policy: Policy,
now: u64,
) -> Result<SignedState>
pub fn configure( &self, owner: &(impl ConfigurationSigner + ?Sized), name: &str, node: (&str, &str), policy: Policy, now: u64, ) -> Result<SignedState>
Apply an owner-authorized TOML edit as one ordered cluster revision.
pub fn rename_node( &self, signer: &(impl ConfigurationSigner + ?Sized), node_id: &str, name: &str, now: u64, ) -> Result<SignedState>
Sourcepub fn enroll(
&self,
owner: &(impl ConfigurationSigner + ?Sized),
request: &SignedEnrollment,
approved_fingerprint: Digest,
now: u64,
) -> Result<SignedState>
pub fn enroll( &self, owner: &(impl ConfigurationSigner + ?Sized), request: &SignedEnrollment, approved_fingerprint: Digest, now: u64, ) -> Result<SignedState>
approved_fingerprint must be independently confirmed by the owner; merely
echoing a fingerprint supplied by the relay does not authenticate enrollment.
Sourcepub fn enroll_configurator(
&self,
owner: &(impl ConfigurationSigner + ?Sized),
request: &SignedEnrollment,
approved: Digest,
now: u64,
) -> Result<SignedState>
pub fn enroll_configurator( &self, owner: &(impl ConfigurationSigner + ?Sized), request: &SignedEnrollment, approved: Digest, now: u64, ) -> Result<SignedState>
Explicit owner approval for a machine used to manage cluster configuration.
pub fn delegate_configuration( &self, owner: &(impl ConfigurationSigner + ?Sized), node: &str, allow: bool, now: u64, ) -> Result<SignedState>
pub fn rotate_node_key( &self, owner: &(impl ConfigurationSigner + ?Sized), request: &SignedEnrollment, approved_fingerprint: Digest, now: u64, ) -> Result<SignedState>
pub fn revoke_node( &self, owner: &(impl ConfigurationSigner + ?Sized), node_id: &str, now: u64, ) -> Result<SignedState>
Sourcepub fn replace_node(
&self,
owner: &(impl ConfigurationSigner + ?Sized),
signed: &SignedEnrollment,
approved: Digest,
can_configure: bool,
now: u64,
) -> Result<SignedState>
pub fn replace_node( &self, owner: &(impl ConfigurationSigner + ?Sized), signed: &SignedEnrollment, approved: Digest, can_configure: bool, now: u64, ) -> Result<SignedState>
Retire the pinned old identity and admit a fresh identity atomically. Endpoint code separately refuses replacing the active signing owner.