Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
fix(IBM): correctly extract secret data for IBM IAM credentials type …
Browse files Browse the repository at this point in the history
…secrets (#792)

* fix bug for getting apikey of IBM IAM credentials type

* chore: fix lint issues

Co-authored-by: Markus Maga <[email protected]>
  • Loading branch information
mailtokun and Flydiverny authored Jul 12, 2021
1 parent dc0a96a commit 2f16714
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/backends/ibmcloud-secrets-manager-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ class IbmCloudSecretsManagerBackend extends KVBackend {
secretType: secretType,
id: key
})
return JSON.stringify(secret.result.resources[0].secret_data)
if (secretType === 'iam_credentials') {
return JSON.stringify(secret.result.resources[0].api_key)
} else {
return JSON.stringify(secret.result.resources[0].secret_data)
}
}
}

Expand Down

0 comments on commit 2f16714

Please sign in to comment.