Skip to content

chore: KMS keyring example #659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 177 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 166 commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
7360edd
passing hierarchy keyring example
lucasmcdonald3 Jan 31, 2024
53c46ec
cleanup
lucasmcdonald3 Feb 2, 2024
3f5a503
add
lucasmcdonald3 Feb 2, 2024
16cf5c1
changes, cleanup:
lucasmcdonald3 Feb 2, 2024
5b5aa07
changes, cleanup
lucasmcdonald3 Feb 2, 2024
03e19ca
flake8
lucasmcdonald3 Feb 2, 2024
b5d3327
flake8
lucasmcdonald3 Feb 2, 2024
b13cd19
flake8
lucasmcdonald3 Feb 2, 2024
51065cb
flake8
lucasmcdonald3 Feb 2, 2024
fc4d254
flake8
lucasmcdonald3 Feb 2, 2024
a8e52d3
fix pem/der
lucasmcdonald3 Feb 5, 2024
6f55047
fix pem/der
lucasmcdonald3 Feb 5, 2024
1b1b4e4
debug
lucasmcdonald3 Feb 6, 2024
38a4cc9
debug
lucasmcdonald3 Feb 6, 2024
0cd0e23
fix
lucasmcdonald3 Feb 6, 2024
44826a2
fix
lucasmcdonald3 Feb 7, 2024
02e9f84
fix
lucasmcdonald3 Feb 7, 2024
a3babfd
linter
lucasmcdonald3 Feb 7, 2024
d2c974a
linter
lucasmcdonald3 Feb 7, 2024
55b24a8
isort
lucasmcdonald3 Feb 7, 2024
7e5fa48
flake8 examples
lucasmcdonald3 Feb 7, 2024
055deab
isort + flake8
lucasmcdonald3 Feb 7, 2024
6cf01d4
flake8/pylint examples
lucasmcdonald3 Feb 7, 2024
00cfed1
reset tests
lucasmcdonald3 Feb 7, 2024
61bbb3b
extend mpl
lucasmcdonald3 Feb 7, 2024
4d53ad6
mpl gha
lucasmcdonald3 Feb 7, 2024
c1736d3
debug
lucasmcdonald3 Feb 7, 2024
9991789
debug
lucasmcdonald3 Feb 7, 2024
a501e8f
debug
lucasmcdonald3 Feb 7, 2024
6eb8f82
debug
lucasmcdonald3 Feb 7, 2024
5ccfa0c
codebuild mpl
lucasmcdonald3 Feb 7, 2024
5e7ec9b
codebuild mpl
lucasmcdonald3 Feb 7, 2024
cc48697
codebuild mpl
lucasmcdonald3 Feb 7, 2024
fae43d1
codebuild mpl
lucasmcdonald3 Feb 7, 2024
2637616
debug
lucasmcdonald3 Feb 7, 2024
2694932
debug
lucasmcdonald3 Feb 7, 2024
f674d3e
debug
lucasmcdonald3 Feb 7, 2024
0b5e655
debug
lucasmcdonald3 Feb 7, 2024
831df17
debug
lucasmcdonald3 Feb 7, 2024
477e3a0
debug
lucasmcdonald3 Feb 7, 2024
166c5ab
debug
lucasmcdonald3 Feb 7, 2024
7ac8880
debug
lucasmcdonald3 Feb 7, 2024
8193c25
Merge branch 'master' into lucmcdon/mpl
lucasmcdonald3 Feb 7, 2024
7e3ca15
fix
lucasmcdonald3 Feb 7, 2024
4c6a1d0
fix
lucasmcdonald3 Feb 7, 2024
e2e1858
fix
lucasmcdonald3 Feb 7, 2024
c790011
mpl
lucasmcdonald3 Feb 7, 2024
33ace58
fix
lucasmcdonald3 Feb 7, 2024
cbf2cdf
fix
lucasmcdonald3 Feb 7, 2024
b259477
fix
lucasmcdonald3 Feb 7, 2024
9d52cf2
.
lucasmcdonald3 Feb 8, 2024
31b7616
debug tox mpl keystore env
lucasmcdonald3 Feb 9, 2024
353b8cf
debug tox mpl keystore env
lucasmcdonald3 Feb 9, 2024
fb64d95
debug tox mpl keystore env
lucasmcdonald3 Feb 9, 2024
916ae8e
debug tox mpl keystore env
lucasmcdonald3 Feb 9, 2024
222b135
debug tox mpl keystore env
lucasmcdonald3 Feb 9, 2024
cab6016
some unit tests
lucasmcdonald3 Feb 10, 2024
a7416b1
add mpl coverage
lucasmcdonald3 Feb 13, 2024
7b3dc5f
.
lucasmcdonald3 Feb 13, 2024
7a5e4eb
.
lucasmcdonald3 Feb 13, 2024
0649995
mock imports
lucasmcdonald3 Feb 13, 2024
6691fa2
refactor, fix
lucasmcdonald3 Feb 20, 2024
3ae1e06
refactor, fix
lucasmcdonald3 Feb 20, 2024
2b5fc72
refactor, fix
lucasmcdonald3 Feb 20, 2024
a940dc5
refactor, fix
lucasmcdonald3 Feb 20, 2024
708ab5e
it works locally but fails on gha
lucasmcdonald3 Feb 20, 2024
ffd295c
it works locally but fails on gha
lucasmcdonald3 Feb 20, 2024
1ba175c
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
fa175ba
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
2f90a97
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
df9215f
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
b57e4a3
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
9d7ec6d
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
2cbc845
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
def946d
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
dff6ac0
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
78f0b0f
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
20a469e
it works locally but fails on gha
lucasmcdonald3 Feb 21, 2024
66859a7
fix tests
lucasmcdonald3 Feb 21, 2024
bf8f67c
cleanup
lucasmcdonald3 Feb 21, 2024
b24be11
re-enable test
lucasmcdonald3 Feb 21, 2024
acba1b0
re-enable test
lucasmcdonald3 Feb 21, 2024
42b7b74
longpaths
lucasmcdonald3 Feb 21, 2024
f226e7e
longpaths
lucasmcdonald3 Feb 21, 2024
aa2f80a
debug windows fail
lucasmcdonald3 Feb 21, 2024
bc002b6
debug windows fail
lucasmcdonald3 Feb 21, 2024
8dd0303
debug windows fail
lucasmcdonald3 Feb 21, 2024
1e9db3b
debug windows fail
lucasmcdonald3 Feb 21, 2024
74d4e66
disable windows until pythonpath
lucasmcdonald3 Feb 21, 2024
1bb23e8
expand testing
lucasmcdonald3 Feb 21, 2024
1ee69ce
expand testing
lucasmcdonald3 Feb 21, 2024
b33f2f7
expand testing
lucasmcdonald3 Feb 21, 2024
c582888
expand testing
lucasmcdonald3 Feb 21, 2024
5ae44f5
expand testing
lucasmcdonald3 Feb 21, 2024
cb7e3d1
cleanup
lucasmcdonald3 Feb 21, 2024
b026b53
cleanup
lucasmcdonald3 Feb 21, 2024
50afa3a
cleanup
lucasmcdonald3 Feb 21, 2024
1c612a0
cleanup
lucasmcdonald3 Feb 21, 2024
bcdb4ba
add missing file
lucasmcdonald3 Feb 21, 2024
41fe2f9
add missing file
lucasmcdonald3 Feb 21, 2024
1ba857e
add missing file
lucasmcdonald3 Feb 21, 2024
74bfe12
cleanup
lucasmcdonald3 Feb 21, 2024
b3b9a0f
refactor
lucasmcdonald3 Feb 22, 2024
a594125
refactor
lucasmcdonald3 Feb 22, 2024
fdd2eda
unit tests
lucasmcdonald3 Feb 23, 2024
0138f22
unit tests
lucasmcdonald3 Feb 23, 2024
f213e19
upgrade image
lucasmcdonald3 Feb 23, 2024
d55f296
refactor tests
lucasmcdonald3 Feb 23, 2024
5ec4668
refactor tests
lucasmcdonald3 Feb 23, 2024
61ba4de
refactor tests
lucasmcdonald3 Feb 23, 2024
95c5be6
refactor tests
lucasmcdonald3 Feb 23, 2024
9566873
refactor tests
lucasmcdonald3 Feb 23, 2024
6642083
fix cov
lucasmcdonald3 Feb 23, 2024
51d2804
fix cov
lucasmcdonald3 Feb 23, 2024
51e5db5
fix cov
lucasmcdonald3 Feb 23, 2024
e235461
fix cov
lucasmcdonald3 Feb 23, 2024
e7c745f
fix tests
lucasmcdonald3 Feb 23, 2024
fee4f36
test cleanup
lucasmcdonald3 Feb 24, 2024
ac6471a
test cleanup
lucasmcdonald3 Feb 24, 2024
a5ebc19
isort
lucasmcdonald3 Feb 24, 2024
21f3614
fixes
lucasmcdonald3 Feb 24, 2024
22eabb6
fix
lucasmcdonald3 Feb 24, 2024
ac0ceb3
fix
lucasmcdonald3 Feb 24, 2024
2fd8858
oops
lucasmcdonald3 Feb 24, 2024
51c6a9c
revert
lucasmcdonald3 Feb 24, 2024
800f9de
revert
lucasmcdonald3 Feb 24, 2024
ebcb759
fix
lucasmcdonald3 Feb 24, 2024
cf26ca3
fix
lucasmcdonald3 Feb 24, 2024
7f27ebd
fix
lucasmcdonald3 Feb 24, 2024
00f4721
fix
lucasmcdonald3 Feb 24, 2024
018b93f
fix
lucasmcdonald3 Feb 24, 2024
d413b65
fix
lucasmcdonald3 Feb 24, 2024
c4ca658
copyright
lucasmcdonald3 Feb 24, 2024
d99b666
more unit tests
lucasmcdonald3 Feb 26, 2024
49cb7c8
more unit tests
lucasmcdonald3 Feb 26, 2024
705113a
more unit tests
lucasmcdonald3 Feb 26, 2024
f76d7f9
more unit tests
lucasmcdonald3 Feb 26, 2024
0da2a4f
more unit tests
lucasmcdonald3 Feb 26, 2024
0040b2c
cleanup
lucasmcdonald3 Feb 26, 2024
9131433
cleanup
lucasmcdonald3 Feb 26, 2024
e6826eb
poc impl
lucasmcdonald3 Feb 28, 2024
a9fa1a5
passing
lucasmcdonald3 Feb 28, 2024
4eeb858
cleanup
lucasmcdonald3 Feb 28, 2024
21a8c93
protect
lucasmcdonald3 Feb 29, 2024
de870b8
ex
lucasmcdonald3 Feb 29, 2024
eedf1a3
changes
lucasmcdonald3 Feb 29, 2024
1db73eb
changes
lucasmcdonald3 Feb 29, 2024
8415c2c
cleanup
lucasmcdonald3 Feb 29, 2024
20bdaff
cleanup
lucasmcdonald3 Feb 29, 2024
6bf6094
cleanup
lucasmcdonald3 Feb 29, 2024
febe6db
cleanup
lucasmcdonald3 Feb 29, 2024
dc8abca
cleanup
lucasmcdonald3 Feb 29, 2024
8ff46f4
cleanup
lucasmcdonald3 Feb 29, 2024
aba7ccc
cleanup
lucasmcdonald3 Feb 29, 2024
40fecc0
all message format versions
lucasmcdonald3 Feb 29, 2024
52043b9
sync upstream
lucasmcdonald3 Feb 29, 2024
14c287d
Merge
lucasmcdonald3 Mar 13, 2024
2d26009
Merge branch 'lucmcdon/mpl' into lucmcdon/mpl-requiredec
lucasmcdonald3 Mar 13, 2024
7374fcb
unit tests
lucasmcdonald3 Mar 26, 2024
f9d60a8
lint
lucasmcdonald3 Mar 26, 2024
16725f8
lint
lucasmcdonald3 Mar 26, 2024
1706db2
lint
lucasmcdonald3 Mar 26, 2024
06e0842
lint
lucasmcdonald3 Mar 26, 2024
5ad8e3a
Update examples/src/keyrings/hierarchical_keyring.py
lucasmcdonald3 Apr 15, 2024
280e038
Update examples/src/keyrings/hierarchical_keyring.py
lucasmcdonald3 Apr 16, 2024
0dfeb5d
Adding test for KMS keyring
RitvikKapila Apr 18, 2024
18328ad
chore: KMS keyring example
RitvikKapila Apr 19, 2024
a7feaaf
chore: verified flake8 and isort checks for aws_kms_keyring_example.py
RitvikKapila Apr 19, 2024
cad5a88
chore: valid isort and flake8 for all files
RitvikKapila Apr 19, 2024
1c43dd9
chore: minor comment fixes
RitvikKapila Apr 19, 2024
99559ca
Merge branch 'mpl-reviewed' into rkapila/mpl-requiredec
RitvikKapila Apr 26, 2024
ef141b9
Update test_streaming_client_stream_decryptor.py
RitvikKapila Apr 26, 2024
4d3d3b5
Update test_streaming_client_stream_decryptor.py
RitvikKapila Apr 26, 2024
67afc50
fix
RitvikKapila Apr 30, 2024
4258d59
fix: ci, delete appveyor.yml, updated documentation
RitvikKapila Apr 30, 2024
30420f9
Merge branch 'mpl-reviewed' into rkapila/mpl-requiredec
RitvikKapila May 1, 2024
84f09d7
Update examples/src/keyrings/aws_kms_keyring_example.py
RitvikKapila May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .coveragerc file when running coverage WITHOUT coverage for the MPL
# This prevents the ESDK without the MPL from considering the MPL-specific modules as "missed" coverage
[run]
omit = */aws_encryption_sdk/materials_managers/mpl/*

[report]
omit = */aws_encryption_sdk/materials_managers/mpl/*
1 change: 1 addition & 0 deletions .coveragercmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# .coveragerc file when running coverage WITH coverage for the MPL
33 changes: 30 additions & 3 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ jobs:
matrix:
os:
- ubuntu-latest
- windows-latest
# Windows fails due to "No module named 'Wrappers'"
# This SHOULD be fixed once Dafny generates fully-qualified import statements
# (i.e. doo files, per-package module names)
# Disable for now
# - windows-latest
- macos-latest
python:
- 3.7
Expand All @@ -41,17 +45,40 @@ jobs:
category:
- local
- accept
- mpllocal
# These require credentials.
# Enable them once we sort how to provide them.
# - integ
# - examples
# Append '-mpl' to some test environments.
# This suffix signals to tox to install the MPL in the test environment.
optional_mpl_dependency:
- ""
- -mpl
exclude:
# x86 builds are only meaningful for Windows
- os: ubuntu-latest
architecture: x86
- os: macos-latest
architecture: x86
# MPL is not supported on <3.11
- python: 3.7
optional_mpl_dependency: -mpl
- python: 3.8
optional_mpl_dependency: -mpl
- python: 3.9
optional_mpl_dependency: -mpl
- python: 3.10
optional_mpl_dependency: -mpl
# mpllocal requires the MPL to be installed
- category: mpllocal
optional_mpl_dependency: ""
steps:
# Support long Dafny filenames (used in MPL and DBESDK repos)
- name: Support longpaths
run: |
git config --global core.longpaths true

- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
Expand All @@ -62,7 +89,7 @@ jobs:
pip install --upgrade -r dev_requirements/ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
TOXENV: ${{ matrix.category }}${{ matrix.optional_mpl_dependency }}
run: tox -- -vv
upstream-py311:
runs-on: ubuntu-latest
Expand All @@ -82,5 +109,5 @@ jobs:
pip install --upgrade -r dev_requirements/ci-requirements.txt
- name: run test
env:
TOXENV: ${{ matrix.category }}
TOXENV: ${{ matrix.category }}${{ matrix.optional_mpl_dependency }}
run: tox -- -vv
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ docs/build
__pycache__
*.egg-info

# Coverage.py
.coverage*
# Coverage.py, NOT .coveragerc nor .coveragercmpl
.coverage
.coverage.py

# MyPy
.mypy_cache
Expand Down
28 changes: 28 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,58 @@ batch:
buildspec: codebuild/py311/integ.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py311_integ_mpl
buildspec: codebuild/py311/integ_mpl.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py311_examples
buildspec: codebuild/py311/examples.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py311_examples_mpl
buildspec: codebuild/py311/examples_mpl.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py311_awses_latest
buildspec: codebuild/py311/awses_local.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py311_awses_latest_mpl
buildspec: codebuild/py311/awses_local_mpl.yml
env:
image: aws/codebuild/standard:7.0

- identifier: py312_integ
buildspec: codebuild/py312/integ.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py312_integ_mpl
buildspec: codebuild/py312/integ_mpl.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py312_examples
buildspec: codebuild/py312/examples.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py312_examples_mpl
buildspec: codebuild/py312/examples_mpl.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py312_awses_latest
buildspec: codebuild/py312/awses_local.yml
env:
image: aws/codebuild/standard:7.0
- identifier: py312_awses_latest_mpl
buildspec: codebuild/py312/awses_local_mpl.yml
env:
image: aws/codebuild/standard:7.0

- identifier: code_coverage
buildspec: codebuild/coverage/coverage.yml
- identifier: code_coverage_mpl
buildspec: codebuild/coverage/coverage_mpl.yml
env:
image: aws/codebuild/standard:7.0

- identifier: compliance
buildspec: codebuild/compliance/compliance.yml
14 changes: 14 additions & 0 deletions codebuild/coverage/coverage_mpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 0.2

env:
variables:
TOXENV: "mplcoverage-mpl"

phases:
install:
runtime-versions:
python: 3.11
build:
commands:
- pip install "tox < 4.0"
- tox
26 changes: 26 additions & 0 deletions codebuild/py311/awses_local_mpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 0.2

env:
variables:
TOXENV: "py311-awses_local-mpl"
REGION: "us-west-2"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_API_DEPLOYMENT_ID: "xi1mwx3ttb"
AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_REGION: "us-west-2"

phases:
install:
runtime-versions:
python: 3.11
build:
commands:
- pip install "tox < 4.0"
- cd test_vector_handlers
- tox
34 changes: 34 additions & 0 deletions codebuild/py311/examples_mpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 0.2

env:
variables:
# No TOXENV. This runs multiple environments.
REGION: "us-west-2"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7

phases:
install:
runtime-versions:
python: 3.11
build:
commands:
- pip install "tox < 4.0"
# Run non-MPL-specific tests with the MPL installed
- tox -e py311-examples-mpl
# Assume special role to access keystore
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Python-Role-us-west-2" --role-session-name "CB-Py311ExamplesMpl")
- export TMP_ROLE
- export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId')
- export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey')
- export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken')
- aws sts get-caller-identity
# Run MPL-specific tests with special role
- tox -e py311-mplexamples-mpl

23 changes: 23 additions & 0 deletions codebuild/py311/integ_mpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 0.2

env:
variables:
TOXENV: "py311-integ-mpl"
REGION: "us-west-2"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7

phases:
install:
runtime-versions:
python: 3.11
build:
commands:
- pip install "tox < 4.0"
- tox
33 changes: 33 additions & 0 deletions codebuild/py312/awses_local_mpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Runs the same tests as awses_local in an environment with the MPL installed.
# This asserts existing tests continue to pass with the MPL installed.
version: 0.2

env:
variables:
TOXENV: "py312-awses_local-mpl"
REGION: "us-west-2"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_API_DEPLOYMENT_ID: "xi1mwx3ttb"
AWS_ENCRYPTION_SDK_PYTHON_DECRYPT_ORACLE_REGION: "us-west-2"

phases:
install:
runtime-versions:
python: latest
build:
commands:
- cd /root/.pyenv/plugins/python-build/../.. && git pull && cd -
- pyenv install --skip-existing 3.12.0
- pyenv local 3.12.0
- pip install --upgrade pip
- pip install setuptools
- pip install "tox < 4.0"
- cd test_vector_handlers
- tox
41 changes: 41 additions & 0 deletions codebuild/py312/examples_mpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Runs the same tests as examples in an environment with the MPL installed
# to assert existing tests continue to pass with the MPL installed.
# Then, run MPL-specific tests.
version: 0.2

env:
variables:
# No TOXENV. This runs multiple environments.
REGION: "us-west-2"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7

phases:
install:
runtime-versions:
python: latest
build:
commands:
- cd /root/.pyenv/plugins/python-build/../.. && git pull && cd -
- pyenv install --skip-existing 3.12.0
- pyenv local 3.12.0
- pip install --upgrade pip
- pip install setuptools
- pip install "tox < 4.0"
# Run non-MPL-specific tests with the MPL installed
- tox -e py312-examples-mpl
# Assume special role to access keystore
- TMP_ROLE=$(aws sts assume-role --role-arn "arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Python-Role-us-west-2" --role-session-name "CB-Py311ExamplesMpl")
- export TMP_ROLE
- export AWS_ACCESS_KEY_ID=$(echo "${TMP_ROLE}" | jq -r '.Credentials.AccessKeyId')
- export AWS_SECRET_ACCESS_KEY=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SecretAccessKey')
- export AWS_SESSION_TOKEN=$(echo "${TMP_ROLE}" | jq -r '.Credentials.SessionToken')
- aws sts get-caller-identity
# Run MPL-specific tests with special role
- tox -e py312-mplexamples-mpl
30 changes: 30 additions & 0 deletions codebuild/py312/integ_mpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Runs the same tests as integ in an environment with the MPL installed.
# This asserts existing tests continue to pass with the MPL installed.
version: 0.2

env:
variables:
TOXENV: "py312-integ-mpl"
REGION: "us-west-2"
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7

phases:
install:
runtime-versions:
python: latest
build:
commands:
- cd /root/.pyenv/plugins/python-build/../.. && git pull && cd -
- pyenv install --skip-existing 3.12.0
- pyenv local 3.12.0
- pip install --upgrade pip
- pip install setuptools
- pip install "tox < 4.0"
- tox
3 changes: 3 additions & 0 deletions examples/src/keyrings/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""Stub module indicator to make linter configuration simpler."""
Loading
Loading