fix(openbao): fix init response field name for keys_base64
OpenBao returns `keys_base64` not `unseal_keys_b64`. Added serde alias to accept both field names for compatibility.
This commit is contained in:
@@ -19,7 +19,8 @@ pub struct BaoClient {
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct InitResponse {
|
||||
pub unseal_keys_b64: Vec<String>,
|
||||
#[serde(alias = "unseal_keys_b64")]
|
||||
pub keys_base64: Vec<String>,
|
||||
pub root_token: String,
|
||||
}
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ impl StepBody for InitOrUnsealOpenBao {
|
||||
ok("Initializing OpenBao...");
|
||||
match bao.init(1, 1).await {
|
||||
Ok(init) => {
|
||||
unseal_key = init.unseal_keys_b64[0].clone();
|
||||
unseal_key = init.keys_base64[0].clone();
|
||||
root_token = init.root_token.clone();
|
||||
let mut secret_data = HashMap::new();
|
||||
secret_data.insert("key".to_string(), unseal_key.clone());
|
||||
|
||||
Reference in New Issue
Block a user