@adobe/helix-deploy 6.1.0 → 6.2.0
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 +7 -0
- package/package.json +1 -1
- package/src/deploy/AWSConfig.js +13 -0
- package/src/deploy/AWSDeployer.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [6.2.0](https://github.com/adobe/helix-deploy/compare/v6.1.0...v6.2.0) (2022-01-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* allow to set authorizer identity sources ([#363](https://github.com/adobe/helix-deploy/issues/363)) ([b4b6e30](https://github.com/adobe/helix-deploy/commit/b4b6e30f5e35449c123fcfe38fde851223fd3d4f))
|
|
7
|
+
|
|
1
8
|
# [6.1.0](https://github.com/adobe/helix-deploy/compare/v6.0.1...v6.1.0) (2022-01-25)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/deploy/AWSConfig.js
CHANGED
|
@@ -26,6 +26,7 @@ export default class AWSConfig {
|
|
|
26
26
|
parameterMgr: ['system', 'secret'],
|
|
27
27
|
createAuthorizer: '',
|
|
28
28
|
attachAuthorizer: '',
|
|
29
|
+
identitySources: ['$request.header.Authorization'],
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -37,6 +38,7 @@ export default class AWSConfig {
|
|
|
37
38
|
.withAWSLambdaFormat(argv.awsLambdaFormat)
|
|
38
39
|
.withAWSCreateAuthorizer(argv.awsCreateAuthorizer)
|
|
39
40
|
.withAWSAttachAuthorizer(argv.awsAttachAuthorizer)
|
|
41
|
+
.withAWSIdentitySources(argv.awsIdentitySource)
|
|
40
42
|
.withAWSCleanUpBuckets(argv.awsCleanupBuckets)
|
|
41
43
|
.withAWSCleanUpIntegrations(argv.awsCleanupIntegrations)
|
|
42
44
|
.withAWSCreateRoutes(argv.awsCreateRoutes)
|
|
@@ -93,6 +95,11 @@ export default class AWSConfig {
|
|
|
93
95
|
return this;
|
|
94
96
|
}
|
|
95
97
|
|
|
98
|
+
withAWSIdentitySources(value) {
|
|
99
|
+
this.identitySources = value;
|
|
100
|
+
return this;
|
|
101
|
+
}
|
|
102
|
+
|
|
96
103
|
static yarg(yargs) {
|
|
97
104
|
return yargs
|
|
98
105
|
.group(['aws-region', 'aws-api', 'aws-role', 'aws-cleanup-buckets', 'aws-cleanup-integrations',
|
|
@@ -136,6 +143,12 @@ export default class AWSConfig {
|
|
|
136
143
|
+ 'Example: "helix-authorizer_${version}".',
|
|
137
144
|
type: 'string',
|
|
138
145
|
})
|
|
146
|
+
.option('aws-identity-source', {
|
|
147
|
+
description: 'Identity source to used when creating the authorizer',
|
|
148
|
+
type: 'string',
|
|
149
|
+
array: true,
|
|
150
|
+
default: ['$request.header.Authorization'],
|
|
151
|
+
})
|
|
139
152
|
.option('aws-attach-authorizer', {
|
|
140
153
|
description: 'Attach specified authorizer to routes during linking.',
|
|
141
154
|
type: 'string',
|
|
@@ -757,6 +757,7 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
757
757
|
ApiId,
|
|
758
758
|
AuthorizerId,
|
|
759
759
|
AuthorizerUri: `${AUTH_URI_PREFIX}${aliasArn}/invocations`,
|
|
760
|
+
IdentitySource: this._cfg.identitySources,
|
|
760
761
|
}));
|
|
761
762
|
this.log.info(chalk`{green ok}: updated authorizer: {blue ${res.Name}}`);
|
|
762
763
|
} else {
|
|
@@ -767,7 +768,7 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
767
768
|
AuthorizerUri: `${AUTH_URI_PREFIX}${aliasArn}/invocations`,
|
|
768
769
|
AuthorizerResultTtlInSeconds: 0,
|
|
769
770
|
EnableSimpleResponses: true,
|
|
770
|
-
IdentitySource:
|
|
771
|
+
IdentitySource: this._cfg.identitySources,
|
|
771
772
|
Name: authorizerName,
|
|
772
773
|
}));
|
|
773
774
|
AuthorizerId = res.AuthorizerId;
|