Skip to main content

StepFact

Enum StepFact 

Source
#[non_exhaustive]
pub enum StepFact {
Show 23 variants CeremonyStarted { name: String, template: Sha256Digest, }, RoleDeclared { role: RoleId, name: String, }, RoleAssigned { role: RoleId, person: String, }, ParameterBound { name: ParamId, value: Value, }, MaterialLoaded { name: MaterialId, identifier: Option<String>, }, MaterialDigest { name: MaterialId, digest: Sha256Digest, }, BackendBound { name: String, provider: String, identity: String, }, MachineInfoRecorded { step: StepId, info: Value, }, ActStarted { id: ActId, label: String, }, StepStarted { id: StepId, label: String, role: RoleId, }, PromptAnswered { step: Option<StepId>, prompt: Prompt, response: ResponseRecord, }, BackendOperation { step: StepId, kind: String, backend: Option<String>, inputs: Value, outputs: Value, fingerprint: Option<String>, }, WrapRecipientRecorded { step: StepId, source: String, fingerprint: String, declared: bool, }, AttestationRecorded { step: StepId, role: RoleId, statement: String, }, ArtifactWritten { step: StepId, name: String, file: String, digest: Option<Sha256Digest>, }, DeviationRecorded { step: Option<StepId>, text: String, }, StepAttemptFailed { step: StepId, attempt: u32, error: ErrorRecord, }, StepCompleted { id: StepId, outcome: StepOutcome, }, CeremonyCompleted {}, CeremonyFailed { error: ErrorRecord, }, EntropySeeded { m: String, source: String, derivation: String, }, EntropyContributed { step: StepId, epoch: u32, contribution: String, }, EntropyDrawn { step: StepId, path: String, value: String, },
}
Expand description

Durable, transcript-worthy fact.

Every variant is recorded by the runtime’s transcript sink synchronously before being forwarded to the UI. Action handlers emit BackendOperation and AttestationRecorded; all other variants are emitted by the executor at the corresponding lifecycle boundary.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

CeremonyStarted

Ceremony has started running.

Fields

§name: String

Ceremony name from the DSL.

§template: Sha256Digest

Digest of the ceremony YAML the run was resolved from. The inputs supplied for this run are recorded as their own facts, one each, so this digest covers the template only.

§

RoleDeclared

A role the ceremony defines, with its display name.

Recorded once per role at ceremony start, whether or not anyone is assigned to it. Later facts name the role by id only.

Fields

§role: RoleId

Role identifier.

§name: String

Human-readable role name, from the ceremony’s role definition.

§

RoleAssigned

A person was assigned to a role for this run.

One fact per assignment, so each can be withheld on its own.

Fields

§role: RoleId

Role identifier.

§person: String

The person, as supplied at run time. Recorded as given; nothing in the ceremony proves who the person is.

§

ParameterBound

A parameter took its value for this run, supplied or defaulted.

Fields

§name: ParamId

Parameter identifier.

§value: Value

The resolved value.

§

MaterialLoaded

A material was loaded at ceremony start.

The digest of a digital material is a separate fact, MaterialDigest, so the two can be disclosed to different audiences.

Fields

§name: MaterialId

Material identifier.

§identifier: Option<String>

Identifier of a physical or pre-provisioned material, such as a serial number, when the ceremony supplied one.

§

MaterialDigest

The digest of a digital material’s bytes.

Fields

§name: MaterialId

Material identifier.

§digest: Sha256Digest

Digest of the file as loaded.

§

BackendBound

A backend was first acquired in this run.

Recorded once per backend, before the first operation on it. Backend operations name the backend and do not repeat its identity, which can carry device serials.

Fields

§name: String

Backend name from the ceremony.

§provider: String

Backend provider (e.g. openssl, yubikey, pkcs11).

§identity: String

Identity the backend reports for itself, such as a device serial and firmware version.

§

MachineInfoRecorded

A snapshot of the machine the ceremony ran on.

Fields

§step: StepId

Step that captured the snapshot.

§info: Value

The parts of the host snapshot the step was asked to record.

§

ActStarted

Beginning of an act (named subdivision of a ceremony).

Fields

§id: ActId

Act identifier.

§label: String

Act label as authored in the DSL.

§

StepStarted

Beginning of a step.

Fields

§id: StepId

Step identifier.

§label: String

Step label as authored in the DSL.

§role: RoleId

Role responsible for this step. Its name is on the role’s RoleDeclared fact.

§

PromptAnswered

A prompt has been answered and validated.

Fields

§step: Option<StepId>

Step that issued the prompt, if any. None for ceremony-level prompts emitted before the first step (e.g. the ceremony-start confirmation) or after the last step.

§prompt: Prompt

The prompt as issued.

§response: ResponseRecord

Redacted response record.

§

BackendOperation

A backend operation completed and produced structured evidence.

Fields

§step: StepId

Step under which the operation ran.

§kind: String

Stable operation kind (e.g. generate_key, sign_data).

§backend: Option<String>

The backend the step ran with, by the name the ceremony gives it; its identity is on that backend’s StepFact::BackendBound. Absent for an operation done in software.

§inputs: Value

Structured inputs to the operation (parameters, references).

§outputs: Value

Structured outputs from the operation (artifact ids, hashes).

§fingerprint: Option<String>

Optional fingerprint of the produced material.

§

WrapRecipientRecorded

A key held outside the ceremony was used as the recipient of a wrap.

Its own fact rather than a field on the wrap operation: the method of a wrap is publishable and the identity of a custodian may not be, and a fact carries one confidentiality level.

The fingerprint records the bytes that were present. Nothing in the ceremony corroborates that they belong to the intended recipient, and nothing shows the recipient can open the result. The fact states an assumption the ceremony rests on, not something Rite proved.

Fields

§step: StepId

Step that wrapped to this recipient.

§source: String

The artifact or material the recipient key came from, as named in the ceremony.

§fingerprint: String

sha256:<hex> over the recipient’s SPKI DER.

§declared: bool

Whether the ceremony declared this fingerprint in advance, so the runtime checked the key it received against the definition rather than recording whatever arrived.

§

AttestationRecorded

A human attestation was recorded.

Fields

§step: StepId

Step under which the attestation was recorded.

§role: RoleId

Role that issued the attestation.

§statement: String

Verbatim attestation statement.

§

ArtifactWritten

An artifact was written to the run’s artifacts/ directory.

Fields

§step: StepId

Step that produced the artifact.

§name: String

Artifact name as declared in the DSL.

§file: String

File name under artifacts/: one path component, no directory.

§digest: Option<Sha256Digest>

Digest of the file’s bytes. Absent when the artifact is content a step opened: a digest of a secret can be tested against guesses, so none is recorded.

§

DeviationRecorded

A deviation was logged by the operator.

Fields

§step: Option<StepId>

Step in which the deviation was logged, if any. None for deviations logged outside of a step (before the first step or while a ceremony-level prompt is pending).

§text: String

Verbatim deviation text.

§

StepAttemptFailed

A step attempt failed. Recorded per attempt, so a retried step shows StepAttemptFailed{attempt: 1} followed by the operator’s retry decision and, on success, StepCompleted. The final attempt of a step that the run gives up on is followed by the terminal CeremonyFailed.

Fields

§step: StepId

Step whose attempt failed.

§attempt: u32

1-based attempt number within this step.

§error: ErrorRecord

Structured error record for the failed attempt.

§

StepCompleted

Step finished executing.

Fields

§id: StepId

Step identifier.

§outcome: StepOutcome

How the step ended.

§

CeremonyCompleted

Ceremony finished successfully.

The transcript’s fingerprint is the chain value of this line, which any reader recomputes, so the fact itself carries no fingerprint field. The runtime forwards the value to frontends through an out-of-band channel event.

§

CeremonyFailed

Ceremony failed or was aborted.

Fields

§error: ErrorRecord

Structured error record.

§

EntropySeeded

The ceremony entropy source was seeded with machine randomness.

Emitted once by the runner at ceremony start (run-metadata). Records the machine contribution m and the frozen derivation scheme so any value the ceremony later draws is re-derivable from the transcript alone. Part of the entropy source family.

Like every fact, it is timed by the at on its chain envelope.

Fields

§m: String

Lowercase hex of the gathered machine entropy m.

§source: String

Provenance of m (e.g. os). A single label today; comma-separated if more than one source is ever mixed.

§derivation: String

Frozen derivation-scheme tag (e.g. rite-kdf/v1) that pins the entire construction. A verifier rejects an unrecognised value.

§

EntropyContributed

A human folded additional entropy into the seed, advancing the ratchet.

Emitted by the authored gather_entropy step. The verbatim operator contribution is recorded so the epoch chain re-folds identically; it is public, witnessed entropy, not a secret. Timed by its enclosing step boundaries (and by the PromptAnswered that captured the input).

Fields

§step: StepId

Step under which the contribution was gathered.

§epoch: u32

Epoch index produced by this fold (1 for the first contribution).

§contribution: String

Verbatim operator contribution, fed as UTF-8 into the ratchet.

§

EntropyDrawn

A value was drawn from the entropy source (a nonce, certificate serial, or challenge).

Emitted whenever an action draws bytes from the entropy source. The derivation path plus the recorded seed let rite verify re-derive the value and confirm the right value reached the right consumer. Like other action-emitted evidence, it is timed by its enclosing step.

Fields

§step: StepId

Step that drew the value.

§path: String

Derivation path <epoch>/<step>/<purpose>.

§value: String

Lowercase hex of the derived bytes. Its length fixes the byte count, so rite verify re-derives exactly this many bytes from the seed.

Implementations§

Source§

impl StepFact

Source

pub fn default_level(&self) -> Level

The level a fact of this type is recorded at.

Method facts (what was done, in what order, with what result) are public, and so are attestations, whose statement is authored in the ceremony. Free text, answers typed at prompts, the error message of a failed attempt, and identities of devices and inputs are restricted. Persons, material digests and the host snapshot are confidential.

A failed ceremony stays public despite its error message: a public disclosure needs its terminal fact.

Source

pub fn is_side_effect(&self) -> bool

Whether this fact evidences work performed on the world: a backend operation, a written artifact, a captured attestation, or consumed entropy. Interaction records (an answered prompt, an operator deviation note) and lifecycle markers are not side effects: repeating the interaction is safe and simply produces a fresh record.

The runtime’s retry gate refuses to re-execute a step attempt that already emitted a side-effect fact.

Trait Implementations§

Source§

impl Clone for StepFact

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StepFact

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for StepFact

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for StepFact

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.