Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cc893d2
add v3 metadata work
josecorella Sep 25, 2025
ce8de2a
use a v3 client
josecorella Sep 25, 2025
39395be
point to newer v3
josecorella Sep 25, 2025
0beaa78
use v3 kms material provider
josecorella Sep 26, 2025
3f0d1fb
ci
josecorella Sep 26, 2025
783146a
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Sep 26, 2025
763400c
php v3 supports ec on decrypt
josecorella Sep 26, 2025
bcf798b
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Sep 26, 2025
1cba877
fix sdk
josecorella Sep 26, 2025
16ba37b
debug
josecorella Sep 26, 2025
f070bc5
fix error wrapping
josecorella Sep 29, 2025
28f92c4
add v3 client and have it pass ec tests
josecorella Sep 29, 2025
a9317bd
update tests
josecorella Sep 29, 2025
633cf25
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Sep 29, 2025
05061a5
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Sep 29, 2025
2039046
fix
josecorella Sep 30, 2025
d83e9c4
newer sdk
josecorella Sep 30, 2025
5229b39
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Sep 30, 2025
8703db9
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Sep 30, 2025
c4556f6
newer sdk
josecorella Sep 30, 2025
1acb64c
point to newer
josecorella Sep 30, 2025
150604c
more
josecorella Sep 30, 2025
b103cda
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Sep 30, 2025
592fbe3
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Oct 1, 2025
c1aa005
fixed
josecorella Oct 1, 2025
b12a55a
php sdk fix
josecorella Oct 2, 2025
b7c1adc
newer sdk
josecorella Oct 2, 2025
e0b05a0
Merge branch 'fireegg-test-servers' into jocorell/php-metadata-strategy
josecorella Oct 3, 2025
12c1f3d
newer sdk
josecorella Oct 6, 2025
cea715a
newer sdk
josecorella Oct 8, 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
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ public void kmsV1LegacyFailsWhenLegacyDisabled(String language) {
));
} else if (language.equals(RUBY_V3) || language.equals(RUBY_V2_CURRENT)) {
assertTrue(e.getMessage().contains("The requested object is encrypted with V1 encryption schemas that have been disabled by client configuration security_profile = :v2. Retry with :v2_and_legacy or re-encrypt the object."));
} else if (language.equals(PHP_V2_CURRENT) || language.equals(PHP_V3)) {
assertTrue(e.getMessage().contains("The requested object is encrypted with V1 encryption schemas that have been disabled by client configuration @SecurityProfile=V2. Retry with V2_AND_LEGACY enabled or reencrypt the object."));;
} else {
assertTrue(e.getMessage().contains("Enable legacy wrapping algorithms to use legacy key wrapping algorithm: kms"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class TestUtils {

// Sets of unsupported features by language
public static final Set<String> ENCRYPTION_CONTEXT_ON_DECRYPT_UNSUPPORTED =
Set.of(GO_V3_CURRENT, PHP_V2_CURRENT, PHP_V3, NET_V2_CURRENT, NET_V3);
Set.of(GO_V3_CURRENT, PHP_V2_CURRENT, NET_V2_CURRENT, NET_V3);

public static final Set<String> ENCRYPTION_CONTEXT_ON_ENCRYPT_UNSUPPORTED =
Set.of(NET_V2_CURRENT, NET_V3);
Expand Down
2 changes: 1 addition & 1 deletion test-server/php-v2-server/local-php-sdk
2 changes: 1 addition & 1 deletion test-server/php-v2-server/src/get_object.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function handleGetObject($params)
ob_end_clean();
}
if (strpos($e->getMessage(), "@SecurityProfile=V2") !== false) {
return S3EncryptionClientError($e->getMessage() . " " . "Enable legacy wrapping algorithms to use legacy key wrapping algorithm: kms");
return S3EncryptionClientError($e->getMessage());
} else {
return GenericServerError("Server argument: " . $e->getMessage(), 500);
}
Expand Down
9 changes: 9 additions & 0 deletions test-server/php-v3-server/.duvet/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ pattern = "local-php-sdk/src/S3/**/*.php"
[[source]]
pattern = "local-php-sdk/src/Crypto/**/*.php"

[[source]]
pattern = "local-php-sdk/tests/S3/**/*.php"

[[source]]
pattern = "local-php-sdk/tests/Crypto/**/*.php"

[[source]]
pattern = "local-php-sdk/compliance_exceptions/*.txt"

# Include required specifications here
[[specification]]
source = "../specification/s3-encryption/data-format/content-metadata.md"
Expand Down
2 changes: 1 addition & 1 deletion test-server/php-v3-server/local-php-sdk
5 changes: 4 additions & 1 deletion test-server/php-v3-server/src/get_object.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ function handleGetObject($params)
ob_end_clean();
}
if (strpos($e->getMessage(), "@SecurityProfile=V2") !== false) {
return S3EncryptionClientError($e->getMessage() . " " . "Enable legacy wrapping algorithms to use legacy key wrapping algorithm: kms");
return S3EncryptionClientError($e->getMessage());
}
if (strpos($e->getMessage(), "Provided encryption context does not match information retrieved from S3") !== false) {
return S3EncryptionClientError($e->getMessage());
} else {
return GenericServerError("Server argument: " . $e->getMessage(), 500);
}
Expand Down
12 changes: 6 additions & 6 deletions test-server/php-v3-server/src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
require_once __DIR__ . '/get_object.php';
require_once __DIR__ . '/put_object.php';

use Aws\S3\Crypto\S3EncryptionClientV2;
use Aws\Crypto\KmsMaterialsProviderV2;
use Aws\S3\Crypto\S3EncryptionClientV3;
use Aws\Crypto\KmsMaterialsProviderV3;
use Aws\S3\S3Client;
use Aws\Kms\KmsClient;

Expand Down Expand Up @@ -157,10 +157,10 @@ function getCachedClient($clientId)

// Recreate the AWS clients from stored configuration
$s3Client = new S3Client($config['s3Config']);
$encryptionClient = new S3EncryptionClientV2($s3Client);
$encryptionClient = new S3EncryptionClientV3($s3Client);

$kmsClient = new KmsClient($config['kmsConfig']);
$materialsProvider = new KmsMaterialsProviderV2($kmsClient, $config['kmsKeyId']);
$materialsProvider = new KmsMaterialsProviderV3($kmsClient, $config['kmsKeyId']);

return [
'encryptionClient' => $encryptionClient,
Expand All @@ -183,7 +183,7 @@ function createDefaultClientTuple(): array
]
]
]);
$encryptionClient = new S3EncryptionClientV2($s3Client);
$encryptionClient = new S3EncryptionClientV3($s3Client);

$kmsClient = new KmsClient([
'region' => 'us-west-2',
Expand All @@ -197,7 +197,7 @@ function createDefaultClientTuple(): array
]
]
]);
$materialsProvider = new KmsMaterialsProviderV2($kmsClient, 'arn:aws:kms:us-west-2:370957321024:alias/S3EC-Test-Server-Github-KMS-Key');
$materialsProvider = new KmsMaterialsProviderV3($kmsClient, 'arn:aws:kms:us-west-2:370957321024:alias/S3EC-Test-Server-Github-KMS-Key');

return [
'encryptionClient' => $encryptionClient,
Expand Down