-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add SPF, DKIM and DMARC DNS records #716
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add email sending DNS records. The purpose of each is as follows: - `SPF`: specify which IP servers are authorized to send emails on behalf of the IdP domain. - `DKIM`: verify that an email message was not altered during transit and that it came from the claimed sender. - `DMARC`: specify how emails that fail SPF or DKIM checks should be handled. A report with emails that fail the checks will be sent to [email protected]
⚠ Terrform update availableTerraform: 1.9.1 (using 1.6.6)
Terragrunt: 0.59.6 (using 0.54.8) |
Staging: idp✅ Terraform Init: Plan: 6 to add, 1 to change, 0 to destroy Show summary
Show planResource actions are indicated with the following symbols:
+ create
~ update in-place
Terraform will perform the following actions:
# aws_iam_policy.idp_send_email will be updated in-place
~ resource "aws_iam_policy" "idp_send_email" {
id = "arn:aws:iam::687401027353:policy/idp_send_email"
name = "idp_send_email"
~ policy = jsonencode(
~ {
~ Statement = [
~ {
~ Resource = [
- "arn:aws:ses:ca-central-1:687401027353:identity/auth.forms-staging.cdssandbox.xyz",
- "arn:aws:ses:ca-central-1:687401027353:identity/[email protected]",
] -> "arn:aws:ses:ca-central-1:687401027353:identity/auth.forms-staging.cdssandbox.xyz"
# (2 unchanged attributes hidden)
},
]
# (1 unchanged attribute hidden)
}
)
tags = {}
# (4 unchanged attributes hidden)
}
# aws_route53_record.idp_dkim_CNAME[0] will be created
+ resource "aws_route53_record" "idp_dkim_CNAME" {
+ allow_overwrite = (known after apply)
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = (known after apply)
+ records = (known after apply)
+ ttl = 300
+ type = "CNAME"
+ zone_id = "Z05990652HOQ0SGHD81ZC"
}
# aws_route53_record.idp_dkim_CNAME[1] will be created
+ resource "aws_route53_record" "idp_dkim_CNAME" {
+ allow_overwrite = (known after apply)
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = (known after apply)
+ records = (known after apply)
+ ttl = 300
+ type = "CNAME"
+ zone_id = "Z05990652HOQ0SGHD81ZC"
}
# aws_route53_record.idp_dkim_CNAME[2] will be created
+ resource "aws_route53_record" "idp_dkim_CNAME" {
+ allow_overwrite = (known after apply)
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = (known after apply)
+ records = (known after apply)
+ ttl = 300
+ type = "CNAME"
+ zone_id = "Z05990652HOQ0SGHD81ZC"
}
# aws_route53_record.idp_dmarc_TXT will be created
+ resource "aws_route53_record" "idp_dmarc_TXT" {
+ allow_overwrite = (known after apply)
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = "_dmarc.auth.forms-staging.cdssandbox.xyz"
+ records = [
+ "v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:[email protected]",
]
+ ttl = 300
+ type = "TXT"
+ zone_id = "Z05990652HOQ0SGHD81ZC"
}
# aws_route53_record.idp_spf_TXT will be created
+ resource "aws_route53_record" "idp_spf_TXT" {
+ allow_overwrite = (known after apply)
+ fqdn = (known after apply)
+ id = (known after apply)
+ name = "auth.forms-staging.cdssandbox.xyz"
+ records = [
+ "v=spf1 include:amazonses.com -all",
]
+ ttl = 300
+ type = "TXT"
+ zone_id = "Z05990652HOQ0SGHD81ZC"
}
# aws_ses_domain_dkim.idp will be created
+ resource "aws_ses_domain_dkim" "idp" {
+ dkim_tokens = (known after apply)
+ domain = "auth.forms-staging.cdssandbox.xyz"
+ id = (known after apply)
}
Plan: 6 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_iam_policy.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_iam_user.idp_send_email"]
WARN - plan.json - main - Missing Common Tags: ["aws_shield_protection.idp"]
22 tests, 19 passed, 3 warnings, 0 failures, 0 exceptions
|
craigzour
approved these changes
Jul 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add email sending DNS records. The purpose of each is as follows:
SPF
: specify which servers are authorized to send emails on behalf of the IdP domain.DKIM
: verify that an email message was not altered during transit and that it came from the claimed sender.DMARC
: specify how emails that fail SPF or DKIM checks should be handled. A report with emails that fail the checks will be sent to [email protected]Related