mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: update github.com/libopenstorage/secrets to latest
With this update, we no longer import github.com/hashicorp/vault which now is under BSL license. https://github.com/hashicorp/vault/blob/main/LICENSE resolves: #4196 Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -396,7 +396,8 @@ func initVaultKMS(args ProviderInitArgs) (EncryptionKMS, error) {
|
||||
// FetchDEK returns passphrase from Vault. The passphrase is stored in a
|
||||
// data.data.passphrase structure.
|
||||
func (kms *vaultKMS) FetchDEK(key string) (string, error) {
|
||||
s, err := kms.secrets.GetSecret(filepath.Join(kms.vaultPassphrasePath, key), kms.keyContext)
|
||||
// Since the second return variable loss.Version is not used, there it is ignored.
|
||||
s, _, err := kms.secrets.GetSecret(filepath.Join(kms.vaultPassphrasePath, key), kms.keyContext)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@ -422,7 +423,8 @@ func (kms *vaultKMS) StoreDEK(key, value string) error {
|
||||
}
|
||||
|
||||
pathKey := filepath.Join(kms.vaultPassphrasePath, key)
|
||||
err := kms.secrets.PutSecret(pathKey, data, kms.keyContext)
|
||||
// Since the first return variable loss.Version is not used, there it is ignored.
|
||||
_, err := kms.secrets.PutSecret(pathKey, data, kms.keyContext)
|
||||
if err != nil {
|
||||
return fmt.Errorf("saving passphrase at %s request to vault failed: %w", pathKey, err)
|
||||
}
|
||||
|
@ -460,7 +460,8 @@ func (vtc *vaultTenantConnection) getK8sClient() (*kubernetes.Clientset, error)
|
||||
// FetchDEK returns passphrase from Vault. The passphrase is stored in a
|
||||
// data.data.passphrase structure.
|
||||
func (vtc *vaultTenantConnection) FetchDEK(key string) (string, error) {
|
||||
s, err := vtc.secrets.GetSecret(key, vtc.keyContext)
|
||||
// Since the second return variable loss.Version is not used, there it is ignored.
|
||||
s, _, err := vtc.secrets.GetSecret(key, vtc.keyContext)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
@ -485,7 +486,8 @@ func (vtc *vaultTenantConnection) StoreDEK(key, value string) error {
|
||||
},
|
||||
}
|
||||
|
||||
err := vtc.secrets.PutSecret(key, data, vtc.keyContext)
|
||||
// Since the first return variable loss.Version is not used, there it is ignored.
|
||||
_, err := vtc.secrets.PutSecret(key, data, vtc.keyContext)
|
||||
if err != nil {
|
||||
return fmt.Errorf("saving passphrase at %s request to vault failed: %w", key, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user