mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(ses): return Easy DKIM signing hosted zone (#5068)
* fix(ses): expose DKIM signing hosted zone * fix(ses): keep DKIM signing hosted zone constant * fix(ses): align signing zone tests with review
This commit is contained in:
1 parent
fb202cce6a
commit
58ac05433a
8 files changed
+68
-3
No files matched your search
@@ -579,6 +579,10 @@ public class SesIdentityController {
|
||||
tokens.add(token);
|
||||
}
|
||||
}
|
||||
if ("Domain".equals(src.getIdentityType()) && "AWS_SES".equals(src.getDkimSigningAttributesOrigin())
|
||||
&& !tokens.isEmpty()) {
|
||||
dkim.put("SigningHostedZone", SesIdentityService.DKIM_SIGNING_HOSTED_ZONE);
|
||||
}
|
||||
dkim.put("SigningAttributesOrigin", src.getDkimSigningAttributesOrigin());
|
||||
dkim.put("NextSigningKeyLength", src.getDkimNextSigningKeyLength());
|
||||
dkim.put("CurrentSigningKeyLength", src.getDkimCurrentSigningKeyLength());
|
||||
|
||||
@@ -45,6 +45,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
@ApplicationScoped
|
||||
public class SesIdentityService implements SesTaggable {
|
||||
|
||||
static final String DKIM_SIGNING_HOSTED_ZONE = "dkim.amazonses.com";
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(SesIdentityService.class);
|
||||
|
||||
private static final Duration DKIM_LOOKUP_CACHE_TTL = Duration.ofSeconds(5);
|
||||
@@ -714,7 +716,7 @@ public class SesIdentityService implements SesTaggable {
|
||||
|
||||
private boolean hasExpectedDkimRecord(String domain, String token) {
|
||||
String expectedName = normalizeDnsName(token + "._domainkey." + domain);
|
||||
String expectedValue = normalizeDnsName(token + ".dkim.amazonses.com");
|
||||
String expectedValue = normalizeDnsName(token + "." + DKIM_SIGNING_HOSTED_ZONE);
|
||||
for (HostedZone zone : route53Service.listHostedZones(null, Integer.MAX_VALUE)) {
|
||||
for (ResourceRecordSet recordSet : route53Service.listResourceRecordSets(zone.getId(), null, null,
|
||||
Integer.MAX_VALUE)) {
|
||||
|
||||
Reference in new issue
Block a user