Skip to content

Commit ae46a84

Browse files
Merge branch 'mpl-reviewed' into lucmcdon/mpl-requiredec
2 parents 7bb939f + ac79bc8 commit ae46a84

File tree

8 files changed

+293
-5
lines changed

8 files changed

+293
-5
lines changed

CHANGELOG.rst

+52
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,58 @@
22
Changelog
33
*********
44

5+
3.2.0 -- 2024-03-18
6+
===================
7+
8+
Features
9+
-----------
10+
* test Python 3.12 in CI (#623 (https://github.com/josecorella/aws-encryption-sdk-python/issues/623)) (93a67d8 (https://github.com/josecorella/aws-encryption-sdk-python/commit/93a67d8a3806f560ead950e6d8898e53c4c4f9df))
11+
* update requirements and README (#638 (https://github.com/josecorella/aws-encryption-sdk-python/issues/638)) (bcead77 (https://github.com/josecorella/aws-encryption-sdk-python/commit/bcead776b022566ad8211a08e1a458375b23a356))
12+
13+
Fixes
14+
-----------
15+
* CI for Decrypt Oracle (#558 (https://github.com/josecorella/aws-encryption-sdk-python/issues/558)) (6c6b732 (https://github.com/josecorella/aws-encryption-sdk-python/commit/6c6b732379197e91d2137af9f018f670a1ce500a))
16+
* deprecate python36 from chalice (#539 (https://github.com/josecorella/aws-encryption-sdk-python/issues/539)) (f8aa29f (https://github.com/josecorella/aws-encryption-sdk-python/commit/f8aa29fe98d419dac916846d7ff207685ea95307))
17+
* test: correctly invoke ec.generate_private_key (#585 (https://github.com/josecorella/aws-encryption-sdk-python/issues/585)) (560e714 (https://github.com/josecorella/aws-encryption-sdk-python/commit/560e7143ac7caf98e190b17ce2af97b7eea6be16))
18+
* update pyca range (#507 (https://github.com/josecorella/aws-encryption-sdk-python/issues/507)) (aced92c (https://github.com/josecorella/aws-encryption-sdk-python/commit/aced92c3d87dddf3e0920b9dfad4cedd2473604a))
19+
* Use FORBID_ENCRYPT_ALLOW_DECRYPT policy for decrypt oracle (#538 (https://github.com/josecorella/aws-encryption-sdk-python/issues/538)) (e91838f (https://github.com/josecorella/aws-encryption-sdk-python/commit/e91838f65705867fc95506a4323054bca24e9521))
20+
* wrong formatting python warning (#546 (https://github.com/josecorella/aws-encryption-sdk-python/issues/546)) (9b618d3 (https://github.com/josecorella/aws-encryption-sdk-python/commit/9b618d3a5e517435304a891393fefcbbd89faf65))
21+
22+
Maintenance
23+
-----------
24+
* Add example for custom KMS client config (#440 (https://github.com/josecorella/aws-encryption-sdk-python/issues/440)) (08f305a (https://github.com/josecorella/aws-encryption-sdk-python/commit/08f305a9b7b5fc897d9cafac55fb98f3f2a6fe13))
25+
* Add Thread safety section to README (#562 (https://github.com/josecorella/aws-encryption-sdk-python/issues/562)) (7a07b16 (https://github.com/josecorella/aws-encryption-sdk-python/commit/7a07b161d51900066c131627f9f7330acb926d3b))
26+
* bump deps & document upstream test (#646 (https://github.com/josecorella/aws-encryption-sdk-python/issues/646)) (a93ffe7 (https://github.com/josecorella/aws-encryption-sdk-python/commit/a93ffe7a98f8913040f6a693701ba287dd1570fb))
27+
* CFN: Commit existing CFN (#636 (https://github.com/josecorella/aws-encryption-sdk-python/issues/636)) (c122076 (https://github.com/josecorella/aws-encryption-sdk-python/commit/c12207621d295b335fdfb500c2b02694cc6786d8))
28+
* ci: skip pyenv installation if already exists (#627 (https://github.com/josecorella/aws-encryption-sdk-python/issues/627)) (1006758 (https://github.com/josecorella/aws-encryption-sdk-python/commit/10067581cd3316fbb379929806db6867e4cb0feb))
29+
* deps: bump actions/checkout from 3 to 4 (#607 (https://github.com/josecorella/aws-encryption-sdk-python/issues/607)) (e5c331b (https://github.com/josecorella/aws-encryption-sdk-python/commit/e5c331b68590825b55b5300ffab6dc80fbd20818))
30+
* deps: bump actions/setup-python from 2 to 4.2.0 (#491 (https://github.com/josecorella/aws-encryption-sdk-python/issues/491)) (d064bf8 (https://github.com/josecorella/aws-encryption-sdk-python/commit/d064bf8813d25e1ba4a8cce7269b8ee48acfd79a))
31+
* deps: bump cryptography from 39.0.0 to 39.0.1 in /test (#559 (https://github.com/josecorella/aws-encryption-sdk-python/issues/559)) (6468137 (https://github.com/josecorella/aws-encryption-sdk-python/commit/646813786c6250a525afb67bebc486eda206edd8))
32+
* deps: bump cryptography from 39.0.1 to 41.0.2 in /test (#592 (https://github.com/josecorella/aws-encryption-sdk-python/issues/592)) (3ba8019 (https://github.com/josecorella/aws-encryption-sdk-python/commit/3ba8019681ed95c41bb9448f0c3897d1aecc7559))
33+
* deps: bump cryptography from 41.0.2 to 41.0.6 in /test (#626 (https://github.com/josecorella/aws-encryption-sdk-python/issues/626)) (c67e6bd (https://github.com/josecorella/aws-encryption-sdk-python/commit/c67e6bd471b30e13cc7f1b724ce7d19df2380c22))
34+
* deps: bump dependabot/fetch-metadata from 1.3.0 to 1.3.6 (#549 (https://github.com/josecorella/aws-encryption-sdk-python/issues/549)) (2a6bd9d (https://github.com/josecorella/aws-encryption-sdk-python/commit/2a6bd9d70c779655077985c544df3db6a3518443))
35+
* deps: bump flake8-bugbear in /dev_requirements (#512 (https://github.com/josecorella/aws-encryption-sdk-python/issues/512)) (93f01d6 (https://github.com/josecorella/aws-encryption-sdk-python/commit/93f01d655d6bce704bd8779cc9c4acb5f96b980c))
36+
* deps: bump flake8-docstrings in /dev_requirements (#555 (https://github.com/josecorella/aws-encryption-sdk-python/issues/555)) (bd8f270 (https://github.com/josecorella/aws-encryption-sdk-python/commit/bd8f270c8717e5d4a787d33bcfda8b53bbe7751e))
37+
* deps: bump flake8-print from 4.0.0 to 5.0.0 in /dev_requirements (#554 (https://github.com/josecorella/aws-encryption-sdk-python/issues/554)) (2326531 (https://github.com/josecorella/aws-encryption-sdk-python/commit/232653188558379bceeb884b3f74b56b07560f62))
38+
* deps: bump isort from 5.10.1 to 5.11.4 in /dev_requirements (#551 (https://github.com/josecorella/aws-encryption-sdk-python/issues/551)) (36a0ea2 (https://github.com/josecorella/aws-encryption-sdk-python/commit/36a0ea2199872d6590691b53fbea7aee2236a99e))
39+
* deps: bump pytest from 7.0.1 to 7.2.0 in /dev_requirements (#524 (https://github.com/josecorella/aws-encryption-sdk-python/issues/524)) (af98302 (https://github.com/josecorella/aws-encryption-sdk-python/commit/af983024fdd800e6b2c4ae41cdf1617c982e4916))
40+
* deps: bump pytest from 7.2.0 to 7.2.1 in /dev_requirements (#553 (https://github.com/josecorella/aws-encryption-sdk-python/issues/553)) (48f96d5 (https://github.com/josecorella/aws-encryption-sdk-python/commit/48f96d58eeb712a5faa631ce4f4930d5d23bb649))
41+
* deps: bump pytest-cov from 3.0.0 to 4.0.0 in /dev_requirements (#550 (https://github.com/josecorella/aws-encryption-sdk-python/issues/550)) (6e436e1 (https://github.com/josecorella/aws-encryption-sdk-python/commit/6e436e13ce250759a499c3d9c820384cfc26283c))
42+
* deps: bump readme-renderer from 34.0 to 37.3 in /dev_requirements (#526 (https://github.com/josecorella/aws-encryption-sdk-python/issues/526)) (38aa063 (https://github.com/josecorella/aws-encryption-sdk-python/commit/38aa06309ad8ad709044c86ac6b4951739fbf996))
43+
* deps: bump setuptools from 62.0.0 to 66.1.1 in /dev_requirements (#547 (https://github.com/josecorella/aws-encryption-sdk-python/issues/547)) (04e8c16 (https://github.com/josecorella/aws-encryption-sdk-python/commit/04e8c167273357a9548ff474c527805d8764a661))
44+
* deps: bump sphinx from 4.4.0 to 5.3.0 in /dev_requirements (#523 (https://github.com/josecorella/aws-encryption-sdk-python/issues/523)) (51cb2ce (https://github.com/josecorella/aws-encryption-sdk-python/commit/51cb2ce148bc7e048587b013337f2440b53c1387))
45+
* deps: bump tox from 3.24.5 to 3.27.1 in /dev_requirements (#528 (https://github.com/josecorella/aws-encryption-sdk-python/issues/528)) (e2c834a (https://github.com/josecorella/aws-encryption-sdk-python/commit/e2c834ac5c4a9ca65db2b225e794f7ddf4d89cc4))
46+
* deps: bump urllib3 from 1.26.14 to 1.26.18 in /test (#618 (https://github.com/josecorella/aws-encryption-sdk-python/issues/618)) (bbb2281 (https://github.com/josecorella/aws-encryption-sdk-python/commit/bbb2281ed61f8fc8700e31d9828753531c8e586f))
47+
* deps: bump vulture from 2.3 to 2.6 in /dev_requirements (#533 (https://github.com/josecorella/aws-encryption-sdk-python/issues/533)) (2822364 (https://github.com/josecorella/aws-encryption-sdk-python/commit/28223646b4c48b2508ca46e3084689988abd2d27))
48+
* deps: bump wheel from 0.37.1 to 0.38.4 in /dev_requirements (#536 (https://github.com/josecorella/aws-encryption-sdk-python/issues/536)) (1922650 (https://github.com/josecorella/aws-encryption-sdk-python/commit/19226506ad33f5b964fe6632604425923f6ba8c1))
49+
* drop py3.6 from Oracle & Test Vectors (#529 (https://github.com/josecorella/aws-encryption-sdk-python/issues/529)) (8b6a493 (https://github.com/josecorella/aws-encryption-sdk-python/commit/8b6a49388c85785a22d59430007b7873ac8acf96))
50+
* drop py36 support (#530 (https://github.com/josecorella/aws-encryption-sdk-python/issues/530)) (a753ff8 (https://github.com/josecorella/aws-encryption-sdk-python/commit/a753ff884fe3000881c7d3a2392a0b5d65cfa138))
51+
* release: add api token to prod release process (#503 (https://github.com/josecorella/aws-encryption-sdk-python/issues/503)) (333c85b (https://github.com/josecorella/aws-encryption-sdk-python/commit/333c85b40b8ee20ed6303b9775e7fb9a6c6d2c63))
52+
* release: add api token to staging release process (#502 (https://github.com/josecorella/aws-encryption-sdk-python/issues/502)) (78e43b3 (https://github.com/josecorella/aws-encryption-sdk-python/commit/78e43b38a5b9df9a925084242a230fccf91476f2))
53+
* rm upstream-py27 (#564 (https://github.com/josecorella/aws-encryption-sdk-python/issues/564)) (b378508 (https://github.com/josecorella/aws-encryption-sdk-python/commit/b3785085b7c00fef27a250abf78549d6e7928802))
54+
* SupportPolicy: Mark 1.x & 2.x End-of-Support (#501 (https://github.com/josecorella/aws-encryption-sdk-python/issues/501)) (ca58e5e (https://github.com/josecorella/aws-encryption-sdk-python/commit/ca58e5e0ce373e9ae5132bb5ce95b6886a0a37d3))
55+
56+
557
3.1.1 -- 2022-06-20
658
===================
759

cfn/ESDK-Python.yml

+74-2
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,15 @@ Resources:
170170
AssumeRolePolicyDocument: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"codebuild.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}"
171171
MaxSessionDuration: 3600
172172
ManagedPolicyArns:
173+
# Ideally we would add GeneratedVectorsArtifactsS3BucketPolicy to run test vectors.
174+
# However, this role would then have 11 managed policies.
175+
# IAM has a limit of 10 managed policies per role.
176+
# If we need to add more policies here, we should increase this limit.
173177
- !Ref CryptoToolsKMS
174178
- !Ref CodeBuildBatchPolicy
175179
- !Ref CodeBuildBasePolicy
176180
- !Ref SecretsManagerPolicy
181+
- !Ref CodeBuildCISTSAllow
177182

178183
CodeBuildCIServiceRole:
179184
Type: "AWS::IAM::Role"
@@ -186,6 +191,9 @@ Resources:
186191
- !Ref CryptoToolsKMS
187192
- !Ref CodeBuildCIBatchPolicy
188193
- !Ref CodeBuildBasePolicy
194+
- !Ref SecretsManagerCIPolicy
195+
- !Ref CodeBuildCISTSAllow
196+
- !Ref GeneratedVectorsArtifactsS3BucketPolicy
189197

190198
CodeBuildBatchPolicy:
191199
Type: "AWS::IAM::ManagedPolicy"
@@ -229,7 +237,8 @@ Resources:
229237
"Action": [
230238
"codebuild:StartBuild",
231239
"codebuild:StopBuild",
232-
"codebuild:RetryBuild"
240+
"codebuild:RetryBuild",
241+
"codebuild:BatchGetBuilds"
233242
]
234243
}
235244
]
@@ -257,7 +266,8 @@ Resources:
257266
"Action": [
258267
"logs:CreateLogGroup",
259268
"logs:CreateLogStream",
260-
"logs:PutLogEvents"
269+
"logs:PutLogEvents",
270+
"logs:GetLogEvents"
261271
]
262272
},
263273
{
@@ -308,6 +318,26 @@ Resources:
308318
}
309319
]
310320
}
321+
322+
SecretsManagerCIPolicy:
323+
Type: "AWS::IAM::ManagedPolicy"
324+
Properties:
325+
ManagedPolicyName: !Sub "CryptoTools-SecretsManagerCI-${ProjectName}-release"
326+
Path: "/service-role/"
327+
# Policy: Allow access to a Github fine-grained PAT that can read ESDK-Dafny "Daily CI" artifacts
328+
PolicyDocument: !Sub |
329+
{
330+
"Version": "2012-10-17",
331+
"Statement": [
332+
{
333+
"Effect": "Allow",
334+
"Resource": [
335+
"arn:aws:secretsmanager:us-west-2:587316601012:secret:Github/lucasmcdonald3-fgpat-1aAsdO"
336+
],
337+
"Action": "secretsmanager:GetSecretValue"
338+
}
339+
]
340+
}
311341
312342
# There exist public AWS KMS CMKs that are used for testing
313343
# Take care with these CMKs they are **ONLY** for testing!!!
@@ -339,3 +369,45 @@ Resources:
339369
}
340370
]
341371
}
372+
373+
CodeBuildCISTSAllow:
374+
Type: "AWS::IAM::ManagedPolicy"
375+
Properties:
376+
ManagedPolicyName: !Sub CodeBuildCISTSAllow-${ProjectName}
377+
Path: /service-role/
378+
PolicyDocument: |
379+
{
380+
"Version": "2012-10-17",
381+
"Statement": [
382+
{
383+
"Effect": "Allow",
384+
"Action": "sts:AssumeRole",
385+
"Resource": "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Python-Role-us-west-2"
386+
}
387+
]
388+
}
389+
390+
GeneratedVectorsArtifactsS3Bucket:
391+
Type: 'AWS::S3::Bucket'
392+
Properties:
393+
BucketName: generated-vectors-artifacts-bucket
394+
LifecycleConfiguration:
395+
Rules:
396+
- Id: Expire artifacts in 14 days
397+
Status: Enabled
398+
ExpirationInDays: 14
399+
400+
GeneratedVectorsArtifactsS3BucketPolicy:
401+
Type: 'AWS::IAM::ManagedPolicy'
402+
Properties:
403+
ManagedPolicyName: Generated-Vectors-Artifacts-S3-Bucket-Policy
404+
PolicyDocument:
405+
Version: 2012-10-17
406+
Statement:
407+
- Effect: Allow
408+
Action:
409+
- 's3:PutObject'
410+
- 's3:GetObject'
411+
- 's3:DeleteObject'
412+
Resource:
413+
- !Join [ "", [ !GetAtt GeneratedVectorsArtifactsS3Bucket.Arn, '/*'] ]

cfn/Public-ESDK-Python-CI.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
AWSTemplateFormatVersion: "2010-09-09"
2+
Description: "IAM Managed Policies/Role for AWS KMS Hierarchical Keyring Testing"
3+
4+
Parameters:
5+
ProjectName:
6+
Type: String
7+
Description: A prefix that will be applied to any resource names
8+
Default: Public-ESDK-Python
9+
GitHubRepo:
10+
Type: String
11+
Description: GitHub Repo that invokes CI
12+
Default: aws/aws-encryption-sdk-python
13+
14+
Resources:
15+
GitHubCIRole:
16+
Type: 'AWS::IAM::Role'
17+
Properties:
18+
RoleName: !Sub "GitHub-CI-${ProjectName}-Role-${AWS::Region}"
19+
Description: "Access DDB, KMS, Resources for CI from GitHub"
20+
ManagedPolicyArns:
21+
- "arn:aws:iam::370957321024:policy/ESDK-Dafny-DDB-ReadWriteDelete-us-west-2"
22+
- "arn:aws:iam::370957321024:policy/Hierarchical-GitHub-KMS-Key-Policy"
23+
- "arn:aws:iam::370957321024:policy/KMS-Public-CMK-EncryptDecrypt-Key-Access"
24+
- "arn:aws:iam::370957321024:policy/RSA-GitHub-KMS-Key-Policy"
25+
AssumeRolePolicyDocument: !Sub |
26+
{
27+
"Version": "2012-10-17",
28+
"Statement": [
29+
{
30+
"Effect": "Allow",
31+
"Principal": { "Federated": "arn:aws:iam::${AWS::AccountId}:oidc-provider/token.actions.githubusercontent.com" },
32+
"Action": "sts:AssumeRoleWithWebIdentity",
33+
"Condition": {
34+
"StringEquals": {
35+
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
36+
},
37+
"StringLike": {
38+
"token.actions.githubusercontent.com:sub": "repo:${GitHubRepo}:*"
39+
}
40+
}
41+
},
42+
{
43+
"Effect": "Allow",
44+
"Principal": {
45+
"AWS": "*"
46+
},
47+
"Action": "sts:AssumeRole",
48+
"Condition": {
49+
"StringEquals": {
50+
"aws:PrincipalArn": [
51+
"arn:aws:iam::587316601012:role/service-role/codebuild-python-esdk-CI-service-role",
52+
"arn:aws:iam::587316601012:role/service-role/codebuild-python-esdk-service-role",
53+
"arn:aws:iam::${AWS::AccountId}:role/ToolsDevelopment"
54+
]
55+
}
56+
}
57+
}
58+
]
59+
}

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def get_requirements():
4040
license="Apache License 2.0",
4141
install_requires=get_requirements(),
4242
# pylint: disable=fixme
43-
# TODO: Point at MPL main branch once Python MPL is merged into main.
43+
# TODO-MPL: Point at PyPI once MPL is released.
44+
# This blocks releasing ESDK-Python MPL integration.
4445
extras_require={
4546
"MPL": ["aws-cryptographic-material-providers @" \
4647
"git+https://github.com/aws/aws-cryptographic-material-providers-library.git@" \

src/aws_encryption_sdk/identifiers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# We only actually need these imports when running the mypy checks
2828
pass
2929

30-
__version__ = "3.1.1"
30+
__version__ = "3.2.0"
3131
USER_AGENT_SUFFIX = "AwsEncryptionSdkPython/{}".format(__version__)
3232

3333

src/aws_encryption_sdk/materials_managers/mpl/cmm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CryptoMaterialsManagerFromMPL(CryptoMaterialsManager):
3636
"""
3737
In instances where encryption materials are provided by an implementation of the MPL's
3838
`aws_cryptographic_materialproviders.mpl.references.MPL_ICryptographicMaterialsManager`,
39-
this maps the ESDK CMM interfaces to the MPL CMM.
39+
this maps the ESDK-Python CMM interfaces to the MPL CMM.
4040
"""
4141

4242
mpl_cmm: 'MPL_ICryptographicMaterialsManager'

test/unit/test_streaming_client_configs.py

+7
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ def test_client_configs_with_mpl(
245245
assert test.key_provider == kwargs["key_provider"]
246246
assert isinstance(test.materials_manager, DefaultCryptoMaterialsManager)
247247

248+
# If MPL keyring was provided, it should be wrapped in MPL materials manager
249+
elif "keyring" in kwargs:
250+
assert test.keyring is not None
251+
assert test.keyring == kwargs["keyring"]
252+
assert isinstance(test.keyring, IKeyring)
253+
assert isinstance(test.materials_manager, CryptoMaterialsManagerFromMPL)
254+
248255
else:
249256
raise ValueError(f"Test did not find materials_manager or key_provider. {kwargs}")
250257

0 commit comments

Comments
 (0)