mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(dynamodb): cover account endpoint TLS hostnames (#9784)
Signed-off-by: Andre Kurait <AndreKurait@gmail.com> Signed-off-by: Jackson Price <jxnprice@amazon.com> Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
b356fefeae
commit
46a3d8ae33
2 files changed
+6
-1
No files matched your search
@@ -268,7 +268,7 @@ public class TlsConfigSource implements ConfigSource {
|
||||
|
||||
/** Service infixes that AWS virtual-hosts with an extra resource-id label before the region. */
|
||||
private static final List<String> MULTI_LABEL_REGIONAL_SERVICE_INFIXES = List.of(
|
||||
"execute-api", "dkr.ecr", "s3-control", "s3.dualstack", "s3-website",
|
||||
"ddb", "execute-api", "dkr.ecr", "s3-control", "s3.dualstack", "s3-website",
|
||||
"s3-fips", "s3-fips.dualstack");
|
||||
|
||||
/**
|
||||
|
||||
@@ -309,6 +309,8 @@ class TlsConfigSourceCertificateGenerationTest {
|
||||
"Certificate SANs should cover dualstack virtual-hosted S3 endpoints");
|
||||
assertTrue(sans.contains("*.s3-control.us-east-1.amazonaws.com"),
|
||||
"Certificate SANs should cover S3 Control <account>.s3-control endpoints");
|
||||
assertTrue(sans.contains("*.ddb.us-east-1.amazonaws.com"),
|
||||
"Certificate SANs should cover DynamoDB <account>.ddb endpoints");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -334,6 +336,7 @@ class TlsConfigSourceCertificateGenerationTest {
|
||||
assertTrue(sans.contains("*.amazonaws.com.cn"), "China global endpoints");
|
||||
assertTrue(sans.contains("*.cn-north-1.amazonaws.com.cn"), "China regional endpoints");
|
||||
assertTrue(sans.contains("*.execute-api.cn-north-1.amazonaws.com.cn"), "China multi-label endpoints");
|
||||
assertTrue(sans.contains("*.ddb.cn-north-1.amazonaws.com.cn"), "China account-based DynamoDB endpoints");
|
||||
assertTrue(sans.contains("*.s3-website-cn-north-1.amazonaws.com.cn"), "China hyphenated S3 endpoints");
|
||||
assertTrue(sans.contains("*.us-iso-east-1.c2s.ic.gov"), "ISO regional endpoints");
|
||||
assertTrue(sans.contains("*.amazonaws.eu"), "EUSC global endpoints");
|
||||
@@ -386,6 +389,8 @@ class TlsConfigSourceCertificateGenerationTest {
|
||||
"Certificate SANs should not include '*.amazonaws.com' when spoofing is disabled");
|
||||
assertFalse(sans.contains("*.us-east-1.amazonaws.com"),
|
||||
"Certificate SANs should not include '*.us-east-1.amazonaws.com' when spoofing is disabled");
|
||||
assertFalse(sans.contains("*.ddb.us-east-1.amazonaws.com"),
|
||||
"Account-based DynamoDB SANs are only enabled with AWS endpoint spoofing");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user