Co-authored-by: heihutu <[email protected]> Co-authored-by: houseme <[email protected]> Co-authored-by: loverustfs <[email protected]>
This commit is contained in:
co-authored by
heihutu
houseme
loverustfs
parent
e5284a85ed
commit
65de487eba
@@ -130,8 +130,14 @@ impl ObjectStore {
|
||||
}
|
||||
|
||||
fn decrypt_data(data: &[u8]) -> Result<Vec<u8>> {
|
||||
let de = rustfs_crypto::decrypt_data(get_global_action_cred().unwrap_or_default().secret_key.as_bytes(), data)?;
|
||||
Ok(de)
|
||||
let cred = get_global_action_cred().unwrap_or_default();
|
||||
match rustfs_crypto::decrypt_data(cred.secret_key.as_bytes(), data) {
|
||||
Ok(decrypted) => Ok(decrypted),
|
||||
Err(_) => {
|
||||
warn!("Failed to decrypt IAM config data, treating as unencrypted");
|
||||
Ok(data.to_vec())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn encrypt_data(data: &[u8]) -> Result<Vec<u8>> {
|
||||
|
||||
Reference in New Issue
Block a user