Skip to content

Conversation

@texastony
Copy link
Contributor

  • chore: use HTTPS for spec
  • remove spec
  • duvet: point specification to private
  • chore(duvet): modernize duvet

@texastony texastony requested a review from a team as a code owner January 30, 2026 20:47
@texastony texastony changed the title tonyknap/duvet v3 chore(duvet): modernize duvet Jan 30, 2026
… collision check

- Split isV1V2InObjectMetadata() into separate isV1InObjectMetadata() and isV2InObjectMetadata() methods that properly check for version-exclusive keys
- Add hasExclusiveKeyCollision() to detect when multiple version-exclusive keys (x-amz-key, x-amz-key-v2, x-amz-3) are present in metadata
- Update decode() to throw exception when exclusive key collision is detected (requirement 106)
- Fix Duvet annotations for requirements 102, 103, 104, and 106
- Update tests to use new version detection methods
…ag length bug

- Add annotation for V1 format exclusive key requirement in MetadataKeyConstants
- Fix bug: tag length was incorrectly written for CBC (should only be for GCM)
- Add annotations for both GCM and CBC tag length requirements in ContentMetadataEncodingStrategy
Add Duvet annotation for requirement: 'If a mapkey exclusive to other
(non-V3) format versions is present, the S3EC SHOULD throw an exception.'

Implementation: MetadataKeyConstants.isV3Format() checks that V1/V2 keys
are not present when validating V3 format at ContentMetadataDecodingStrategy
line 92.

Test coverage: Existing testExclusiveKeysCollision validates exception
is thrown for conflicting version keys.
…ement

Add Duvet annotations for requirement: 'The mapkey "x-amz-unencrypted-content-length"
SHOULD be present for V2 format objects.'

Annotations marked as type=exception since the implementation does not write or
check this field for V2 objects.

Locations:
- ContentMetadataDecodingStrategy line 277-279 (V2 decoding)
- ContentMetadataEncodingStrategy line 228-230 (V2 encoding)

Test coverage: Existing V2 format tests validate decoding without this field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant