Skip to content

Commit a7ebffe

Browse files
feat!: Support AWS Cryptographic Material Providers Library (MPL) (#685)
1 parent 6e53b21 commit a7ebffe

File tree

262 files changed

+14765
-404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+14765
-404
lines changed

.coveragerc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# .coveragerc file when running coverage WITHOUT coverage for the MPL
2+
# This prevents the ESDK without the MPL from considering the MPL-specific modules as "missed" coverage
3+
[run]
4+
omit = */aws_encryption_sdk/materials_managers/mpl/*
5+
6+
[report]
7+
omit = */aws_encryption_sdk/materials_managers/mpl/*

.coveragercmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# .coveragerc file when running coverage WITH coverage for the MPL

.github/workflows/ci_codebuild-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838
with:
3939
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
4040
aws-region: us-west-2
41-
role-duration-seconds: 3600
41+
role-duration-seconds: 4200
4242
- name: Run python-${{ matrix.python.python_version }} ${{ matrix.codebuild_file_name }}
4343
uses: aws-actions/aws-codebuild-run-build@v1
44-
timeout-minutes: 60
44+
timeout-minutes: 70
4545
with:
4646
project-name: python-esdk
4747
buildspec-override: codebuild/py${{ matrix.python.python_version }}/${{ matrix.codebuild_file_name }}

.github/workflows/ci_tests.yaml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,40 @@ jobs:
4040
category:
4141
- local
4242
- accept
43+
- mpllocal
4344
# These require credentials.
4445
# Enable them once we sort how to provide them.
4546
# - integ
4647
# - examples
48+
# Append '-mpl' to some test environments.
49+
# This suffix signals to tox to install the MPL in the test environment.
50+
optional_mpl_dependency:
51+
- ""
52+
- -mpl
4753
exclude:
4854
# x86 builds are only meaningful for Windows
4955
- os: ubuntu-latest
5056
architecture: x86
5157
- os: macos-13
5258
architecture: x86
59+
# MPL is not supported on <3.11
60+
- python: 3.7
61+
optional_mpl_dependency: -mpl
62+
- python: 3.8
63+
optional_mpl_dependency: -mpl
64+
- python: 3.9
65+
optional_mpl_dependency: -mpl
66+
- python: 3.10
67+
optional_mpl_dependency: -mpl
68+
# mpllocal requires the MPL to be installed
69+
- category: mpllocal
70+
optional_mpl_dependency: ""
5371
steps:
72+
# Support long Dafny filenames (used in MPL and DBESDK repos)
73+
- name: Support longpaths
74+
run: |
75+
git config --global core.longpaths true
76+
5477
- uses: actions/checkout@v4
5578
- uses: actions/setup-python@v4
5679
with:
@@ -61,7 +84,7 @@ jobs:
6184
pip install --upgrade -r dev_requirements/ci-requirements.txt
6285
- name: run test
6386
env:
64-
TOXENV: ${{ matrix.category }}
87+
TOXENV: ${{ matrix.category }}${{ matrix.optional_mpl_dependency }}
6588
run: tox -- -vv
6689
upstream-py311:
6790
runs-on: ubuntu-latest
@@ -81,5 +104,5 @@ jobs:
81104
pip install --upgrade -r dev_requirements/ci-requirements.txt
82105
- name: run test
83106
env:
84-
TOXENV: ${{ matrix.category }}
107+
TOXENV: ${{ matrix.category }}${{ matrix.optional_mpl_dependency }}
85108
run: tox -- -vv

.gitignore

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ docs/build
1919
__pycache__
2020
*.egg-info
2121

22-
# Coverage.py
23-
.coverage*
22+
# Coverage.py, NOT .coveragerc nor .coveragercmpl
23+
.coverage
24+
.coverage.py
2425

2526
# MyPy
2627
.mypy_cache
@@ -30,6 +31,14 @@ __pycache__
3031

3132
# PyTest
3233
.pytest_cache
34+
# Ignore key materials generated by examples or tests
35+
test_keyrings/
36+
# Ignore results of performance test
37+
performance_tests/results/*.csv
38+
performance_tests/results/*.pstats
39+
performance_tests/results/*.png
40+
# Ignore the memory profile logs
41+
mprofile_*
3342

3443
# PyCharm
3544
.idea/

CHANGELOG.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22
Changelog
33
*********
44

5+
4.0.0 -- 2024-10-29
6+
===================
7+
8+
Features
9+
--------
10+
* Add support for constructs from the `AWS Cryptographic Material Providers Library (MPL) <https://github.com/aws/aws-cryptographic-material-providers-library>`_.
11+
The MPL contains new constructs for encrypting and decrypting your data.
12+
We highly recommend installing the MPL. See `Installing <https://github.com/aws/aws-encryption-sdk-python/tree/master?tab=readme-ov-file#installation>`_ for instructions.
13+
14+
Breaking Changes
15+
^^^^^^^^^^^^^^^^
16+
* The MPL introduces the Required Encryption Context Cryptographic Materials Manager
17+
("required EC CMM") as a new construct for protecting your data.
18+
On encrypt, the required EC CMM will use specific configured
19+
encryption context key-value pairs to calculate the message signature,
20+
but will not store those pairs in the ESDK message.
21+
On decrypt, decryptors must supply these same pairs that were used when encrypting the message.
22+
All messages that have been encrypted with versions of the ESDK <4.0.0 are forward compatible with this change.
23+
However, messages that are constructed with the required EC CMM are not backward compatible with ESDK <4.0.0,
24+
as no version of ESDK <4.0.0 supports reading messages encrypted with the required EC CMM.
25+
A message that is encrypted with the required EC CMM from the MPL must be decrypted with a CMM from the MPL.
26+
27+
Fixes
28+
-----------
29+
* fix: MKPs attempt to decrypt with remaining keys if a preceding raw RSA key failed to decrypt
30+
`#707 <https://github.com/aws/aws-encryption-sdk-python/pull/707>`_
31+
532
3.3.0 -- 2024-05-20
633
===================
734

0 commit comments

Comments
 (0)