pub struct Provenance {
pub signature: Option<String>,
pub key_id: Option<String>,
pub algorithm: Option<String>,
pub signed_fields: Option<Vec<String>>,
pub signed_at: Option<DateTime<Utc>>,
pub sequence_num: Option<u64>,
pub boot_epoch: Option<String>,
pub signer: Option<String>,
pub boot_counter: Option<u64>,
pub device_attestation: Option<Value>,
pub batch: Option<Value>,
pub license: Option<Value>,
}Expand description
Provenance information for data integrity verification.
Fields§
§signature: Option<String>HMAC-SHA256 signature of the event.
key_id: Option<String>Key ID used for signing.
algorithm: Option<String>Signature algorithm ("hmac-sha256" or "es256").
signed_fields: Option<Vec<String>>Fields included in signature.
signed_at: Option<DateTime<Utc>>Timestamp when signature was created.
sequence_num: Option<u64>Per-agent sequence number; never decreases across restarts when the agent has a sequence state file.
boot_epoch: Option<String>Random ID generated at agent start, so a receiver can tell a restart from a replay.
signer: Option<String>Signer class that produced the signature ("hmac" or "tpm").
boot_counter: Option<u64>TPM NV counter value, incremented once per agent start (TPM signer
only). Order events by (boot_counter, sequence_num).
device_attestation: Option<Value>Device attestation: {"mode": "tpm", "quote_id": ...} referencing
the latest TPM quote, or {"mode": "software", ...} without a TPM.
batch: Option<Value>Merkle batch signature (issue #392): the signed batch statement,
its signature, and this event’s leaf index and inclusion proof.
Present instead of signature when events are batch-signed; see
crate::core::merkle.
license: Option<Value>License state from the agent’s license validator (issue #249).
Implementations§
Source§impl Provenance
impl Provenance
Sourcepub fn with_signature(self, signature: impl Into<String>) -> Self
pub fn with_signature(self, signature: impl Into<String>) -> Self
Set the signature.
Sourcepub fn with_key_id(self, key_id: impl Into<String>) -> Self
pub fn with_key_id(self, key_id: impl Into<String>) -> Self
Set the key ID.
Sourcepub fn with_signed_fields(self, fields: Vec<String>) -> Self
pub fn with_signed_fields(self, fields: Vec<String>) -> Self
Set signed fields.