Skip to content

Commit

Permalink
Merge pull request #30 from antonku/chore/upgrade-aws-sdk
Browse files Browse the repository at this point in the history
chore: aws-sdk v2 -> v3 migration
  • Loading branch information
blackrabbit99 authored Aug 3, 2023
2 parents 792980d + 80ed7f2 commit 6f11df8
Show file tree
Hide file tree
Showing 6 changed files with 3,303 additions and 181 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: node_js
node_js:
- 8
- 12
- 14
- 16
env:
- VAULT_VERSION=0.7.2
- VAULT_VERSION=0.8.2
Expand All @@ -16,4 +16,4 @@ install:
- npm install
- npm install config
script:
- npm test
- npm test
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 1.0.0. Release notes (2023-08-02)

- `aws-sdk` is no longer a peer dependency
- [BREAKING] From now on the minimum supported version of Node.js is 14.0.0.
- [BREAKING] Changes in IAM configuration. If you explicitly passed aws-sdk@2 credentials to `VaultClient.boot` like below:
```js
const vaultClient = VaultClient.boot('main', {
api: {url: 'https://vault.example.com:8200/'},
auth: {
type: 'iam',
mount: 'example',
config: {
iam_server_id_header_value: 'example',
role: 'example',
credentials: AWS.CredentialProviderChain.defaultProviders // <-- this line
}
},
});
```
This will no longer work. You need to either:
- Do not pass the credentials at all and rely on the credentials auto-discovery
```js
const vaultClient = VaultClient.boot('main', {
api: {url: 'https://vault.example.com:8200/'},
auth: {
type: 'iam',
mount: 'example',
config: {
iam_server_id_header_value: 'example',
role: 'example',
}
},
});
```
[OR]
- Pass the credentials explicitly in the following format
```js
const vaultClient = VaultClient.boot('main', {
api: {url: 'https://vault.example.com:8200/'},
auth: {
type: 'iam',
mount: 'example',
config: {
iam_server_id_header_value: 'example',
role: 'example',
credentials: {
accessKeyId: 'AWS_ACCESS_KEY',
secretAccessKey: 'AWS_SECRET_KEY',
}
}
},
});
```
Loading

0 comments on commit 6f11df8

Please sign in to comment.