@itentialopensource/adapter-utils 5.1.2 → 5.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
|
|
2
|
+
## 5.1.4 [08-28-2023]
|
|
3
|
+
|
|
4
|
+
* Switching order of params on aws auth
|
|
5
|
+
|
|
6
|
+
See merge request itentialopensource/adapter-utils!271
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 5.1.3 [08-28-2023]
|
|
11
|
+
|
|
12
|
+
* aws auth changes - for all aws auth
|
|
13
|
+
|
|
14
|
+
See merge request itentialopensource/adapter-utils!270
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
2
18
|
## 5.1.2 [08-28-2023]
|
|
3
19
|
|
|
4
20
|
* Resolve ADAPT-2852 - Broker authentication
|
|
@@ -53,7 +53,10 @@ class AuthenticationHandler {
|
|
|
53
53
|
* @param {string} method - the method for the action we are setting authorization for
|
|
54
54
|
* @param {object} requestObj - an object that contains all of the possible parts of the request (payload, uriPathVars,
|
|
55
55
|
* uriQuery, uriOptions and addlHeaders (optional). Can be a stringified Object.
|
|
56
|
-
* @param {string}
|
|
56
|
+
* @param {string} uriPath - the path for the call. (required)
|
|
57
|
+
* @param {string} service - the AWS service we are talking to
|
|
58
|
+
* @param {object} [stsParams] - STS Parameters to use for authentication.
|
|
59
|
+
* @param {string} [roleName] - RoleName to authenticate against
|
|
57
60
|
*
|
|
58
61
|
* @return {Object} the headers to add to the request
|
|
59
62
|
*/
|
package/lib/genericHandler.js
CHANGED
|
@@ -147,7 +147,7 @@ class GenericHandler {
|
|
|
147
147
|
// identifyRequest(entity, action, requestObj, returnDataFlag, callback)
|
|
148
148
|
// See if AWS call requiring authentication
|
|
149
149
|
if (metadata && metadata.service) {
|
|
150
|
-
return this.requestHandlerInst.getAWSAuthorization(restMethod, reqObj, uriPath, metadata.service, (signature, authError) => {
|
|
150
|
+
return this.requestHandlerInst.getAWSAuthorization(restMethod, reqObj, uriPath, metadata.service, null, null, (signature, authError) => {
|
|
151
151
|
if (authError) {
|
|
152
152
|
return callback(null, authError);
|
|
153
153
|
}
|
package/lib/requestHandler.js
CHANGED
|
@@ -1912,16 +1912,21 @@ class RequestHandler {
|
|
|
1912
1912
|
*
|
|
1913
1913
|
* @function getAWSAuthorization
|
|
1914
1914
|
* @param {string} method - the method for the action we are setting authorization for
|
|
1915
|
-
* @param {
|
|
1915
|
+
* @param {object} requestObj - an object that contains all of the possible parts of the request (payload, uriPathVars,
|
|
1916
|
+
* uriQuery, uriOptions and addlHeaders (optional). Can be a stringified Object.
|
|
1917
|
+
* @param {string} uriPath - the path for the call. (required)
|
|
1918
|
+
* @param {string} service - the AWS service we are talking to
|
|
1919
|
+
* @param {object} [stsParams] - STS Parameters to use for authentication.
|
|
1920
|
+
* @param {string} [roleName] - RoleName to authenticate against
|
|
1916
1921
|
*
|
|
1917
1922
|
* @return {Object} the headers to add to the request
|
|
1918
1923
|
*/
|
|
1919
|
-
getAWSAuthorization(method, requestObj, uriPath, service, callback) {
|
|
1924
|
+
getAWSAuthorization(method, requestObj, uriPath, service, STSParams, roleName, callback) {
|
|
1920
1925
|
const origin = `${this.myid}-requestHandler-getAWSAuthentication`;
|
|
1921
1926
|
log.trace(origin);
|
|
1922
1927
|
|
|
1923
1928
|
try {
|
|
1924
|
-
return this.authHandler.getAWSAuthorization(method, requestObj, uriPath,
|
|
1929
|
+
return this.authHandler.getAWSAuthorization(method, requestObj, uriPath, service, null, null, callback);
|
|
1925
1930
|
} catch (e) {
|
|
1926
1931
|
// handle any exception
|
|
1927
1932
|
const errorObj = this.transUtil.checkAndReturn(e, origin, 'AWS Authentication Request Failed');
|
|
@@ -1929,4 +1934,5 @@ class RequestHandler {
|
|
|
1929
1934
|
}
|
|
1930
1935
|
}
|
|
1931
1936
|
}
|
|
1937
|
+
|
|
1932
1938
|
module.exports = RequestHandler;
|
package/package.json
CHANGED
|
Binary file
|