@itentialopensource/adapter-utils
Advanced tools
Comparing version 5.7.1 to 5.7.2
## 5.7.2 [09-06-2024] | ||
* Update lock file | ||
See merge request itentialopensource/adapter-utils!301 | ||
--- | ||
## 5.7.1 [09-06-2024] | ||
@@ -3,0 +11,0 @@ |
@@ -120,4 +120,4 @@ /* @copyright Itential, LLC 2023 */ | ||
// set the original AWS access information (from properties) | ||
AWS.config.update({ | ||
// set up the config object | ||
const configObj = { | ||
sessionToken: this.allProps.authentication.aws_session_token, | ||
@@ -127,4 +127,24 @@ accessKeyId: this.allProps.authentication.aws_access_key, | ||
region: this.allProps.region | ||
}); | ||
}; | ||
// Add optional config items (ssl, endpoint, proxy) | ||
if (this.allProps.authentication.aws_sts) { | ||
if (this.allProps.authentication.aws_sts.sslEnable === false) { | ||
configObj.sslEnabled = false; | ||
} | ||
if (this.allProps.authentication.aws_sts.endpoint) { | ||
configObj.endpoint = this.allProps.authentication.aws_sts.endpoint; | ||
} | ||
if (this.allProps.authentication.aws_sts.proxy) { | ||
configObj.httpOptions = { | ||
proxy: this.allProps.authentication.aws_sts.proxy | ||
}; | ||
if (this.allProps.authentication.aws_sts.proxyagent) { | ||
configObj.httpOptions.agent = this.allProps.authentication.aws_sts.proxyagent; | ||
} | ||
} | ||
} | ||
// set the original AWS access information (from properties) | ||
AWS.config.update(configObj); | ||
// use STS to get the AWS access information for the user defined in STWS Params | ||
@@ -143,2 +163,7 @@ const sts = new AWS.STS(); | ||
} | ||
if (!data || !data.Credentials || !data.Credentials.AccessKeyId || !data.Credentials.SecretAccessKey) { | ||
const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, 'AWS Assume Role did not return credentials', null, null, null, null); | ||
log.error(`${origin}: ${errorObj.IAPerror.displayString}`); | ||
return callback(null, errorObj); | ||
} | ||
// extract the user specific info from the response | ||
@@ -198,2 +223,7 @@ const accessKeyId = data.Credentials.AccessKeyId; | ||
} | ||
if (!data || !data.Credentials || !data.Credentials.AccessKeyId || !data.Credentials.SecretAccessKey) { | ||
const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, 'AWS Assume Role did not return credentials', null, null, null, null); | ||
log.error(`${origin}: ${errorObj.IAPerror.displayString}`); | ||
return callback(null, errorObj); | ||
} | ||
@@ -200,0 +230,0 @@ // get role keys from response so we can sign the request |
{ | ||
"name": "@itentialopensource/adapter-utils", | ||
"version": "5.7.1", | ||
"version": "5.7.2", | ||
"description": "Itential Adapter Utility Libraries", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
824188
16580