Skip to content

Commit 4849825

Browse files
authored
Update to latest Ruby unit tests (#53)
* Update to latest Ruby unit tests * update to add security policy and tests * Latest ruby with more tests * All the specs * Latest tests
1 parent b131869 commit 4849825

4 files changed

Lines changed: 18 additions & 7 deletions

File tree

test-server/ruby-v3-server/.duvet/config.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@
44
pattern = "local-ruby-sdk/gems/aws-sdk-s3/lib/**/*.rb"
55
comment-style = { meta = "##=", content = "##%" }
66

7+
[[source]]
8+
pattern = "local-ruby-sdk/gems/aws-sdk-s3/spec/**/*.rb"
9+
comment-style = { meta = "##=", content = "##%" }
10+
711
# Include required specifications here
812
[[specification]]
9-
source = "../specification/s3-encryption/data-format/content-metadata.md"
13+
source = "../specification/s3-encryption/client.md"
1014
[[specification]]
11-
source = "../specification/s3-encryption/data-format/metadata-strategy.md"
15+
source = "../specification/s3-encryption/decryption.md"
1216
[[specification]]
1317
source = "../specification/s3-encryption/encryption.md"
1418
[[specification]]
15-
source = "../specification/s3-encryption/decryption.md"
19+
source = "../specification/s3-encryption/key-commitment.md"
1620
[[specification]]
1721
source = "../specification/s3-encryption/key-derivation.md"
1822
[[specification]]
19-
source = "../specification/s3-encryption/key-commitment.md"
23+
source = "../specification/s3-encryption/data-format/content-metadata.md"
24+
[[specification]]
25+
source = "../specification/s3-encryption/data-format/metadata-strategy.md"
2026

2127

2228
[report.html]

test-server/ruby-v3-server/lib/client_manager.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ def create_client(config)
3737
else
3838
raise "Unsupported commitment_policy " + config['commitmentPolicy']
3939
end
40+
if config['commitmentPolicy'] == 'FORBID_ENCRYPT_ALLOW_DECRYPT' && config['encryptionAlgorithm'].nil?
41+
hash[:content_encryption_schema] = :aes_gcm_no_padding
42+
end
4043
end
4144
if !config['enableLegacyWrappingAlgorithms'].nil? || !config['enableLegacyUnauthenticatedModes'].nil?
42-
hash[:legacy_modes] = config['enableLegacyWrappingAlgorithms'] || config['enableLegacyUnauthenticatedModes']
45+
legacy_modes = config['enableLegacyWrappingAlgorithms'] || config['enableLegacyUnauthenticatedModes']
46+
# Set security profile based on legacy wrapping algorithms setting
47+
hash[:security_profile] = legacy_modes ? :v3_and_legacy : :v3
4348
end
4449
end
4550

0 commit comments

Comments
 (0)