pub enum SecretsRaftOp {
RegisterNode {
identity: NodeIdentity,
},
RevokeNode {
node_id: String,
},
RotateDek {
new_wraps: WrappedDek,
},
PutSecret {
secret: ReplicatedSecret,
},
DeleteSecret {
storage_key: String,
},
}Expand description
Op type for the secrets Raft state machine.
Replicated through openraft alongside the existing scheduler ops.
zlayer-consensus carries the bytes; zlayer-secrets’s raft_sm.rs
applies them. The variants intentionally mirror the structure of
crate::storage::NodeIdentity, crate::storage::WrappedDek, and
crate::storage::ReplicatedSecret so the wire shape is identical to
the stored shape.
Variants§
RegisterNode
Register a new node. Triggers an automatic re-wrap of the current DEK so the new node can decrypt secrets going forward.
Fields
identity: NodeIdentityIdentity payload (uuid, X25519 pubkey, WG pubkey, joined_at).
RevokeNode
Soft-revoke a node. Followers stop including it in DEK wraps; the
next RotateDek excludes it permanently.
RotateDek
Rotate the cluster DEK. The leader proposes a new generation with
fresh per-node wraps; followers re-encrypt every ReplicatedSecret
from the previous generation to the new one.
Fields
new_wraps: WrappedDekNew wrapped-DEK envelope (generation + per-node wraps).
PutSecret
Insert or update a secret. The ciphertext is encrypted under the
dek_generation recorded inside the payload.
Fields
secret: ReplicatedSecretThe full replicated secret record.
DeleteSecret
Remove a secret entirely. Hard delete — re-encryption skips it.
Trait Implementations§
Source§impl Clone for SecretsRaftOp
impl Clone for SecretsRaftOp
Source§fn clone(&self) -> SecretsRaftOp
fn clone(&self) -> SecretsRaftOp
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more