Skip to content

Commit 986f54c

Browse files
feat(test_vector_handlers): TestVectors test with MPL constructs (#650)
1 parent 2a35192 commit 986f54c

File tree

73 files changed

+2971
-90
lines changed

Some content is hidden

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

73 files changed

+2971
-90
lines changed

buildspec.yml

Lines changed: 241 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ version: 0.2
22

33
batch:
44
fast-fail: false
5-
build-list:
5+
build-graph:
6+
7+
# 3.7
68
- identifier: py37_integ
79
buildspec: codebuild/py37/integ.yml
810
env:
@@ -11,11 +13,36 @@ batch:
1113
buildspec: codebuild/py37/examples.yml
1214
env:
1315
image: aws/codebuild/standard:5.0
14-
- identifier: py37_awses_local
15-
buildspec: codebuild/py37/awses_local.yml
16+
- identifier: py37_decrypt_dafny_esdk_vectors
17+
buildspec: codebuild/py37/decrypt_dafny_esdk_vectors.yml
18+
env:
19+
image: aws/codebuild/standard:5.0
20+
- identifier: py37_decrypt_net_401_vectors
21+
buildspec: codebuild/py37/decrypt_net_401_vectors.yml
22+
env:
23+
image: aws/codebuild/standard:5.0
24+
- identifier: py37_encrypt_masterkey
25+
buildspec: codebuild/py37/encrypt_masterkey.yml
26+
env:
27+
image: aws/codebuild/standard:5.0
28+
- identifier: py37_generate_decrypt_vectors_masterkey
29+
buildspec: codebuild/py37/generate_decrypt_vectors_masterkey.yml
30+
env:
31+
image: aws/codebuild/standard:5.0
32+
- identifier: py37_decrypt_masterkey_with_masterkey
33+
depend-on:
34+
- py37_generate_decrypt_vectors_masterkey
35+
buildspec: codebuild/py37/decrypt_masterkey_with_masterkey.yml
36+
env:
37+
image: aws/codebuild/standard:5.0
38+
- identifier: py37_decrypt_masterkey_with_js
39+
depend-on:
40+
- py37_generate_decrypt_vectors_masterkey
41+
buildspec: codebuild/py37/decrypt_masterkey_with_js.yml
1642
env:
1743
image: aws/codebuild/standard:5.0
1844

45+
# 3.8
1946
- identifier: py38_integ
2047
buildspec: codebuild/py38/integ.yml
2148
env:
@@ -24,11 +51,36 @@ batch:
2451
buildspec: codebuild/py38/examples.yml
2552
env:
2653
image: aws/codebuild/standard:5.0
27-
- identifier: py38_awses_local
28-
buildspec: codebuild/py38/awses_local.yml
54+
- identifier: py38_decrypt_dafny_esdk_vectors
55+
buildspec: codebuild/py38/decrypt_dafny_esdk_vectors.yml
56+
env:
57+
image: aws/codebuild/standard:5.0
58+
- identifier: py38_decrypt_net_401_vectors
59+
buildspec: codebuild/py38/decrypt_net_401_vectors.yml
60+
env:
61+
image: aws/codebuild/standard:5.0
62+
- identifier: py38_encrypt_masterkey
63+
buildspec: codebuild/py38/encrypt_masterkey.yml
64+
env:
65+
image: aws/codebuild/standard:5.0
66+
- identifier: py38_generate_decrypt_vectors_masterkey
67+
buildspec: codebuild/py38/generate_decrypt_vectors_masterkey.yml
68+
env:
69+
image: aws/codebuild/standard:5.0
70+
- identifier: py38_decrypt_masterkey_with_masterkey
71+
depend-on:
72+
- py38_generate_decrypt_vectors_masterkey
73+
buildspec: codebuild/py38/decrypt_masterkey_with_masterkey.yml
74+
env:
75+
image: aws/codebuild/standard:5.0
76+
- identifier: py38_decrypt_masterkey_with_js
77+
depend-on:
78+
- py38_generate_decrypt_vectors_masterkey
79+
buildspec: codebuild/py38/decrypt_masterkey_with_js.yml
2980
env:
3081
image: aws/codebuild/standard:5.0
3182

83+
# 3.9
3284
- identifier: py39_integ
3385
buildspec: codebuild/py39/integ.yml
3486
env:
@@ -37,10 +89,36 @@ batch:
3789
buildspec: codebuild/py39/examples.yml
3890
env:
3991
image: aws/codebuild/standard:5.0
40-
- identifier: py39_awses_latest
92+
- identifier: py39_decrypt_dafny_esdk_vectors
93+
buildspec: codebuild/py39/decrypt_dafny_esdk_vectors.yml
94+
env:
95+
image: aws/codebuild/standard:5.0
96+
- identifier: py39_decrypt_net_401_vectors
97+
buildspec: codebuild/py39/decrypt_net_401_vectors.yml
98+
env:
99+
image: aws/codebuild/standard:5.0
100+
- identifier: py39_encrypt_masterkey
101+
buildspec: codebuild/py39/encrypt_masterkey.yml
102+
env:
103+
image: aws/codebuild/standard:5.0
104+
- identifier: py39_generate_decrypt_vectors_masterkey
105+
buildspec: codebuild/py39/generate_decrypt_vectors_masterkey.yml
106+
env:
107+
image: aws/codebuild/standard:5.0
108+
- identifier: py39_decrypt_masterkey_with_masterkey
109+
depend-on:
110+
- py39_generate_decrypt_vectors_masterkey
111+
buildspec: codebuild/py39/decrypt_masterkey_with_masterkey.yml
112+
env:
113+
image: aws/codebuild/standard:5.0
114+
- identifier: py39_decrypt_masterkey_with_js
115+
depend-on:
116+
- py39_generate_decrypt_vectors_masterkey
117+
buildspec: codebuild/py39/decrypt_masterkey_with_js.yml
41118
env:
42119
image: aws/codebuild/standard:5.0
43120

121+
# 3.10
44122
- identifier: py310_integ
45123
buildspec: codebuild/py310/integ.yml
46124
env:
@@ -49,8 +127,32 @@ batch:
49127
buildspec: codebuild/py310/examples.yml
50128
env:
51129
image: aws/codebuild/standard:6.0
52-
- identifier: py310_awses_latest
53-
buildspec: codebuild/py310/awses_local.yml
130+
- identifier: py310_decrypt_dafny_esdk_vectors
131+
buildspec: codebuild/py310/decrypt_dafny_esdk_vectors.yml
132+
env:
133+
image: aws/codebuild/standard:6.0
134+
- identifier: py310_decrypt_net_401_vectors
135+
buildspec: codebuild/py310/decrypt_net_401_vectors.yml
136+
env:
137+
image: aws/codebuild/standard:6.0
138+
- identifier: py310_encrypt_masterkey
139+
buildspec: codebuild/py310/encrypt_masterkey.yml
140+
env:
141+
image: aws/codebuild/standard:6.0
142+
- identifier: py310_generate_decrypt_vectors_masterkey
143+
buildspec: codebuild/py310/generate_decrypt_vectors_masterkey.yml
144+
env:
145+
image: aws/codebuild/standard:6.0
146+
- identifier: py310_decrypt_masterkey_with_masterkey
147+
depend-on:
148+
- py310_generate_decrypt_vectors_masterkey
149+
buildspec: codebuild/py310/decrypt_masterkey_with_masterkey.yml
150+
env:
151+
image: aws/codebuild/standard:6.0
152+
- identifier: py310_decrypt_masterkey_with_js
153+
depend-on:
154+
- py310_generate_decrypt_vectors_masterkey
155+
buildspec: codebuild/py310/decrypt_masterkey_with_js.yml
54156
env:
55157
image: aws/codebuild/standard:6.0
56158

@@ -70,14 +172,75 @@ batch:
70172
buildspec: codebuild/py311/examples_mpl.yml
71173
env:
72174
image: aws/codebuild/standard:7.0
73-
- identifier: py311_awses_latest
74-
buildspec: codebuild/py311/awses_local.yml
175+
- identifier: py311_decrypt_dafny_esdk_vectors_masterkey
176+
buildspec: codebuild/py311/decrypt_dafny_esdk_vectors_masterkey.yml
177+
env:
178+
image: aws/codebuild/standard:7.0
179+
- identifier: py311_decrypt_dafny_esdk_vectors_keyrings
180+
buildspec: codebuild/py311/decrypt_dafny_esdk_vectors_keyrings.yml
181+
env:
182+
image: aws/codebuild/standard:7.0
183+
- identifier: py311_decrypt_net_401_vectors_masterkey
184+
buildspec: codebuild/py311/decrypt_net_401_vectors_masterkey.yml
75185
env:
76186
image: aws/codebuild/standard:7.0
77-
- identifier: py311_awses_latest_mpl
78-
buildspec: codebuild/py311/awses_local_mpl.yml
187+
- identifier: py311_decrypt_net_401_vectors_keyrings
188+
buildspec: codebuild/py311/decrypt_net_401_vectors_keyrings.yml
79189
env:
80190
image: aws/codebuild/standard:7.0
191+
- identifier: py311_encrypt_masterkey
192+
buildspec: codebuild/py311/encrypt_masterkey.yml
193+
env:
194+
image: aws/codebuild/standard:7.0
195+
- identifier: py311_encrypt_keyrings
196+
buildspec: codebuild/py311/encrypt_keyrings.yml
197+
env:
198+
image: aws/codebuild/standard:7.0
199+
- identifier: py311_generate_decrypt_vectors_masterkey
200+
buildspec: codebuild/py311/generate_decrypt_vectors_masterkey.yml
201+
env:
202+
image: aws/codebuild/standard:7.0
203+
- identifier: py311_decrypt_masterkey_with_masterkey
204+
depend-on:
205+
- py311_generate_decrypt_vectors_masterkey
206+
buildspec: codebuild/py311/decrypt_masterkey_with_masterkey.yml
207+
env:
208+
image: aws/codebuild/standard:7.0
209+
- identifier: py311_decrypt_masterkey_with_keyrings
210+
depend-on:
211+
- py311_generate_decrypt_vectors_masterkey
212+
buildspec: codebuild/py311/decrypt_masterkey_with_keyrings.yml
213+
env:
214+
image: aws/codebuild/standard:7.0
215+
- identifier: py311_decrypt_masterkey_with_js
216+
depend-on:
217+
- py311_generate_decrypt_vectors_masterkey
218+
buildspec: codebuild/py311/decrypt_masterkey_with_js.yml
219+
env:
220+
image: aws/codebuild/standard:7.0
221+
- identifier: py311_generate_decrypt_vectors_keyrings
222+
buildspec: codebuild/py311/generate_decrypt_vectors_keyrings.yml
223+
env:
224+
image: aws/codebuild/standard:7.0
225+
- identifier: py311_decrypt_keyrings_with_masterkey
226+
depend-on:
227+
- py311_generate_decrypt_vectors_keyrings
228+
buildspec: codebuild/py311/decrypt_keyrings_with_masterkey.yml
229+
env:
230+
image: aws/codebuild/standard:7.0
231+
- identifier: py311_decrypt_keyrings_with_keyrings
232+
depend-on:
233+
- py311_generate_decrypt_vectors_keyrings
234+
buildspec: codebuild/py311/decrypt_keyrings_with_keyrings.yml
235+
env:
236+
image: aws/codebuild/standard:7.0
237+
- identifier: py311_decrypt_keyrings_with_js
238+
depend-on:
239+
- py311_generate_decrypt_vectors_keyrings
240+
buildspec: codebuild/py311/decrypt_keyrings_with_js.yml
241+
env:
242+
image: aws/codebuild/standard:7.0
243+
81244

82245
- identifier: py312_integ
83246
buildspec: codebuild/py312/integ.yml
@@ -95,15 +258,76 @@ batch:
95258
buildspec: codebuild/py312/examples_mpl.yml
96259
env:
97260
image: aws/codebuild/standard:7.0
98-
- identifier: py312_awses_latest
99-
buildspec: codebuild/py312/awses_local.yml
261+
- identifier: py312_decrypt_dafny_esdk_vectors_masterkey
262+
buildspec: codebuild/py312/decrypt_dafny_esdk_vectors_masterkey.yml
100263
env:
101264
image: aws/codebuild/standard:7.0
102-
- identifier: py312_awses_latest_mpl
103-
buildspec: codebuild/py312/awses_local_mpl.yml
265+
- identifier: py312_decrypt_dafny_esdk_vectors_keyrings
266+
buildspec: codebuild/py312/decrypt_dafny_esdk_vectors_keyrings.yml
104267
env:
105268
image: aws/codebuild/standard:7.0
106-
269+
- identifier: py312_decrypt_net_401_vectors_masterkey
270+
buildspec: codebuild/py312/decrypt_net_401_vectors_masterkey.yml
271+
env:
272+
image: aws/codebuild/standard:7.0
273+
- identifier: py312_decrypt_net_401_vectors_keyrings
274+
buildspec: codebuild/py312/decrypt_net_401_vectors_keyrings.yml
275+
env:
276+
image: aws/codebuild/standard:7.0
277+
- identifier: py312_encrypt_masterkey
278+
buildspec: codebuild/py312/encrypt_masterkey.yml
279+
env:
280+
image: aws/codebuild/standard:7.0
281+
- identifier: py312_encrypt_keyrings
282+
buildspec: codebuild/py312/encrypt_keyrings.yml
283+
env:
284+
image: aws/codebuild/standard:7.0
285+
- identifier: py312_generate_decrypt_vectors_masterkey
286+
buildspec: codebuild/py312/generate_decrypt_vectors_masterkey.yml
287+
env:
288+
image: aws/codebuild/standard:7.0
289+
- identifier: py312_decrypt_masterkey_with_masterkey
290+
depend-on:
291+
- py312_generate_decrypt_vectors_masterkey
292+
buildspec: codebuild/py312/decrypt_masterkey_with_masterkey.yml
293+
env:
294+
image: aws/codebuild/standard:7.0
295+
- identifier: py312_decrypt_masterkey_with_keyrings
296+
depend-on:
297+
- py312_generate_decrypt_vectors_masterkey
298+
buildspec: codebuild/py312/decrypt_masterkey_with_keyrings.yml
299+
env:
300+
image: aws/codebuild/standard:7.0
301+
- identifier: py312_decrypt_masterkey_with_js
302+
depend-on:
303+
- py312_generate_decrypt_vectors_masterkey
304+
buildspec: codebuild/py312/decrypt_masterkey_with_js.yml
305+
env:
306+
image: aws/codebuild/standard:7.0
307+
- identifier: py312_generate_decrypt_vectors_keyrings
308+
buildspec: codebuild/py312/generate_decrypt_vectors_keyrings.yml
309+
env:
310+
image: aws/codebuild/standard:7.0
311+
- identifier: py312_decrypt_keyrings_with_masterkey
312+
depend-on:
313+
- py312_generate_decrypt_vectors_keyrings
314+
buildspec: codebuild/py312/decrypt_keyrings_with_masterkey.yml
315+
env:
316+
image: aws/codebuild/standard:7.0
317+
- identifier: py312_decrypt_keyrings_with_keyrings
318+
depend-on:
319+
- py312_generate_decrypt_vectors_keyrings
320+
buildspec: codebuild/py312/decrypt_keyrings_with_keyrings.yml
321+
env:
322+
image: aws/codebuild/standard:7.0
323+
- identifier: py312_decrypt_keyrings_with_js
324+
depend-on:
325+
- py312_generate_decrypt_vectors_keyrings
326+
buildspec: codebuild/py312/decrypt_keyrings_with_js.yml
327+
env:
328+
image: aws/codebuild/standard:7.0
329+
330+
107331
- identifier: code_coverage
108332
buildspec: codebuild/coverage/coverage.yml
109333
- identifier: code_coverage_mpl
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
version: 0.2
2+
# Runs Only the ESDK-NET v4.0.1 Decryption Vectors, testing Required EC CMM
3+
4+
env:
5+
variables:
6+
TOXENV: "py310-full_decrypt"
7+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID: >-
8+
arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f
9+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_KEY_ID_2: >-
10+
arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2
11+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_1: >-
12+
arn:aws:kms:us-west-2:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
13+
AWS_ENCRYPTION_SDK_PYTHON_INTEGRATION_TEST_AWS_KMS_MRK_KEY_ID_2: >-
14+
arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7
15+
git-credential-helper: yes
16+
secrets-manager:
17+
GITHUB_TOKEN: Github/lucasmcdonald3-fgpat:actions read
18+
19+
phases:
20+
install:
21+
runtime-versions:
22+
python: 3.10
23+
pre_build:
24+
commands:
25+
# Fetch test vectors from Dafny ESDK's most recent run
26+
# (Assuming the first result is most recent; seems to be correct...)
27+
- |
28+
MOST_RECENT_RUN_ID=$(curl -H "Accept: application/vnd.github+json" \
29+
-H "Authorization: token ${GITHUB_TOKEN}" \
30+
-H "X-GitHub-Api-Version: 2022-11-28" \
31+
"https://api.github.com/repos/aws/aws-encryption-sdk-dafny/actions/runs?branch=mainline&status=completed&page=1&exclude_pull_requests=true" \
32+
| jq 'first(.workflow_runs[] | select(.name=="Daily CI") | .id)')
33+
- |
34+
echo "DEBUG: Fetching artifact from run $MOST_RECENT_RUN_ID"
35+
- |
36+
MOST_RECENT_RUN_DOWNLOAD_URL=$(curl -H "Accept: application/vnd.github+json" \
37+
-H "Authorization: token $GITHUB_TOKEN" \
38+
-H "X-GitHub-Api-Version: 2022-11-28" \
39+
"https://api.github.com/repos/aws/aws-encryption-sdk-dafny/actions/runs/$MOST_RECENT_RUN_ID/artifacts?name=ubuntu-latest_vector_artifact" \
40+
| jq '.artifacts[0].archive_download_url')
41+
- |
42+
echo "DEBUG: Fetching artifact at $MOST_RECENT_RUN_DOWNLOAD_URL"
43+
- |
44+
curl -L -H "Accept: application/vnd.github+json" \
45+
-H "Authorization: token $GITHUB_TOKEN" \
46+
-H "X-GitHub-Api-Version: 2022-11-28" \
47+
$(echo $MOST_RECENT_RUN_DOWNLOAD_URL | tr -d '"') -o ubuntu-latest_test_vector_artifact.zip
48+
# This unzips to `net41.zip`.
49+
- unzip ubuntu-latest_test_vector_artifact
50+
# This unzips to `net41/`.
51+
- unzip net41.zip -d net41
52+
build:
53+
commands:
54+
- pip install "tox < 4.0"
55+
- cd test_vector_handlers
56+
- |
57+
tox -- \
58+
--input ../net41/manifest.json

0 commit comments

Comments
 (0)