aws-cdk-github-oidc 2.4.0__tar.gz → 3.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.
Files changed (19) hide show
  1. {aws-cdk-github-oidc-2.4.0/src/aws_cdk_github_oidc.egg-info → aws_cdk_github_oidc-3.0.0}/PKG-INFO +7 -12
  2. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/README.md +0 -8
  3. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/pyproject.toml +2 -2
  4. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/setup.py +7 -9
  5. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/src/aws_cdk_github_oidc/__init__.py +71 -50
  6. aws_cdk_github_oidc-3.0.0/src/aws_cdk_github_oidc/_jsii/__init__.py +45 -0
  7. aws_cdk_github_oidc-3.0.0/src/aws_cdk_github_oidc/_jsii/aws-cdk-github-oidc@3.0.0.jsii.tgz +0 -0
  8. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0/src/aws_cdk_github_oidc.egg-info}/PKG-INFO +7 -12
  9. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/src/aws_cdk_github_oidc.egg-info/SOURCES.txt +1 -1
  10. aws_cdk_github_oidc-3.0.0/src/aws_cdk_github_oidc.egg-info/requires.txt +5 -0
  11. aws-cdk-github-oidc-2.4.0/src/aws_cdk_github_oidc/_jsii/__init__.py +0 -27
  12. aws-cdk-github-oidc-2.4.0/src/aws_cdk_github_oidc/_jsii/aws-cdk-github-oidc@2.4.0.jsii.tgz +0 -0
  13. aws-cdk-github-oidc-2.4.0/src/aws_cdk_github_oidc.egg-info/requires.txt +0 -5
  14. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/LICENSE +0 -0
  15. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/MANIFEST.in +0 -0
  16. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/setup.cfg +0 -0
  17. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/src/aws_cdk_github_oidc/py.typed +0 -0
  18. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/src/aws_cdk_github_oidc.egg-info/dependency_links.txt +0 -0
  19. {aws-cdk-github-oidc-2.4.0 → aws_cdk_github_oidc-3.0.0}/src/aws_cdk_github_oidc.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-cdk-github-oidc
3
- Version: 2.4.0
3
+ Version: 3.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.7
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
 
@@ -168,11 +171,3 @@ jobs:
168
171
  ```
169
172
 
170
173
  <br/>
171
-
172
- ### Development Status
173
-
174
- These constructs are fresh out from the oven, since [Github just announced](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/) the OpenID Connect feature as generally available. I've been playing around with the feature for some time, but the construct itself haven't yet been widely used.
175
-
176
- These constructs will stay in `v0.x.x` for a while, to allow easier bug fixing & breaking changes *if absolutely needed*. Once bugs are fixed (if any), the constructs will be published with `v1` major version and will be marked as stable.
177
-
178
- Currently only TypeScript, Python and Go versions provided, but before going to stable, I'll probably others (supported by JSII) depending on the amount of work required - so no promises!
@@ -144,11 +144,3 @@ jobs:
144
144
  ```
145
145
 
146
146
  <br/>
147
-
148
- ### Development Status
149
-
150
- These constructs are fresh out from the oven, since [Github just announced](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/) the OpenID Connect feature as generally available. I've been playing around with the feature for some time, but the construct itself haven't yet been widely used.
151
-
152
- These constructs will stay in `v0.x.x` for a while, to allow easier bug fixing & breaking changes *if absolutely needed*. Once bugs are fixed (if any), the constructs will be published with `v1` major version and will be marked as stable.
153
-
154
- Currently only TypeScript, Python and Go versions provided, but before going to stable, I'll probably others (supported by JSII) depending on the amount of work required - so no promises!
@@ -1,9 +1,9 @@
1
1
  [build-system]
2
- requires = ["setuptools~=67.3.2", "wheel~=0.40"]
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"
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": "2.4.0",
8
+ "version": "3.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@2.4.0.jsii.tgz"
29
+ "aws-cdk-github-oidc@3.0.0.jsii.tgz"
30
30
  ],
31
31
  "aws_cdk_github_oidc": [
32
32
  "py.typed"
33
33
  ]
34
34
  },
35
- "python_requires": "~=3.7",
35
+ "python_requires": "~=3.9",
36
36
  "install_requires": [
37
- "aws-cdk-lib>=2.89.0, <3.0.0",
38
- "constructs>=10.0.0, <11.0.0",
39
- "jsii>=1.86.1, <2.0.0",
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~=2.13.3"
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
  ![cdk-support](https://img.shields.io/badge/cdk-%20typescript%20%7C%20python%20-informational)
@@ -145,15 +145,10 @@ jobs:
145
145
  ```
146
146
 
147
147
  <br/>
148
-
149
- ### Development Status
150
-
151
- These constructs are fresh out from the oven, since [Github just announced](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/) the OpenID Connect feature as generally available. I've been playing around with the feature for some time, but the construct itself haven't yet been widely used.
152
-
153
- These constructs will stay in `v0.x.x` for a while, to allow easier bug fixing & breaking changes *if absolutely needed*. Once bugs are fixed (if any), the constructs will be published with `v1` major version and will be marked as stable.
154
-
155
- Currently only TypeScript, Python and Go versions provided, but before going to stable, I'll probably others (supported by JSII) depending on the amount of work required - so no promises!
156
148
  '''
149
+ from pkgutil import extend_path
150
+ __path__ = extend_path(__path__, __name__)
151
+
157
152
  import abc
158
153
  import builtins
159
154
  import datetime
@@ -164,7 +159,22 @@ import jsii
164
159
  import publication
165
160
  import typing_extensions
166
161
 
167
- from typeguard import check_type
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
168
178
 
169
179
  from ._jsii import *
170
180
 
@@ -200,7 +210,7 @@ class GithubActionsRole(
200
210
 
201
211
  def __init__(
202
212
  self,
203
- scope: _constructs_77d1e7e8.Construct,
213
+ scope: "_constructs_77d1e7e8.Construct",
204
214
  id: builtins.str,
205
215
  *,
206
216
  owner: builtins.str,
@@ -209,11 +219,11 @@ class GithubActionsRole(
209
219
  filter: typing.Optional[builtins.str] = None,
210
220
  description: typing.Optional[builtins.str] = None,
211
221
  external_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
212
- inline_policies: typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]] = None,
213
- managed_policies: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]] = None,
214
- 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,
215
225
  path: typing.Optional[builtins.str] = None,
216
- permissions_boundary: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy] = None,
226
+ permissions_boundary: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"] = None,
217
227
  role_name: typing.Optional[builtins.str] = None,
218
228
  ) -> None:
219
229
  '''(experimental) Define an IAM Role that can be assumed by Github Actions workflow via Github OpenID Connect Identity Provider.
@@ -439,19 +449,16 @@ class RoleProps:
439
449
  *,
440
450
  description: typing.Optional[builtins.str] = None,
441
451
  external_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
442
- inline_policies: typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]] = None,
443
- managed_policies: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]] = None,
444
- 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,
445
455
  path: typing.Optional[builtins.str] = None,
446
- permissions_boundary: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy] = None,
456
+ permissions_boundary: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"] = None,
447
457
  role_name: typing.Optional[builtins.str] = None,
448
458
  ) -> None:
449
459
  '''Properties for defining an IAM Role.
450
460
 
451
- These are copied fron @aws-cdk/aws-iam, but since JSII does not support
452
- TypeScript <Partial<iam.RoleProps>> (or Omit), we have to do this stupid thing.
453
-
454
- Basically exactly the same as source, but with assumedBy removed.
461
+ These are copied fron
455
462
 
456
463
  :param description: A description of the role. It can be up to 1000 characters long. Default: - No description.
457
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
@@ -461,6 +468,13 @@ class RoleProps:
461
468
  :param path: The path associated with this role. For information about IAM paths, see Friendly Names and Paths in IAM User Guide. Default: /
462
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.
463
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.
464
478
  '''
465
479
  if __debug__:
466
480
  type_hints = typing.get_type_hints(_typecheckingstub__0cd6a3e7d7cf1f8d6e476e7c7fb421f2328a8b971f11011b0003bb9de6651e83)
@@ -516,7 +530,7 @@ class RoleProps:
516
530
  @builtins.property
517
531
  def inline_policies(
518
532
  self,
519
- ) -> 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"]]:
520
534
  '''A list of named policies to inline into this role.
521
535
 
522
536
  These policies will be
@@ -527,12 +541,12 @@ class RoleProps:
527
541
  :default: - No policy is inlined in the Role resource.
528
542
  '''
529
543
  result = self._values.get("inline_policies")
530
- 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)
531
545
 
532
546
  @builtins.property
533
547
  def managed_policies(
534
548
  self,
535
- ) -> typing.Optional[typing.List[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]]:
549
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]]:
536
550
  '''A list of managed policies associated with this role.
537
551
 
538
552
  You can add managed policies later using
@@ -541,10 +555,10 @@ class RoleProps:
541
555
  :default: - No managed policies.
542
556
  '''
543
557
  result = self._values.get("managed_policies")
544
- 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)
545
559
 
546
560
  @builtins.property
547
- def max_session_duration(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
561
+ def max_session_duration(self) -> typing.Optional["_aws_cdk_ceddda9d.Duration"]:
548
562
  '''The maximum session duration that you want to set for the specified role.
549
563
 
550
564
  This setting can have a value from 1 hour (3600sec) to 12 (43200sec) hours.
@@ -565,7 +579,7 @@ class RoleProps:
565
579
  :link: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
566
580
  '''
567
581
  result = self._values.get("max_session_duration")
568
- return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
582
+ return typing.cast(typing.Optional["_aws_cdk_ceddda9d.Duration"], result)
569
583
 
570
584
  @builtins.property
571
585
  def path(self) -> typing.Optional[builtins.str]:
@@ -582,7 +596,7 @@ class RoleProps:
582
596
  @builtins.property
583
597
  def permissions_boundary(
584
598
  self,
585
- ) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]:
599
+ ) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]:
586
600
  '''AWS supports permissions boundaries for IAM entities (users or roles).
587
601
 
588
602
  A permissions boundary is an advanced feature for using a managed policy
@@ -596,7 +610,7 @@ class RoleProps:
596
610
  :link: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html
597
611
  '''
598
612
  result = self._values.get("permissions_boundary")
599
- 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)
600
614
 
601
615
  @builtins.property
602
616
  def role_name(self) -> typing.Optional[builtins.str]:
@@ -647,7 +661,11 @@ class GithubActionsIdentityProvider(
647
661
  :stability: experimental
648
662
  '''
649
663
 
650
- def __init__(self, scope: _constructs_77d1e7e8.Construct, id: builtins.str) -> None:
664
+ def __init__(
665
+ self,
666
+ scope: "_constructs_77d1e7e8.Construct",
667
+ id: builtins.str,
668
+ ) -> None:
651
669
  '''(experimental) Define a new Github OpenID Connect Identity PRovider for AWS IAM.
652
670
 
653
671
  There can be only one (per AWS Account).
@@ -671,9 +689,9 @@ class GithubActionsIdentityProvider(
671
689
  @builtins.classmethod
672
690
  def from_account(
673
691
  cls,
674
- scope: _constructs_77d1e7e8.Construct,
692
+ scope: "_constructs_77d1e7e8.Construct",
675
693
  id: builtins.str,
676
- ) -> IGithubActionsIdentityProvider:
694
+ ) -> "IGithubActionsIdentityProvider":
677
695
  '''(experimental) Retrieve a reference to existing Github OIDC provider in your AWS account.
678
696
 
679
697
  An AWS account can only have single Github OIDC provider configured into it,
@@ -695,7 +713,7 @@ class GithubActionsIdentityProvider(
695
713
  type_hints = typing.get_type_hints(_typecheckingstub__6dd498a1f69430076a6a88f7090fd13f298542f0b556d9beb15d29ce4a23d9ce)
696
714
  check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
697
715
  check_type(argname="argument id", value=id, expected_type=type_hints["id"])
698
- return typing.cast(IGithubActionsIdentityProvider, jsii.sinvoke(cls, "fromAccount", [scope, id]))
716
+ return typing.cast("IGithubActionsIdentityProvider", jsii.sinvoke(cls, "fromAccount", [scope, id]))
699
717
 
700
718
  @jsii.python.classproperty
701
719
  @jsii.member(jsii_name="issuer")
@@ -729,16 +747,16 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
729
747
  self,
730
748
  *,
731
749
  owner: builtins.str,
732
- provider: IGithubActionsIdentityProvider,
750
+ provider: "IGithubActionsIdentityProvider",
733
751
  repo: builtins.str,
734
752
  filter: typing.Optional[builtins.str] = None,
735
753
  description: typing.Optional[builtins.str] = None,
736
754
  external_ids: typing.Optional[typing.Sequence[builtins.str]] = None,
737
- inline_policies: typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]] = None,
738
- managed_policies: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]] = None,
739
- max_session_duration: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
755
+ inline_policies: typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]] = None,
756
+ managed_policies: typing.Optional[typing.Sequence["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]] = None,
757
+ max_session_duration: typing.Optional["_aws_cdk_ceddda9d.Duration"] = None,
740
758
  path: typing.Optional[builtins.str] = None,
741
- permissions_boundary: typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy] = None,
759
+ permissions_boundary: typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"] = None,
742
760
  role_name: typing.Optional[builtins.str] = None,
743
761
  ) -> None:
744
762
  '''(experimental) Props that define the IAM Role that can be assumed by Github Actions workflow via Github OpenID Connect Identity Provider.
@@ -824,7 +842,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
824
842
  return typing.cast(builtins.str, result)
825
843
 
826
844
  @builtins.property
827
- def provider(self) -> IGithubActionsIdentityProvider:
845
+ def provider(self) -> "IGithubActionsIdentityProvider":
828
846
  '''(experimental) Reference to Github OpenID Connect Provider configured in AWS IAM.
829
847
 
830
848
  Either pass an construct defined by ``new GithubActionsIdentityProvider``
@@ -835,7 +853,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
835
853
  '''
836
854
  result = self._values.get("provider")
837
855
  assert result is not None, "Required property 'provider' is missing"
838
- return typing.cast(IGithubActionsIdentityProvider, result)
856
+ return typing.cast("IGithubActionsIdentityProvider", result)
839
857
 
840
858
  @builtins.property
841
859
  def repo(self) -> builtins.str:
@@ -900,7 +918,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
900
918
  @builtins.property
901
919
  def inline_policies(
902
920
  self,
903
- ) -> typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]]:
921
+ ) -> typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]]:
904
922
  '''A list of named policies to inline into this role.
905
923
 
906
924
  These policies will be
@@ -911,12 +929,12 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
911
929
  :default: - No policy is inlined in the Role resource.
912
930
  '''
913
931
  result = self._values.get("inline_policies")
914
- return typing.cast(typing.Optional[typing.Mapping[builtins.str, _aws_cdk_aws_iam_ceddda9d.PolicyDocument]], result)
932
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, "_aws_cdk_aws_iam_ceddda9d.PolicyDocument"]], result)
915
933
 
916
934
  @builtins.property
917
935
  def managed_policies(
918
936
  self,
919
- ) -> typing.Optional[typing.List[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]]:
937
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]]:
920
938
  '''A list of managed policies associated with this role.
921
939
 
922
940
  You can add managed policies later using
@@ -925,10 +943,10 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
925
943
  :default: - No managed policies.
926
944
  '''
927
945
  result = self._values.get("managed_policies")
928
- return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]], result)
946
+ return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]], result)
929
947
 
930
948
  @builtins.property
931
- def max_session_duration(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
949
+ def max_session_duration(self) -> typing.Optional["_aws_cdk_ceddda9d.Duration"]:
932
950
  '''The maximum session duration that you want to set for the specified role.
933
951
 
934
952
  This setting can have a value from 1 hour (3600sec) to 12 (43200sec) hours.
@@ -949,7 +967,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
949
967
  :link: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
950
968
  '''
951
969
  result = self._values.get("max_session_duration")
952
- return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
970
+ return typing.cast(typing.Optional["_aws_cdk_ceddda9d.Duration"], result)
953
971
 
954
972
  @builtins.property
955
973
  def path(self) -> typing.Optional[builtins.str]:
@@ -966,7 +984,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
966
984
  @builtins.property
967
985
  def permissions_boundary(
968
986
  self,
969
- ) -> typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy]:
987
+ ) -> typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"]:
970
988
  '''AWS supports permissions boundaries for IAM entities (users or roles).
971
989
 
972
990
  A permissions boundary is an advanced feature for using a managed policy
@@ -980,7 +998,7 @@ class GithubActionsRoleProps(GithubConfiguration, RoleProps):
980
998
  :link: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html
981
999
  '''
982
1000
  result = self._values.get("permissions_boundary")
983
- return typing.cast(typing.Optional[_aws_cdk_aws_iam_ceddda9d.IManagedPolicy], result)
1001
+ return typing.cast(typing.Optional["_aws_cdk_aws_iam_ceddda9d.IManagedPolicy"], result)
984
1002
 
985
1003
  @builtins.property
986
1004
  def role_name(self) -> typing.Optional[builtins.str]:
@@ -1103,3 +1121,6 @@ def _typecheckingstub__a5294e97cf23a4f3be3a6e45b1c5188fe6f334ee6f6a820488832aecb
1103
1121
  ) -> None:
1104
1122
  """Type checking stubs"""
1105
1123
  pass
1124
+
1125
+ for cls in [IGithubActionsIdentityProvider]:
1126
+ 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
+ "3.0.0",
37
+ __name__[0:-6],
38
+ "aws-cdk-github-oidc@3.0.0.jsii.tgz",
39
+ )
40
+
41
+ __all__ = [
42
+ "__jsii_assembly__",
43
+ ]
44
+
45
+ publication.publish()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aws-cdk-github-oidc
3
- Version: 2.4.0
3
+ Version: 3.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.7
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
 
@@ -168,11 +171,3 @@ jobs:
168
171
  ```
169
172
 
170
173
  <br/>
171
-
172
- ### Development Status
173
-
174
- These constructs are fresh out from the oven, since [Github just announced](https://github.blog/changelog/2021-10-27-github-actions-secure-cloud-deployments-with-openid-connect/) the OpenID Connect feature as generally available. I've been playing around with the feature for some time, but the construct itself haven't yet been widely used.
175
-
176
- These constructs will stay in `v0.x.x` for a while, to allow easier bug fixing & breaking changes *if absolutely needed*. Once bugs are fixed (if any), the constructs will be published with `v1` major version and will be marked as stable.
177
-
178
- Currently only TypeScript, Python and Go versions provided, but before going to stable, I'll probably others (supported by JSII) depending on the amount of work required - so no promises!
@@ -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@2.4.0.jsii.tgz
14
+ src/aws_cdk_github_oidc/_jsii/aws-cdk-github-oidc@3.0.0.jsii.tgz
@@ -0,0 +1,5 @@
1
+ aws-cdk-lib<3.0.0,>=2.220.0
2
+ constructs<11.0.0,>=10.3.0
3
+ jsii<2.0.0,>=1.127.0
4
+ publication>=0.0.3
5
+ typeguard==2.13.3
@@ -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.0",
19
- __name__[0:-6],
20
- "aws-cdk-github-oidc@2.4.0.jsii.tgz",
21
- )
22
-
23
- __all__ = [
24
- "__jsii_assembly__",
25
- ]
26
-
27
- publication.publish()
@@ -1,5 +0,0 @@
1
- aws-cdk-lib<3.0.0,>=2.89.0
2
- constructs<11.0.0,>=10.0.0
3
- jsii<2.0.0,>=1.86.1
4
- publication>=0.0.3
5
- typeguard~=2.13.3