aws-cdk-github-oidc 2.4.1__tar.gz → 4.0.0__tar.gz
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.
- {aws-cdk-github-oidc-2.4.1/src/aws_cdk_github_oidc.egg-info → aws_cdk_github_oidc-4.0.0}/PKG-INFO +7 -4
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/pyproject.toml +2 -2
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/setup.py +7 -9
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/src/aws_cdk_github_oidc/__init__.py +77 -46
- aws_cdk_github_oidc-4.0.0/src/aws_cdk_github_oidc/_jsii/__init__.py +45 -0
- aws_cdk_github_oidc-4.0.0/src/aws_cdk_github_oidc/_jsii/aws-cdk-github-oidc@4.0.0.jsii.tgz +0 -0
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0/src/aws_cdk_github_oidc.egg-info}/PKG-INFO +7 -4
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/src/aws_cdk_github_oidc.egg-info/SOURCES.txt +1 -1
- aws_cdk_github_oidc-4.0.0/src/aws_cdk_github_oidc.egg-info/requires.txt +5 -0
- aws-cdk-github-oidc-2.4.1/src/aws_cdk_github_oidc/_jsii/__init__.py +0 -27
- aws-cdk-github-oidc-2.4.1/src/aws_cdk_github_oidc/_jsii/aws-cdk-github-oidc@2.4.1.jsii.tgz +0 -0
- aws-cdk-github-oidc-2.4.1/src/aws_cdk_github_oidc.egg-info/requires.txt +0 -5
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/LICENSE +0 -0
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/MANIFEST.in +0 -0
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/README.md +0 -0
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/setup.cfg +0 -0
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/src/aws_cdk_github_oidc/py.typed +0 -0
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/src/aws_cdk_github_oidc.egg-info/dependency_links.txt +0 -0
- {aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/src/aws_cdk_github_oidc.egg-info/top_level.txt +0 -0
{aws-cdk-github-oidc-2.4.1/src/aws_cdk_github_oidc.egg-info → aws_cdk_github_oidc-4.0.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aws-cdk-github-oidc
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: CDK constructs to use OpenID Connect for authenticating your Github Action workflow with AWS IAM
|
|
5
5
|
Home-page: https://github.com/aripalo/aws-cdk-github-oidc.git
|
|
6
6
|
Author: Ari Palo<opensource@aripalo.com>
|
|
@@ -10,17 +10,20 @@ Classifier: Intended Audience :: Developers
|
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Programming Language :: JavaScript
|
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
16
|
Classifier: Typing :: Typed
|
|
19
17
|
Classifier: Development Status :: 4 - Beta
|
|
20
18
|
Classifier: License :: OSI Approved
|
|
21
|
-
Requires-Python: ~=3.
|
|
19
|
+
Requires-Python: ~=3.9
|
|
22
20
|
Description-Content-Type: text/markdown
|
|
23
21
|
License-File: LICENSE
|
|
22
|
+
Requires-Dist: aws-cdk-lib<3.0.0,>=2.220.0
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.3.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.127.0
|
|
25
|
+
Requires-Dist: publication>=0.0.3
|
|
26
|
+
Requires-Dist: typeguard==2.13.3
|
|
24
27
|
|
|
25
28
|
# AWS CDK Github OpenID Connect
|
|
26
29
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools~=
|
|
2
|
+
requires = ["setuptools~=75.3.2", "build~=1.3.0"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[tool.pyright]
|
|
6
6
|
defineConstant = { DEBUG = true }
|
|
7
|
-
pythonVersion = "3.
|
|
7
|
+
pythonVersion = "3.9"
|
|
8
8
|
pythonPlatform = "All"
|
|
9
9
|
reportSelfClsParameterName = false
|
|
@@ -5,7 +5,7 @@ kwargs = json.loads(
|
|
|
5
5
|
"""
|
|
6
6
|
{
|
|
7
7
|
"name": "aws-cdk-github-oidc",
|
|
8
|
-
"version": "
|
|
8
|
+
"version": "4.0.0",
|
|
9
9
|
"description": "CDK constructs to use OpenID Connect for authenticating your Github Action workflow with AWS IAM",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"url": "https://github.com/aripalo/aws-cdk-github-oidc.git",
|
|
@@ -26,27 +26,25 @@ kwargs = json.loads(
|
|
|
26
26
|
],
|
|
27
27
|
"package_data": {
|
|
28
28
|
"aws_cdk_github_oidc._jsii": [
|
|
29
|
-
"aws-cdk-github-oidc@
|
|
29
|
+
"aws-cdk-github-oidc@4.0.0.jsii.tgz"
|
|
30
30
|
],
|
|
31
31
|
"aws_cdk_github_oidc": [
|
|
32
32
|
"py.typed"
|
|
33
33
|
]
|
|
34
34
|
},
|
|
35
|
-
"python_requires": "~=3.
|
|
35
|
+
"python_requires": "~=3.9",
|
|
36
36
|
"install_requires": [
|
|
37
|
-
"aws-cdk-lib>=2.
|
|
38
|
-
"constructs>=10.
|
|
39
|
-
"jsii>=1.
|
|
37
|
+
"aws-cdk-lib>=2.220.0, <3.0.0",
|
|
38
|
+
"constructs>=10.3.0, <11.0.0",
|
|
39
|
+
"jsii>=1.127.0, <2.0.0",
|
|
40
40
|
"publication>=0.0.3",
|
|
41
|
-
"typeguard
|
|
41
|
+
"typeguard==2.13.3"
|
|
42
42
|
],
|
|
43
43
|
"classifiers": [
|
|
44
44
|
"Intended Audience :: Developers",
|
|
45
45
|
"Operating System :: OS Independent",
|
|
46
46
|
"Programming Language :: JavaScript",
|
|
47
47
|
"Programming Language :: Python :: 3 :: Only",
|
|
48
|
-
"Programming Language :: Python :: 3.7",
|
|
49
|
-
"Programming Language :: Python :: 3.8",
|
|
50
48
|
"Programming Language :: Python :: 3.9",
|
|
51
49
|
"Programming Language :: Python :: 3.10",
|
|
52
50
|
"Programming Language :: Python :: 3.11",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'''
|
|
1
|
+
r'''
|
|
2
2
|
# AWS CDK Github OpenID Connect
|
|
3
3
|
|
|
4
4
|

|
|
@@ -146,6 +146,9 @@ jobs:
|
|
|
146
146
|
|
|
147
147
|
<br/>
|
|
148
148
|
'''
|
|
149
|
+
from pkgutil import extend_path
|
|
150
|
+
__path__ = extend_path(__path__, __name__)
|
|
151
|
+
|
|
149
152
|
import abc
|
|
150
153
|
import builtins
|
|
151
154
|
import datetime
|
|
@@ -156,7 +159,22 @@ import jsii
|
|
|
156
159
|
import publication
|
|
157
160
|
import typing_extensions
|
|
158
161
|
|
|
159
|
-
|
|
162
|
+
import typeguard
|
|
163
|
+
from importlib.metadata import version as _metadata_package_version
|
|
164
|
+
TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
|
|
165
|
+
|
|
166
|
+
def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
|
|
167
|
+
if TYPEGUARD_MAJOR_VERSION <= 2:
|
|
168
|
+
return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
|
|
169
|
+
else:
|
|
170
|
+
if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
|
|
171
|
+
pass
|
|
172
|
+
else:
|
|
173
|
+
if TYPEGUARD_MAJOR_VERSION == 3:
|
|
174
|
+
typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
|
|
175
|
+
typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
|
|
176
|
+
else:
|
|
177
|
+
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
|
|
160
178
|
|
|
161
179
|
from ._jsii import *
|
|
162
180
|
|
|
@@ -192,7 +210,7 @@ class GithubActionsRole(
|
|
|
192
210
|
|
|
193
211
|
def __init__(
|
|
194
212
|
self,
|
|
195
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
213
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
196
214
|
id: builtins.str,
|
|
197
215
|
*,
|
|
198
216
|
owner: builtins.str,
|
|
@@ -201,11 +219,11 @@ class GithubActionsRole(
|
|
|
201
219
|
filter: typing.Optional[builtins.str] = None,
|
|
202
220
|
description: typing.Optional[builtins.str] = None,
|
|
203
221
|
external_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
204
|
-
inline_policies: typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]] = None,
|
|
205
|
-
managed_policies: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]] = None,
|
|
206
|
-
max_session_duration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
222
|
+
inline_policies: typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]] = None,
|
|
223
|
+
managed_policies: typing.Optional[typing.Sequence["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]] = None,
|
|
224
|
+
max_session_duration: typing.Optional["_aws_cdk_ceddda9d.Duration"] = None,
|
|
207
225
|
path: typing.Optional[builtins.str] = None,
|
|
208
|
-
permissions_boundary: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy] = None,
|
|
226
|
+
permissions_boundary: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"] = None,
|
|
209
227
|
role_name: typing.Optional[builtins.str] = None,
|
|
210
228
|
) -> None:
|
|
211
229
|
'''(experimental) Define an IAM Role that can be assumed by Github Actions workflow via Github OpenID Connect Identity Provider.
|
|
@@ -385,7 +403,7 @@ class GithubConfiguration:
|
|
|
385
403
|
|
|
386
404
|
@jsii.interface(jsii_type="aws-cdk-github-oidc.IGithubActionsIdentityProvider")
|
|
387
405
|
class IGithubActionsIdentityProvider(
|
|
388
|
-
_aws_cdk_aws_iam_ceddda9d.
|
|
406
|
+
_aws_cdk_aws_iam_ceddda9d.IOidcProvider,
|
|
389
407
|
typing_extensions.Protocol,
|
|
390
408
|
):
|
|
391
409
|
'''(experimental) Describes a Github OpenID Connect Identity Provider for AWS IAM.
|
|
@@ -397,7 +415,7 @@ class IGithubActionsIdentityProvider(
|
|
|
397
415
|
|
|
398
416
|
|
|
399
417
|
class _IGithubActionsIdentityProviderProxy(
|
|
400
|
-
jsii.proxy_for(_aws_cdk_aws_iam_ceddda9d.
|
|
418
|
+
jsii.proxy_for(_aws_cdk_aws_iam_ceddda9d.IOidcProvider), # type: ignore[misc]
|
|
401
419
|
):
|
|
402
420
|
'''(experimental) Describes a Github OpenID Connect Identity Provider for AWS IAM.
|
|
403
421
|
|
|
@@ -431,19 +449,16 @@ class RoleProps:
|
|
|
431
449
|
*,
|
|
432
450
|
description: typing.Optional[builtins.str] = None,
|
|
433
451
|
external_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
434
|
-
inline_policies: typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]] = None,
|
|
435
|
-
managed_policies: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]] = None,
|
|
436
|
-
max_session_duration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
452
|
+
inline_policies: typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]] = None,
|
|
453
|
+
managed_policies: typing.Optional[typing.Sequence["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]] = None,
|
|
454
|
+
max_session_duration: typing.Optional["_aws_cdk_ceddda9d.Duration"] = None,
|
|
437
455
|
path: typing.Optional[builtins.str] = None,
|
|
438
|
-
permissions_boundary: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy] = None,
|
|
456
|
+
permissions_boundary: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"] = None,
|
|
439
457
|
role_name: typing.Optional[builtins.str] = None,
|
|
440
458
|
) -> None:
|
|
441
459
|
'''Properties for defining an IAM Role.
|
|
442
460
|
|
|
443
|
-
These are copied fron
|
|
444
|
-
TypeScript <Partial<iam.RoleProps>> (or Omit), we have to do this stupid thing.
|
|
445
|
-
|
|
446
|
-
Basically exactly the same as source, but with assumedBy removed.
|
|
461
|
+
These are copied fron
|
|
447
462
|
|
|
448
463
|
:param description: A description of the role. It can be up to 1000 characters long. Default: - No description.
|
|
449
464
|
:param external_ids: List of IDs that the role assumer needs to provide one of when assuming this role. If the configured and provided external IDs do not match, the AssumeRole operation will fail. Default: No external ID required
|
|
@@ -453,6 +468,13 @@ class RoleProps:
|
|
|
453
468
|
:param path: The path associated with this role. For information about IAM paths, see Friendly Names and Paths in IAM User Guide. Default: /
|
|
454
469
|
:param permissions_boundary: AWS supports permissions boundaries for IAM entities (users or roles). A permissions boundary is an advanced feature for using a managed policy to set the maximum permissions that an identity-based policy can grant to an IAM entity. An entity's permissions boundary allows it to perform only the actions that are allowed by both its identity-based policies and its permissions boundaries. Default: - No permissions boundary.
|
|
455
470
|
:param role_name: A name for the IAM role. For valid values, see the RoleName parameter for the CreateRole action in the IAM API Reference. IMPORTANT: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates. Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the role name.
|
|
471
|
+
|
|
472
|
+
:aws-cdk:
|
|
473
|
+
|
|
474
|
+
/aws-iam, but since JSII does not support
|
|
475
|
+
TypeScript <Partial<iam.RoleProps>> (or Omit), we have to do this stupid thing.
|
|
476
|
+
|
|
477
|
+
Basically exactly the same as source, but with assumedBy removed.
|
|
456
478
|
'''
|
|
457
479
|
if __debug__:
|
|
458
480
|
type_hints = typing.get_type_hints(_typecheckingstub__0cd6a3e7d7cf1f8d6e476e7c7fb421f2328a8b971f11011b0003bb9de6651e83)
|
|
@@ -508,7 +530,7 @@ class RoleProps:
|
|
|
508
530
|
@builtins.property
|
|
509
531
|
def inline_policies(
|
|
510
532
|
self,
|
|
511
|
-
) -> typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]]:
|
|
533
|
+
) -> typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]]:
|
|
512
534
|
'''A list of named policies to inline into this role.
|
|
513
535
|
|
|
514
536
|
These policies will be
|
|
@@ -519,12 +541,12 @@ class RoleProps:
|
|
|
519
541
|
:default: - No policy is inlined in the Role resource.
|
|
520
542
|
'''
|
|
521
543
|
result = self._values.get("inline_policies")
|
|
522
|
-
return typing.cast(typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]], result)
|
|
544
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]], result)
|
|
523
545
|
|
|
524
546
|
@builtins.property
|
|
525
547
|
def managed_policies(
|
|
526
548
|
self,
|
|
527
|
-
) -> typing.Optional[typing.List[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]]:
|
|
549
|
+
) -> typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]]:
|
|
528
550
|
'''A list of managed policies associated with this role.
|
|
529
551
|
|
|
530
552
|
You can add managed policies later using
|
|
@@ -533,10 +555,10 @@ class RoleProps:
|
|
|
533
555
|
:default: - No managed policies.
|
|
534
556
|
'''
|
|
535
557
|
result = self._values.get("managed_policies")
|
|
536
|
-
return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]], result)
|
|
558
|
+
return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]], result)
|
|
537
559
|
|
|
538
560
|
@builtins.property
|
|
539
|
-
def max_session_duration(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
|
|
561
|
+
def max_session_duration(self) -> typing.Optional["_aws_cdk_ceddda9d.Duration"]:
|
|
540
562
|
'''The maximum session duration that you want to set for the specified role.
|
|
541
563
|
|
|
542
564
|
This setting can have a value from 1 hour (3600sec) to 12 (43200sec) hours.
|
|
@@ -557,7 +579,7 @@ class RoleProps:
|
|
|
557
579
|
:link: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
|
558
580
|
'''
|
|
559
581
|
result = self._values.get("max_session_duration")
|
|
560
|
-
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
|
582
|
+
return typing.cast(typing.Optional["_aws_cdk_ceddda9d.Duration"], result)
|
|
561
583
|
|
|
562
584
|
@builtins.property
|
|
563
585
|
def path(self) -> typing.Optional[builtins.str]:
|
|
@@ -574,7 +596,7 @@ class RoleProps:
|
|
|
574
596
|
@builtins.property
|
|
575
597
|
def permissions_boundary(
|
|
576
598
|
self,
|
|
577
|
-
) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]:
|
|
599
|
+
) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]:
|
|
578
600
|
'''AWS supports permissions boundaries for IAM entities (users or roles).
|
|
579
601
|
|
|
580
602
|
A permissions boundary is an advanced feature for using a managed policy
|
|
@@ -588,7 +610,7 @@ class RoleProps:
|
|
|
588
610
|
:link: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html
|
|
589
611
|
'''
|
|
590
612
|
result = self._values.get("permissions_boundary")
|
|
591
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy], result)
|
|
613
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"], result)
|
|
592
614
|
|
|
593
615
|
@builtins.property
|
|
594
616
|
def role_name(self) -> typing.Optional[builtins.str]:
|
|
@@ -627,7 +649,7 @@ class RoleProps:
|
|
|
627
649
|
|
|
628
650
|
@jsii.implements(IGithubActionsIdentityProvider)
|
|
629
651
|
class GithubActionsIdentityProvider(
|
|
630
|
-
_aws_cdk_aws_iam_ceddda9d.
|
|
652
|
+
_aws_cdk_aws_iam_ceddda9d.OidcProviderNative,
|
|
631
653
|
metaclass=jsii.JSIIMeta,
|
|
632
654
|
jsii_type="aws-cdk-github-oidc.GithubActionsIdentityProvider",
|
|
633
655
|
):
|
|
@@ -635,12 +657,18 @@ class GithubActionsIdentityProvider(
|
|
|
635
657
|
|
|
636
658
|
Use ``fromAccount`` to retrieve a reference to existing Github OIDC provider.
|
|
637
659
|
|
|
660
|
+
Uses the native CloudFormation resource AWS::IAM::OIDCProvider (no Lambda functions).
|
|
661
|
+
|
|
638
662
|
:see: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services
|
|
639
663
|
:stability: experimental
|
|
640
664
|
'''
|
|
641
665
|
|
|
642
|
-
def __init__(
|
|
643
|
-
|
|
666
|
+
def __init__(
|
|
667
|
+
self,
|
|
668
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
669
|
+
id: builtins.str,
|
|
670
|
+
) -> None:
|
|
671
|
+
'''(experimental) Define a new Github OpenID Connect Identity Provider for AWS IAM.
|
|
644
672
|
|
|
645
673
|
There can be only one (per AWS Account).
|
|
646
674
|
|
|
@@ -663,9 +691,9 @@ class GithubActionsIdentityProvider(
|
|
|
663
691
|
@builtins.classmethod
|
|
664
692
|
def from_account(
|
|
665
693
|
cls,
|
|
666
|
-
scope: _constructs_77d1e7e8.Construct,
|
|
694
|
+
scope: "_constructs_77d1e7e8.Construct",
|
|
667
695
|
id: builtins.str,
|
|
668
|
-
) -> IGithubActionsIdentityProvider:
|
|
696
|
+
) -> "IGithubActionsIdentityProvider":
|
|
669
697
|
'''(experimental) Retrieve a reference to existing Github OIDC provider in your AWS account.
|
|
670
698
|
|
|
671
699
|
An AWS account can only have single Github OIDC provider configured into it,
|
|
@@ -687,7 +715,7 @@ class GithubActionsIdentityProvider(
|
|
|
687
715
|
type_hints = typing.get_type_hints(_typecheckingstub__6dd498a1f69430076a6a88f7090fd13f298542f0b556d9beb15d29ce4a23d9ce)
|
|
688
716
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
689
717
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
690
|
-
return typing.cast(IGithubActionsIdentityProvider, jsii.sinvoke(cls, "fromAccount", [scope, id]))
|
|
718
|
+
return typing.cast("IGithubActionsIdentityProvider", jsii.sinvoke(cls, "fromAccount", [scope, id]))
|
|
691
719
|
|
|
692
720
|
@jsii.python.classproperty
|
|
693
721
|
@jsii.member(jsii_name="issuer")
|
|
@@ -721,16 +749,16 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
721
749
|
self,
|
|
722
750
|
*,
|
|
723
751
|
owner: builtins.str,
|
|
724
|
-
provider: IGithubActionsIdentityProvider,
|
|
752
|
+
provider: "IGithubActionsIdentityProvider",
|
|
725
753
|
repo: builtins.str,
|
|
726
754
|
filter: typing.Optional[builtins.str] = None,
|
|
727
755
|
description: typing.Optional[builtins.str] = None,
|
|
728
756
|
external_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
729
|
-
inline_policies: typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]] = None,
|
|
730
|
-
managed_policies: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]] = None,
|
|
731
|
-
max_session_duration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
|
|
757
|
+
inline_policies: typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]] = None,
|
|
758
|
+
managed_policies: typing.Optional[typing.Sequence["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]] = None,
|
|
759
|
+
max_session_duration: typing.Optional["_aws_cdk_ceddda9d.Duration"] = None,
|
|
732
760
|
path: typing.Optional[builtins.str] = None,
|
|
733
|
-
permissions_boundary: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy] = None,
|
|
761
|
+
permissions_boundary: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"] = None,
|
|
734
762
|
role_name: typing.Optional[builtins.str] = None,
|
|
735
763
|
) -> None:
|
|
736
764
|
'''(experimental) Props that define the IAM Role that can be assumed by Github Actions workflow via Github OpenID Connect Identity Provider.
|
|
@@ -816,7 +844,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
816
844
|
return typing.cast(builtins.str, result)
|
|
817
845
|
|
|
818
846
|
@builtins.property
|
|
819
|
-
def provider(self) -> IGithubActionsIdentityProvider:
|
|
847
|
+
def provider(self) -> "IGithubActionsIdentityProvider":
|
|
820
848
|
'''(experimental) Reference to Github OpenID Connect Provider configured in AWS IAM.
|
|
821
849
|
|
|
822
850
|
Either pass an construct defined by ``new GithubActionsIdentityProvider``
|
|
@@ -827,7 +855,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
827
855
|
'''
|
|
828
856
|
result = self._values.get("provider")
|
|
829
857
|
assert result is not None, "Required property 'provider' is missing"
|
|
830
|
-
return typing.cast(IGithubActionsIdentityProvider, result)
|
|
858
|
+
return typing.cast("IGithubActionsIdentityProvider", result)
|
|
831
859
|
|
|
832
860
|
@builtins.property
|
|
833
861
|
def repo(self) -> builtins.str:
|
|
@@ -892,7 +920,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
892
920
|
@builtins.property
|
|
893
921
|
def inline_policies(
|
|
894
922
|
self,
|
|
895
|
-
) -> typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]]:
|
|
923
|
+
) -> typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]]:
|
|
896
924
|
'''A list of named policies to inline into this role.
|
|
897
925
|
|
|
898
926
|
These policies will be
|
|
@@ -903,12 +931,12 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
903
931
|
:default: - No policy is inlined in the Role resource.
|
|
904
932
|
'''
|
|
905
933
|
result = self._values.get("inline_policies")
|
|
906
|
-
return typing.cast(typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]], result)
|
|
934
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]], result)
|
|
907
935
|
|
|
908
936
|
@builtins.property
|
|
909
937
|
def managed_policies(
|
|
910
938
|
self,
|
|
911
|
-
) -> typing.Optional[typing.List[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]]:
|
|
939
|
+
) -> typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]]:
|
|
912
940
|
'''A list of managed policies associated with this role.
|
|
913
941
|
|
|
914
942
|
You can add managed policies later using
|
|
@@ -917,10 +945,10 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
917
945
|
:default: - No managed policies.
|
|
918
946
|
'''
|
|
919
947
|
result = self._values.get("managed_policies")
|
|
920
|
-
return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]], result)
|
|
948
|
+
return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]], result)
|
|
921
949
|
|
|
922
950
|
@builtins.property
|
|
923
|
-
def max_session_duration(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
|
|
951
|
+
def max_session_duration(self) -> typing.Optional["_aws_cdk_ceddda9d.Duration"]:
|
|
924
952
|
'''The maximum session duration that you want to set for the specified role.
|
|
925
953
|
|
|
926
954
|
This setting can have a value from 1 hour (3600sec) to 12 (43200sec) hours.
|
|
@@ -941,7 +969,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
941
969
|
:link: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
|
|
942
970
|
'''
|
|
943
971
|
result = self._values.get("max_session_duration")
|
|
944
|
-
return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
|
|
972
|
+
return typing.cast(typing.Optional["_aws_cdk_ceddda9d.Duration"], result)
|
|
945
973
|
|
|
946
974
|
@builtins.property
|
|
947
975
|
def path(self) -> typing.Optional[builtins.str]:
|
|
@@ -958,7 +986,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
958
986
|
@builtins.property
|
|
959
987
|
def permissions_boundary(
|
|
960
988
|
self,
|
|
961
|
-
) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]:
|
|
989
|
+
) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]:
|
|
962
990
|
'''AWS supports permissions boundaries for IAM entities (users or roles).
|
|
963
991
|
|
|
964
992
|
A permissions boundary is an advanced feature for using a managed policy
|
|
@@ -972,7 +1000,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
|
|
|
972
1000
|
:link: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html
|
|
973
1001
|
'''
|
|
974
1002
|
result = self._values.get("permissions_boundary")
|
|
975
|
-
return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy], result)
|
|
1003
|
+
return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"], result)
|
|
976
1004
|
|
|
977
1005
|
@builtins.property
|
|
978
1006
|
def role_name(self) -> typing.Optional[builtins.str]:
|
|
@@ -1095,3 +1123,6 @@ def _typecheckingstub__a5294e97cf23a4f3be3a6e45b1c5188fe6f334ee6f6a820488832aecb
|
|
|
1095
1123
|
) -> None:
|
|
1096
1124
|
"""Type checking stubs"""
|
|
1097
1125
|
pass
|
|
1126
|
+
|
|
1127
|
+
for cls in [IGithubActionsIdentityProvider]:
|
|
1128
|
+
typing.cast(typing.Any, cls).__protocol_attrs__ = typing.cast(typing.Any, cls).__protocol_attrs__ - set(['__jsii_proxy_class__', '__jsii_type__'])
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
from pkgutil import extend_path
|
|
2
|
+
__path__ = extend_path(__path__, __name__)
|
|
3
|
+
|
|
4
|
+
import abc
|
|
5
|
+
import builtins
|
|
6
|
+
import datetime
|
|
7
|
+
import enum
|
|
8
|
+
import typing
|
|
9
|
+
|
|
10
|
+
import jsii
|
|
11
|
+
import publication
|
|
12
|
+
import typing_extensions
|
|
13
|
+
|
|
14
|
+
import typeguard
|
|
15
|
+
from importlib.metadata import version as _metadata_package_version
|
|
16
|
+
TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
|
|
17
|
+
|
|
18
|
+
def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
|
|
19
|
+
if TYPEGUARD_MAJOR_VERSION <= 2:
|
|
20
|
+
return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
|
|
21
|
+
else:
|
|
22
|
+
if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
|
|
23
|
+
pass
|
|
24
|
+
else:
|
|
25
|
+
if TYPEGUARD_MAJOR_VERSION == 3:
|
|
26
|
+
typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
|
|
27
|
+
typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
|
|
28
|
+
else:
|
|
29
|
+
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
|
|
30
|
+
|
|
31
|
+
import aws_cdk._jsii
|
|
32
|
+
import constructs._jsii
|
|
33
|
+
|
|
34
|
+
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
35
|
+
"aws-cdk-github-oidc",
|
|
36
|
+
"4.0.0",
|
|
37
|
+
__name__[0:-6],
|
|
38
|
+
"aws-cdk-github-oidc@4.0.0.jsii.tgz",
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
__all__ = [
|
|
42
|
+
"__jsii_assembly__",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
publication.publish()
|
|
Binary file
|
{aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0/src/aws_cdk_github_oidc.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aws-cdk-github-oidc
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: CDK constructs to use OpenID Connect for authenticating your Github Action workflow with AWS IAM
|
|
5
5
|
Home-page: https://github.com/aripalo/aws-cdk-github-oidc.git
|
|
6
6
|
Author: Ari Palo<opensource@aripalo.com>
|
|
@@ -10,17 +10,20 @@ Classifier: Intended Audience :: Developers
|
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
11
|
Classifier: Programming Language :: JavaScript
|
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
16
|
Classifier: Typing :: Typed
|
|
19
17
|
Classifier: Development Status :: 4 - Beta
|
|
20
18
|
Classifier: License :: OSI Approved
|
|
21
|
-
Requires-Python: ~=3.
|
|
19
|
+
Requires-Python: ~=3.9
|
|
22
20
|
Description-Content-Type: text/markdown
|
|
23
21
|
License-File: LICENSE
|
|
22
|
+
Requires-Dist: aws-cdk-lib<3.0.0,>=2.220.0
|
|
23
|
+
Requires-Dist: constructs<11.0.0,>=10.3.0
|
|
24
|
+
Requires-Dist: jsii<2.0.0,>=1.127.0
|
|
25
|
+
Requires-Dist: publication>=0.0.3
|
|
26
|
+
Requires-Dist: typeguard==2.13.3
|
|
24
27
|
|
|
25
28
|
# AWS CDK Github OpenID Connect
|
|
26
29
|
|
{aws-cdk-github-oidc-2.4.1 → aws_cdk_github_oidc-4.0.0}/src/aws_cdk_github_oidc.egg-info/SOURCES.txt
RENAMED
|
@@ -11,4 +11,4 @@ src/aws_cdk_github_oidc.egg-info/dependency_links.txt
|
|
|
11
11
|
src/aws_cdk_github_oidc.egg-info/requires.txt
|
|
12
12
|
src/aws_cdk_github_oidc.egg-info/top_level.txt
|
|
13
13
|
src/aws_cdk_github_oidc/_jsii/__init__.py
|
|
14
|
-
src/aws_cdk_github_oidc/_jsii/aws-cdk-github-oidc@
|
|
14
|
+
src/aws_cdk_github_oidc/_jsii/aws-cdk-github-oidc@4.0.0.jsii.tgz
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import abc
|
|
2
|
-
import builtins
|
|
3
|
-
import datetime
|
|
4
|
-
import enum
|
|
5
|
-
import typing
|
|
6
|
-
|
|
7
|
-
import jsii
|
|
8
|
-
import publication
|
|
9
|
-
import typing_extensions
|
|
10
|
-
|
|
11
|
-
from typeguard import check_type
|
|
12
|
-
|
|
13
|
-
import aws_cdk._jsii
|
|
14
|
-
import constructs._jsii
|
|
15
|
-
|
|
16
|
-
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
17
|
-
"aws-cdk-github-oidc",
|
|
18
|
-
"2.4.1",
|
|
19
|
-
__name__[0:-6],
|
|
20
|
-
"aws-cdk-github-oidc@2.4.1.jsii.tgz",
|
|
21
|
-
)
|
|
22
|
-
|
|
23
|
-
__all__ = [
|
|
24
|
-
"__jsii_assembly__",
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
publication.publish()
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|