test(test-server): cross-language coverage for material-description decoding - #200
Draft
lucasmcdonald3 wants to merge 10 commits into
Draft
test(test-server): cross-language coverage for material-description decoding#200lucasmcdonald3 wants to merge 10 commits into
lucasmcdonald3 wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new cross-language integration test to the test-server/java-tests harness to ensure all language runtimes cleanly reject (modeled S3EncryptionClientError) objects whose x-amz-matdesc metadata has been tampered to RFC 2047 encoded-words that decode to byte sequences ending with a high-bit byte, rather than crashing or returning generic server failures.
Changes:
- Introduces
MaterialDescriptionTamperTestswith an encrypt phase that writes one V2 GCM (KMS) object per runtime. - Adds an
@AfterAlltamper step that rewrites onlyx-amz-matdescon copied objects using malicious RFC 2047 encoded-word payloads. - Adds a decrypt phase that asserts every runtime fails via
Decrypt_failsfor each tampered copy (i.e., modeled error vs. unexpected failure).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lucasmcdonald3
force-pushed
the
test/material-description-decoding-coverage
branch
from
July 27, 2026 16:56
2890b7c to
1cc5271
Compare
…ription Encrypt one V2-format and one V3-format object, corrupt the metadata that holds the material description, then confirm every language server rejects each object with a modeled error instead of crashing. Covers both formats by encrypting two objects rather than one per language.
lucasmcdonald3
force-pushed
the
test/material-description-decoding-coverage
branch
from
July 27, 2026 17:04
1cc5271 to
a802559
Compare
lucasmcdonald3
marked this pull request as draft
July 27, 2026 17:05
added 2 commits
July 27, 2026 17:21
…client decryptClientId built the decrypt client with FORBID_ENCRYPT_ALLOW_DECRYPT and no encryption algorithm. Servers that default to a committing suite (Python/Java/.NET V4) reject that combination at client creation, so v2/v3TamperedMaterialDescriptionIsRejected failed before decryption was attempted. Pin ALG_AES_256_GCM_IV12_TAG16_NO_KDF so the policy is self-consistent; ALLOW_DECRYPT still reads both the V2 and the committed V3 tampered objects.
lucasmcdonald3
force-pushed
the
test/material-description-decoding-coverage
branch
from
July 27, 2026 17:57
506e49b to
fa038dc
Compare
…erify Go: aws/amazon-s3-encryption-client-go#85 (aea828bfeffe4bde5afbbfebf8e08ef644a649ad). PHP: fork PR#1 (411d948378d7412f94d8c4fb23f64442b9a90f0f). Ruby: fork PR#1 (1139087e071c971308d107352cc41219710886c9).
lucasmcdonald3
force-pushed
the
test/material-description-decoding-coverage
branch
from
July 27, 2026 18:00
fa038dc to
4044f5f
Compare
added 6 commits
July 27, 2026 22:33
…escription in php servers Map "Unable to decode the material description" to S3EncryptionClientError in both php get_object handlers. The php sdk rejects a malformed material description with that message; without a mapping entry the rejection fell through to GenericServerError (HTTP 500) and MaterialDescriptionTamperTests failed for both php servers. Bump the php sdk submodule to the fix-branch tip merged with the latest aws/aws-sdk-php master (3.389.1).
The blanket submodule bump moved the specification submodule, changing requirement text so existing duvet annotation quotes no longer matched (make duvet errored). Restore the pin to the value the base branch uses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CURLOPT_*request options they passed (failing every request)