Skip to content

Commit 04b3e11

Browse files
authored
Merge branch 'main' into jocorell/change-nightly-tasks
2 parents 7a442d0 + 4017a97 commit 04b3e11

File tree

5 files changed

+255939
-1
lines changed

5 files changed

+255939
-1
lines changed

.github/workflows/daily_ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,27 @@ jobs:
7676
uses: ./.github/workflows/ci_examples_net.yml
7777
with:
7878
dafny: ${{needs.getVersion.outputs.version}}
79+
notify:
80+
needs:
81+
[
82+
getVersion,
83+
getVerifyVersion,
84+
daily-ci-format,
85+
daily-ci-codegen,
86+
daily-ci-verification,
87+
daily-ci-test-vector-verification,
88+
daily-ci-java,
89+
daily-ci-java-test-vectors,
90+
daily-ci-java-examples,
91+
daily-ci-net,
92+
daily-ci-rust,
93+
daily-ci-go,
94+
daily-ci-net-test-vectors,
95+
daily-ci-net-examples,
96+
]
97+
if: ${{ failure() }}
98+
uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main
99+
with:
100+
message: "Daily CI failed on `${{ github.repository }}`. View run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
101+
secrets:
102+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_CI }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Issue Created Notification
2+
on:
3+
issues:
4+
types: [opened, reopened]
5+
issue_comment:
6+
types: [created]
7+
8+
jobs:
9+
notify-issue:
10+
if: github.event_name == 'issues'
11+
uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main
12+
with:
13+
message: "New github issue `${{ github.event.issue.title }}`. Link: ${{ github.event.issue.html_url }}"
14+
secrets:
15+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }}
16+
17+
notify-comment:
18+
if: github.event_name == 'issue_comment' && !github.event.issue.pull_request
19+
uses: aws/aws-cryptographic-material-providers-library/.github/workflows/slack-notification.yml@main
20+
with:
21+
message: "New comment on issue `${{ github.event.issue.title }}`. Link: ${{ github.event.comment.html_url }}"
22+
secrets:
23+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GHI }}

TestVectors/dafny/DDBEncryption/src/TestVectors.dfy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ module {:options "-functionSyntax:4"} DdbEncryptionTestVectors {
104104
var _ :- expect DecryptManifest.Decrypt("decrypt_java_33a.json", keyVectors);
105105
var _ :- expect DecryptManifest.Decrypt("decrypt_rust_38.json", keyVectors);
106106
var _ :- expect DecryptManifest.Decrypt("decrypt_go_38.json", keyVectors);
107+
var _ :- expect DecryptManifest.Decrypt("decrypt_java_39.json", keyVectors);
107108
var _ :- expect WriteManifest.Write("encrypt.json");
108109
var _ :- expect EncryptManifest.Encrypt("encrypt.json", "decrypt.json", "java", "3.3", keyVectors);
109110
var _ :- expect DecryptManifest.Decrypt("decrypt.json", keyVectors);

TestVectors/dafny/DDBEncryption/src/WriteManifest.dfy

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,34 @@ module {:options "-functionSyntax:4"} WriteManifest {
127127
},
128128
""allowedUnsignedAttributes"" : [""Stuff"", ""Junk""]
129129
}"
130+
// Configuration with a new encrypted attribute not present in basic config
131+
const ExpandedBasicConfig := @"{
132+
""attributeActionsOnEncrypt"": {
133+
""RecNum"": ""SIGN_ONLY"",
134+
""Stuff"": ""ENCRYPT_AND_SIGN"",
135+
""Junk"": ""ENCRYPT_AND_SIGN"",
136+
""NewThing"": ""ENCRYPT_AND_SIGN""
137+
}
138+
}"
139+
// Configuration with a new sign-only attribute not present in basic config
140+
const ExpandedSignConfig := @"{
141+
""attributeActionsOnEncrypt"": {
142+
""RecNum"": ""SIGN_ONLY"",
143+
""Stuff"": ""ENCRYPT_AND_SIGN"",
144+
""Junk"": ""ENCRYPT_AND_SIGN"",
145+
""NewThing"": ""SIGN_ONLY""
146+
}
147+
}"
148+
// Configuration with a new DO_NOTHING attribute not present in basic config
149+
const ExpandedDoNothingConfig := @"{
150+
""attributeActionsOnEncrypt"": {
151+
""RecNum"": ""SIGN_ONLY"",
152+
""Stuff"": ""ENCRYPT_AND_SIGN"",
153+
""Junk"": ""ENCRYPT_AND_SIGN"",
154+
""NewThing"": ""DO_NOTHING""
155+
},
156+
""allowedUnsignedAttributes"": [""NewThing""]
157+
}"
130158

131159
method TextToJson(x: string) returns (output : JSON)
132160
{
@@ -396,8 +424,16 @@ module {:options "-functionSyntax:4"} WriteManifest {
396424
var test12 := MakeTest("12", "positive-encrypt", "Basic encrypt V2 switching1", LongerV2Config1, BasicRecord, Some(LongerV2Config2));
397425
var test13 := MakeTest("13", "positive-encrypt", "Basic encrypt V2 switching2", LongerV2Config2, BasicRecord, Some(LongerV2Config1));
398426
var test14 := MakeTest("14", "positive-encrypt", "Special characters in attribute names", SpecialConfig, SpecialRecord);
427+
428+
var test15 := MakeTest("15", "positive-encrypt", "Add new ENCRYPT_AND_SIGN attribute", BasicConfig, BasicRecord, Some(ExpandedBasicConfig));
429+
var test16 := MakeTest("16", "positive-encrypt", "Add new SIGN_ONLY attribute", BasicConfig, BasicRecord, Some(ExpandedSignConfig));
430+
var test17 := MakeTest("17", "positive-encrypt", "Add new DO_NOTHING attribute", BasicConfig, BasicRecord, Some(ExpandedDoNothingConfig));
431+
var test18 := MakeTest("18", "positive-encrypt", "Remove ENCRYPT_AND_SIGN attribute, encrypt with expanded, decrypt with basic", ExpandedBasicConfig, BasicRecord, Some(BasicConfig));
432+
var test19 := MakeTest("19", "positive-encrypt", "Remove SIGN_ONLY attribute, encrypt with expanded, decrypt with basic", ExpandedSignConfig, BasicRecord, Some(BasicConfig));
433+
var test20 := MakeTest("20", "positive-encrypt", "Remove DO_NOTHING attribute, encrypt with expanded, decrypt with basic", ExpandedDoNothingConfig, BasicRecord, Some(BasicConfig));
434+
399435
var configTests := MakeConfigTests();
400-
var tests : seq<(string, JSON)> := [test1, test2, test3, test4, test5, test6, test7, test8, test9, test10, test11, test12, test13, test14] + configTests;
436+
var tests : seq<(string, JSON)> := [test1, test2, test3, test4, test5, test6, test7, test8, test9, test10, test11, test12, test13, test14, test15, test16, test17, test18, test19, test20] + configTests;
401437
var final := Object(result + [("tests", Object(tests))]);
402438

403439
var jsonBytes :- expect API.Serialize(final);

0 commit comments

Comments
 (0)