Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
53a2865
chore: s3ec v3 transtion and v4 improved tests
imabhichow Oct 17, 2025
1e5b2ea
comment cpp checkout
imabhichow Oct 27, 2025
e0e7ab3
bump s3ec-java commits
imabhichow Oct 27, 2025
5dbb019
chore: add duvet reports for s3ec-java (transition & improved)
imabhichow Sep 30, 2025
ddfdb9b
format
imabhichow Oct 27, 2025
009d1b2
git-ignore
imabhichow Oct 27, 2025
e12fa7d
Merge branch 'fireegg-test-servers' into imabhichow/java-v4-extended-…
imabhichow Oct 27, 2025
db6c65d
Merge branch 'fireegg-test-servers' into imabhichow/java-v4-extended-…
imabhichow Oct 29, 2025
a570537
update java submodule
imabhichow Oct 27, 2025
39fc548
fix configuration
imabhichow Oct 29, 2025
c755778
Revert "chore: reenable c++ (#52)"
imabhichow Oct 29, 2025
d72d851
remove java transiton for now
imabhichow Oct 30, 2025
0dc303f
fix configuration
imabhichow Oct 30, 2025
88c2bc5
fix configuration
imabhichow Oct 30, 2025
edd534e
Update test configuration
imabhichow Oct 30, 2025
12614dc
Duvet
imabhichow Nov 5, 2025
76387f0
Merge remote-tracking branch 'origin/fireegg-test-servers' into imabh…
imabhichow Nov 5, 2025
d0457ad
Rebase
imabhichow Nov 5, 2025
ec3dabf
Merge branch 'fireegg-test-servers' into imabhichow/java-v4-extended-…
imabhichow Nov 6, 2025
131d905
nit - format
imabhichow Nov 6, 2025
ebdaa64
Merge remote-tracking branch 'origin/fireegg-test-servers' into imabh…
imabhichow Nov 7, 2025
9acf8ad
Change java-v4-port
imabhichow Nov 7, 2025
398fc4e
duvet changes
imabhichow Nov 7, 2025
cd342a1
Dotnet change
imabhichow Nov 7, 2025
a8a025b
Merge branch 'fireegg-test-servers' into imabhichow/java-v4-extended-…
imabhichow Nov 7, 2025
2b1b810
remove symlink
imabhichow Nov 7, 2025
e0ee483
Fix Tests
imabhichow Nov 7, 2025
d3e02e2
Merge branch 'fireegg-test-servers' into imabhichow/java-v4-extended-…
rishav-karanjit Nov 7, 2025
ad5155f
Update test-server/net-v3-transition-server/Controllers/ClientControl…
rishav-karanjit Nov 10, 2025
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
9 changes: 7 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,16 @@
[submodule "test-server/java-v3-transition-server/s3ec-staging"]
path = test-server/java-v3-transition-server/s3ec-staging
url = git@github.com:aws/private-amazon-s3-encryption-client-java-staging.git
branch = s3ec/transitional
branch = imabhichow/s3ec-transition
[submodule "test-server/java-v4-server/s3ec-staging"]
path = test-server/java-v4-server/s3ec-staging
url = git@github.com:aws/private-amazon-s3-encryption-client-java-staging.git
branch = s3ec/improved
branch = imabhichow/add-kc
; branch = s3ec/improved
[submodule "test-server/java-v4-server/specification"]
path = test-server/java-v4-server/specification
url = git@github.com:awslabs/private-aws-encryption-sdk-specification-staging.git
branch = fire-egg-staging
[submodule "test-server/specification"]
path = test-server/specification
url = git@github.com:awslabs/private-aws-encryption-sdk-specification-staging.git
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void transition_configured_with_forbid_encrypt_allow_decrypt_should_decrypt_cbc(
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.enableLegacyUnauthenticatedModes(true)
.enableLegacyWrappingAlgorithms(true)
.build())
Expand All @@ -124,6 +125,7 @@ void improved_configured_with_forbid_encrypt_allow_decrypt_should_decrypt_cbc(Te
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.enableLegacyUnauthenticatedModes(true)
.enableLegacyWrappingAlgorithms(true)
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import software.amazon.encryption.s3.model.CommitmentPolicy;
import software.amazon.encryption.s3.model.CreateClientInput;
import software.amazon.encryption.s3.model.CreateClientOutput;
import software.amazon.encryption.s3.model.EncryptionAlgorithm;
import software.amazon.encryption.s3.model.GetObjectInput;
import software.amazon.encryption.s3.model.GetObjectOutput;
import software.amazon.encryption.s3.model.KeyMaterial;
Expand Down Expand Up @@ -99,6 +100,7 @@ public void GIVEN_CBCEncryptedData_AND_ImprovedClientDecryptingWithForbidEncrypt
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.enableLegacyWrappingAlgorithms(true)
.build()
)
Expand Down Expand Up @@ -135,6 +137,7 @@ public void GIVEN_GCMEncryptedData_AND_ImprovedClientDecryptingWithForbidEncrypt
.enableLegacyWrappingAlgorithms(true)
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String s3ECId = output1.getClientId();
Expand Down Expand Up @@ -203,6 +206,7 @@ public void GIVEN_KCGCMEncryptedData_AND_ImprovedClientDecryptingWithForbidEncry
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String decS3ECId = decClientOutput.getClientId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ void improved_configured_with_forbid_encrypt_allow_decrypt_should_encrypt_gcm(Te
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String S3ECId = clientOutput.getClientId();
Expand Down Expand Up @@ -123,6 +124,7 @@ void improved_configured_with_forbid_encrypt_allow_decrypt_should_decrypt_gcm(Te
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String S3ECId = clientOutput.getClientId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ void improved_configured_with_forbid_encrypt_allow_decrypt_should_decrypt_kc_gcm
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String S3ECId = clientOutput.getClientId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public void crossLanguageTestKms(LanguageServerTarget encLang, LanguageServerTar
.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build()
)
.build());
Expand All @@ -85,6 +86,7 @@ public void crossLanguageTestKms(LanguageServerTarget encLang, LanguageServerTar
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build()
)
.build());
Expand Down Expand Up @@ -120,6 +122,7 @@ public void crossLanguageTestKmsWithEncCtx(LanguageServerTarget encLang, Languag
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build()
)
.build());
Expand All @@ -137,6 +140,7 @@ public void crossLanguageTestKmsWithEncCtx(LanguageServerTarget encLang, Languag
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build()
)
.build());
Expand Down Expand Up @@ -176,6 +180,7 @@ public void crossLanguageTestKmsWithSubsetEncCtxFails(LanguageServerTarget encLa
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String encS3ECId = encClientOutput.getClientId();
Expand All @@ -192,6 +197,7 @@ public void crossLanguageTestKmsWithSubsetEncCtxFails(LanguageServerTarget encLa
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build()
)
.build());
Expand Down Expand Up @@ -232,6 +238,7 @@ public void crossLanguageTestKmsWithIncorrectEncCtxFails(LanguageServerTarget en
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build()
)
.build());
Expand All @@ -249,6 +256,7 @@ public void crossLanguageTestKmsWithIncorrectEncCtxFails(LanguageServerTarget en
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build()
)
.build());
Expand Down Expand Up @@ -288,6 +296,7 @@ public void kmsV1Legacy(TestUtils.LanguageServerTarget language) {
.enableLegacyWrappingAlgorithms(true)
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String s3ECId = output1.getClientId();
Expand Down Expand Up @@ -331,6 +340,7 @@ public void kmsV1LegacyWithEncCtx(TestUtils.LanguageServerTarget language) {
.enableLegacyWrappingAlgorithms(true)
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String s3ECId = output1.getClientId();
Expand Down Expand Up @@ -381,6 +391,7 @@ public void kmsV1LegacyFailsWhenLegacyDisabled(TestUtils.LanguageServerTarget la
.enableLegacyWrappingAlgorithms(false)
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String s3ECId = output1.getClientId();
Expand Down Expand Up @@ -444,6 +455,7 @@ public void instructionFileReadV2Format(TestUtils.LanguageServerTarget language)
.enableLegacyWrappingAlgorithms(true)
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String s3ECId = output1.getClientId();
Expand Down Expand Up @@ -508,6 +520,7 @@ public void instructionFileWriteAndRead(LanguageServerTarget encLang, LanguageSe
.config(S3ECConfig.builder()
.keyMaterial(kmsKeyArn)
.commitmentPolicy(CommitmentPolicy.FORBID_ENCRYPT_ALLOW_DECRYPT)
.encryptionAlgorithm(EncryptionAlgorithm.ALG_AES_256_GCM_IV12_TAG16_NO_KDF)
.build())
.build());
String decS3ECId = decOutput.getClientId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public class TestUtils {

public static final Set<String> IMPROVED_VERSIONS =
Set.of(
// JAVA_V4,
JAVA_V4,
// PYTHON_V3,
GO_V4,
// NET_V4,
Expand All @@ -166,12 +166,12 @@ public class TestUtils {
servers.put(RUBY_V3, new LanguageServerTarget(RUBY_V3, "8092"));
servers.put(PHP_V3, new LanguageServerTarget(PHP_V3, "8093"));
// TODO: Create and add transition servers
servers.put(JAVA_V3_TRANSITION, new LanguageServerTarget(JAVA_V3_TRANSITION, "8094"));
// servers.put(JAVA_V3_TRANSITION, new LanguageServerTarget(JAVA_V3_TRANSITION, "8094"));
// servers.put(GO_V3_TRANSITION, new LanguageServerTarget(GO_V3_TRANSITION, "8095"));
// servers.put(NET_V2_TRANSITION, new LanguageServerTarget(NET_V2_TRANSITION, "8096"));
servers.put(RUBY_V2_TRANSITION, new LanguageServerTarget(RUBY_V2_TRANSITION, "8098"));
servers.put(PHP_V2_TRANSITION, new LanguageServerTarget(PHP_V2_TRANSITION, "8099"));
servers.put(JAVA_V4, new LanguageServerTarget(JAVA_V4, "8090"));
servers.put(JAVA_V4, new LanguageServerTarget(JAVA_V4, "8088"));
servers.put(NET_V3_TRANSITION, new LanguageServerTarget(NET_V3_TRANSITION, "8100"));
serverMap = filterServers(servers);

Expand Down
10 changes: 5 additions & 5 deletions test-server/java-v3-server/.duvet/config.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
'$schema' = "https://awslabs.github.io/duvet/config/v0.4.0.json"

[[source]]
pattern = "**/*.java"
pattern = "s3ec-staging/*.java"

# Include required specifications here
[[specification]]
source = "../specification/s3-encryption/data-format/content-metadata.md"
source = "specification/s3-encryption/data-format/content-metadata.md"
[[specification]]
source = "../specification/s3-encryption/data-format/metadata-strategy.md"
source = "specification/s3-encryption/data-format/metadata-strategy.md"
[[specification]]
source = "../specification/s3-encryption/encryption.md"
source = "specification/s3-encryption/encryption.md"
[[specification]]
source = "../specification/s3-encryption/key-derivation.md"
source = "specification/s3-encryption/key-derivation.md"
Comment on lines 6 to +14

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Include required specifications here
[[specification]]
source = "../specification/s3-encryption/data-format/content-metadata.md"
source = "specification/s3-encryption/data-format/content-metadata.md"
[[specification]]
source = "../specification/s3-encryption/data-format/metadata-strategy.md"
source = "specification/s3-encryption/data-format/metadata-strategy.md"
[[specification]]
source = "../specification/s3-encryption/encryption.md"
source = "specification/s3-encryption/encryption.md"
[[specification]]
source = "../specification/s3-encryption/key-derivation.md"
source = "specification/s3-encryption/key-derivation.md"
# Include required specifications here
[[specification]]
source = "specification/s3-encryption/client.md"
[[specification]]
source = "specification/s3-encryption/decryption.md"
[[specification]]
source = "specification/s3-encryption/encryption.md"
[[specification]]
source = "specification/s3-encryption/key-commitment.md"
[[specification]]
source = "specification/s3-encryption/key-derivation.md"
[[specification]]
source = "specification/s3-encryption/data-format/content-metadata.md"
[[specification]]
source = "specification/s3-encryption/data-format/metadata-strategy.md"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this. This is current Java V3 server for which I don't care about duvet


[report.html]
enabled = true
Expand Down
1 change: 1 addition & 0 deletions test-server/java-v3-server/specification
3 changes: 3 additions & 0 deletions test-server/java-v3-transition-server/.duvet/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
reports/
requirements/
specification/
27 changes: 27 additions & 0 deletions test-server/java-v3-transition-server/.duvet/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'$schema' = "https://awslabs.github.io/duvet/config/v0.4.0.json"

[[source]]
pattern = "s3ec-staging/*.java"

# Include required specifications here
[[specification]]
source = "specification/s3-encryption/client.md"
[[specification]]
source = "specification/s3-encryption/decryption.md"
[[specification]]
source = "specification/s3-encryption/encryption.md"
[[specification]]
source = "specification/s3-encryption/key-commitment.md"
[[specification]]
source = "specification/s3-encryption/key-derivation.md"
[[specification]]
source = "specification/s3-encryption/data-format/content-metadata.md"
[[specification]]
source = "specification/s3-encryption/data-format/metadata-strategy.md"

[report.html]
enabled = true

# Enable snapshots to prevent requirement coverage regressions
[report.snapshot]
enabled = false
1 change: 1 addition & 0 deletions test-server/java-v3-transition-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/
13 changes: 9 additions & 4 deletions test-server/java-v3-transition-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ PORT := 8094

build-s3ec:
@echo "Building S3EC from source..."
cd s3ec-staging && mvn --batch-mode -no-transfer-progress clean compile
cd s3ec-staging && mvn -B -ntp install -DskipTests
cd s3ec-staging && mvn --batch-mode -no-transfer-progress clean compile && mvn -B -ntp install -DskipTests
@echo "S3EC build completed."

start-server: build-s3ec
@echo "Starting Java V3 server..."
@echo "Starting Java V3 Transition server..."
AWS_ACCESS_KEY_ID="$$AWS_ACCESS_KEY_ID" \
AWS_SECRET_ACCESS_KEY="$$AWS_SECRET_ACCESS_KEY" \
AWS_SESSION_TOKEN="$$AWS_SESSION_TOKEN" \
AWS_REGION="us-west-2" \
./gradlew --build-cache --parallel run & echo $$! > $(PID_FILE)
@echo "Java V3 server starting..."
@echo "Java V3 Transition server starting..."

stop-server:
@if [ -f $(PID_FILE) ]; then \
Expand All @@ -28,3 +27,9 @@ stop-server:

wait-for-server:
$(MAKE) -C .. wait-for-port PORT=$(PORT)

duvet:
duvet report

view-report-mac:
open .duvet/reports/report.html
2 changes: 1 addition & 1 deletion test-server/java-v3-transition-server/s3ec-staging
1 change: 1 addition & 0 deletions test-server/java-v3-transition-server/specification
Loading
Loading