Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/IAMClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ declare class VaultClient {
* @param {string} [options.securityToken] - Token for temporary credentials
* authorization against IAM policies. This is a stringified version of a
* RequestContext class. See Arsenal for class details.
* @param {string} [options.targetAccount] - canonical id of the account
* that owns the resource being targeted by
* the request (e.g. the bucket owner)
* @param {VaultClient~requestCallback} callback - callback
* @returns {undefined}
*/
Expand All @@ -266,6 +269,7 @@ declare class VaultClient {
reqUid?: string;
requestContext?: string;
securityToken?: string;
targetAccount?: string;
}, callback: any): undefined;
/**
* Verify AWS request signature using V4 auth (contrary to v2, hash is
Expand All @@ -285,6 +289,9 @@ declare class VaultClient {
* @param {string} [options.securityToken] - Token for temporary credentials
* authorization against IAM policies. This is a stringified version of a
* RequestContext class. See Arsenal for class details.
* @param {string} [options.targetAccount] - canonical id of the account
* that owns the resource being targeted by
* the request (e.g. the bucket owner)
* @param {VaultClient~requestCallback} callback - callback
* @returns {undefined}
*/
Expand All @@ -293,6 +300,7 @@ declare class VaultClient {
get?: string;
requestContext?: string;
securityToken?: string;
targetAccount?: string;
}, callback: any): undefined;
/**
* A getter for Account email addresses provided a dictionary of canonical
Expand Down
2 changes: 1 addition & 1 deletion lib/IAMClient.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions lib/IAMClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,9 @@ class VaultClient {
* @param {string} [options.securityToken] - Token for temporary credentials
* authorization against IAM policies. This is a stringified version of a
* RequestContext class. See Arsenal for class details.
* @param {string} [options.targetAccount] - canonical id of the account
* that owns the resource being targeted by
* the request (e.g. the bucket owner)
* @param {VaultClient~requestCallback} callback - callback
* @returns {undefined}
*/
Expand Down Expand Up @@ -822,6 +825,9 @@ class VaultClient {
if (options.securityToken) {
data.securityToken = options.securityToken;
}
if (options.targetAccount) {
data.targetAccount = options.targetAccount;
}
this.request('GET', '/', false, (err, data, code) => {
if (err) {
return callback(err);
Expand Down Expand Up @@ -854,6 +860,9 @@ class VaultClient {
* @param {string} [options.securityToken] - Token for temporary credentials
* authorization against IAM policies. This is a stringified version of a
* RequestContext class. See Arsenal for class details.
* @param {string} [options.targetAccount] - canonical id of the account
* that owns the resource being targeted by
* the request (e.g. the bucket owner)
* @param {VaultClient~requestCallback} callback - callback
* @returns {undefined}
*/
Expand Down Expand Up @@ -896,6 +905,9 @@ class VaultClient {
httpVerb = 'POST';
}
}
if (options.targetAccount) {
data.targetAccount = options.targetAccount;
}
this.request(httpVerb, '/', false, (err, data, code) => {
if (err) {
return callback(err);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engines": {
"node": ">=20"
},
"version": "8.5.6",
"version": "8.5.7",
"description": "Client library and binary for Vault, the user directory and key management service",
"main": "index.js",
"repository": "scality/vaultclient",
Expand Down
Loading