Enforce SSH workflow capabilities locally

This commit is contained in:
Eric Wendland 2026-05-19 15:44:13 +02:00
commit f7e85960f7
8 changed files with 328 additions and 62 deletions

View file

@ -139,20 +139,27 @@ pub enum ControlRequest {
requested_validity: Option<String>,
renewal_of: Option<String>,
reason: Option<String>,
subject: Option<String>,
},
SshCertRequests {
subject: Option<String>,
},
SshCertRequests,
SshCertApprove {
request_id: String,
ca_key_path: PathBuf,
valid_for: Option<String>,
serial: Option<u64>,
out: Option<PathBuf>,
subject: Option<String>,
},
SshCertImport {
request_id: String,
cert_path: PathBuf,
subject: Option<String>,
},
SshCertList {
subject: Option<String>,
},
SshCertList,
SshCertSync {
node: String,
},
@ -160,16 +167,21 @@ pub enum ControlRequest {
kind: String,
target: String,
reason: Option<String>,
subject: Option<String>,
},
SshRevocationList {
subject: Option<String>,
},
SshRevocationList,
SshRevocationExport {
out: PathBuf,
format: String,
ca_public: Option<PathBuf>,
subject: Option<String>,
},
SshRevocationImport {
path: PathBuf,
format: String,
subject: Option<String>,
},
SshRevocationSync {
node: String,
@ -920,6 +932,7 @@ mod tests {
out: PathBuf::from("revocations.krl-spec"),
format: "openssh-krl-spec".to_owned(),
ca_public: None,
subject: None,
};
assert_eq!(
decode_request(&encode_request(&request).expect("encode")).expect("decode"),
@ -929,6 +942,7 @@ mod tests {
let request = ControlRequest::SshRevocationImport {
path: PathBuf::from("revocations.jsonl"),
format: "jsonl".to_owned(),
subject: None,
};
assert_eq!(
decode_request(&encode_request(&request).expect("encode")).expect("decode"),