@akdev1l/constructs 0.0.5 → 0.0.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-provider.d.ts","sourceRoot":"","sources":["../../../src/github/access-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,IAAI,GAAG,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,oBAAqB,SAAQ,SAAS;IACjD,OAAO,CAAC,MAAM,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"access-provider.d.ts","sourceRoot":"","sources":["../../../src/github/access-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,IAAI,GAAG,EACf,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qBAAa,oBAAqB,SAAQ,SAAS;IACjD,OAAO,CAAC,MAAM,CAAC,aAAa,CAAyC;IAErE,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC;gBAEZ,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB;CAyB3E"}
|
|
@@ -4,13 +4,13 @@ exports.GithubAccessProvider = void 0;
|
|
|
4
4
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
5
5
|
const constructs_1 = require("constructs");
|
|
6
6
|
class GithubAccessProvider extends constructs_1.Construct {
|
|
7
|
-
static GITHUB_DOMAIN = '
|
|
7
|
+
static GITHUB_DOMAIN = 'token.actions.githubusercontent.com';
|
|
8
8
|
provider;
|
|
9
9
|
role;
|
|
10
10
|
constructor(scope, id, props) {
|
|
11
11
|
super(scope, id);
|
|
12
12
|
this.provider = new aws_cdk_lib_1.aws_iam.OpenIdConnectProvider(this, 'GithubActionsProvider', {
|
|
13
|
-
url: GithubAccessProvider.GITHUB_DOMAIN
|
|
13
|
+
url: `https://${GithubAccessProvider.GITHUB_DOMAIN}`,
|
|
14
14
|
clientIds: ['sts.amazonaws.com'],
|
|
15
15
|
});
|
|
16
16
|
const conditions = {
|
|
@@ -18,7 +18,6 @@ class GithubAccessProvider extends constructs_1.Construct {
|
|
|
18
18
|
[`${GithubAccessProvider.GITHUB_DOMAIN}:sub`]: `repo:${props.repo}`,
|
|
19
19
|
},
|
|
20
20
|
StringEquals: {
|
|
21
|
-
'token.actions.githubusercontent.com:iss': 'https://token.actions.githubusercontent.com',
|
|
22
21
|
'token.actions.githubusercontent.com:aud': 'sts.amazonaws.com',
|
|
23
22
|
},
|
|
24
23
|
};
|
|
@@ -28,6 +27,7 @@ class GithubAccessProvider extends constructs_1.Construct {
|
|
|
28
27
|
description: `Access for deployment from repo ${props.repo}`,
|
|
29
28
|
maxSessionDuration: aws_cdk_lib_1.Duration.hours(2),
|
|
30
29
|
});
|
|
30
|
+
this.role.addManagedPolicy(aws_cdk_lib_1.aws_iam.ManagedPolicy.fromAwsManagedPolicyName('AdministratorAccess'));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.GithubAccessProvider = GithubAccessProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-provider.js","sourceRoot":"","sources":["../../../src/github/access-provider.ts"],"names":[],"mappings":";;;AAAA,6CAGqB;AACrB,2CAAuC;AAMvC,MAAa,oBAAqB,SAAQ,sBAAS;IACzC,MAAM,CAAC,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"access-provider.js","sourceRoot":"","sources":["../../../src/github/access-provider.ts"],"names":[],"mappings":";;;AAAA,6CAGqB;AAC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