-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sl): warn ops regarding CAA records #1076
Conversation
* 1. check if they have whitelisted Amazon CAA | ||
* 2. if not, send email to inform them to whitelist Amazon CAA | ||
*/ | ||
const hasAmazonCAAWhitelisted = caaRecords.some((record) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the assumption we're making here is that if there's only one CAA record, it's the whitelisted amazon one right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really, the condition to check here is: if it has any CAA record, at least one has to be the amazon one
in the case where there is no CAA record, actually all this is ok already
if (caaRecords.length > 1 && !hasAmazonCAAWhitelisted) { | ||
successResult.addCAARecord = true | ||
} else { | ||
successResult.addCAARecord = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need the else if asAmazonCAAWhitelisted
check here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh my conidtion is wrong i think that caused the confusion ps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed, hopefully this clearer
if (caaRecords.length > 0 && !hasAmazonCAAWhitelisted) { | ||
successResult.addCAARecord = true | ||
} else { | ||
successResult.addCAARecord = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (caaRecords.length > 0 && !hasAmazonCAAWhitelisted) { | |
successResult.addCAARecord = true | |
} else { | |
successResult.addCAARecord = false | |
successResult.addCAARecord = caaRecords.length > 0 && !hasAmazonCAAWhitelisted |
* fix(sl): warn ops regarding CAA records * fix(site launch): wrong condition
Problem
Prevent this from occurring by warning the agency and ops beforehand regarding a possible site launch failure route.
Solution
Check for existence of CAA records, and if found, check if they 'trust' Amazon, else ask them to add DNS records that specifically allow for this.
Breaking Changes
Tests
set export MOCK_AMPLIFY_DOMAIN_ASSOCIATION_CALLS="true" and add this in server.js
the email (in the logs) should be out like this: