Skip to content
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

Add SES identity owners or "use verified SES-domains across accounts" #228

Merged
merged 2 commits into from
Sep 27, 2021
Merged

Add SES identity owners or "use verified SES-domains across accounts" #228

merged 2 commits into from
Sep 27, 2021

Conversation

mariusburfey
Copy link
Contributor

@mariusburfey mariusburfey commented Sep 27, 2021

User Story

As devops-engineer I want to separate my environments from each other to keep my applications as secure as possible, as described in AWS best practices. I do not want to validate my SES-domains in all accounts, but I want to use "identity owners" to send mails from multiple accounts via one SES-domain: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sending-authorization-delegate-sender-tasks-email.html

The result is: I have a lot of environments (PROD, TEST, STAGE, ...), which can send SES-mails from my one "SES-core-account", which contains my validated domains.

Solution

Identity Owners and Delegate Senders can do that:

As a delegate sender, you send emails the same way that other Amazon SES senders do, except that you provide the ARN of the identity that the identity owner has authorized you to use. When you call Amazon SES to send the email, Amazon SES checks to see if the identity that you specified has a policy that authorizes you to send for it.

This pull requests includes the changes described in #227

fixes #227

@pcraciunoiu pcraciunoiu merged commit 3208999 into django-ses:master Sep 27, 2021
@mariusburfey mariusburfey deleted the feature/ses-identity-owners branch September 28, 2021 06:06
@gposton
Copy link

gposton commented Nov 1, 2021

Thanks @mariusburfey! So glad this is in!

@gposton
Copy link

gposton commented Nov 1, 2021

Hey @mariusburfey, are you currently using this feature. I believe I have everything set up as it should be, but it's still not honoring the sending ARN's. It does honor the region, but it's sending to the identities in the local account rather than the remote ARN's that I specified.

@mariusburfey
Copy link
Contributor Author

Hey @gposton, I think we are not using it productively yet. But I tested it during development with one difference: I used a domain which was only defined in the account of the identity owner and not in the account of the delegate sender. This might be a difference?

Do you get errors about permissions or is it just "using the wrong account"?

@gposton
Copy link

gposton commented Nov 9, 2021

No errors.... just simply using the wrong account. That may be it tho.... in my case the domains were the same. AWS certainly goofed on their side if that's the case tho.

@gposton
Copy link

gposton commented Nov 9, 2021

I should also add that I was able to send correctly via the aws-cli with the same setup.... so maybe it's boto and not AWS. Would be interesting to dig into this, but I just ended up moving sending to the local accounts. 🤷

@mariusburfey
Copy link
Contributor Author

I started using the feature (again) and verified that it works. But it took me some time to figure out that I need to set AWS_SES_SOURCE_ARN and AWS_SES_FROM_ARN, though the boto-docs state that the first one is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using SES across accounts with identity owner
3 participants