Skip to main content

signstar_yubihsm2/automation/
scenario.rs

1//! Provisioning scenarios.
2
3#[cfg(feature = "serde")]
4use serde::Deserialize;
5
6use crate::automation::{Auth, Command};
7
8/// Describes a series of commands to be executed against a YubiHSM2.
9///
10/// The `auth` parameter indicates initial authentication data.
11/// The set of commands to be executed is processed in a sequential manner.
12/// The additional [Auth] command may be used to re-authenticate as another user while executing the
13/// scenario.
14#[derive(Debug)]
15#[cfg_attr(feature = "serde", derive(Deserialize))]
16#[cfg_attr(feature = "serde", serde(rename_all = "PascalCase"))]
17pub struct Scenario {
18    /// Initial authentication data required to establish the connection to a YubiHSM2.
19    pub auth: Auth,
20
21    /// Commands to be executed.
22    pub steps: Vec<Command>,
23}