Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Mailer] AWS SES auth with SESSION_TOKEN support#40193
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Mailer] AWS SES auth with SESSION_TOKEN support#40193
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jderusse left a comment
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.
In fact, if I don't mistaken, async-aws already support natively theSESSION_TOKEN when authenticating via end variable. But as soon as you provide a user and password via DSN, you tell async-aws to not take the env variables into account.
I think the best way to support thisSESSION_TOKEN variable is to let async-aws authenticate via env variable: Instead of adding a new option that passthrough the env variable, remove credentials from DSN:ses://default?region=eu-east-1
| --- | ||
| * added the`mailer` monolog channel and set it on all transport definitions | ||
| * Add support for`SESSION_TOKEN` for Async AWS Mailer transport |
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.
this is not totally accurate. this PR does not add support for the end variableSESSION_TOKEN, but adds a new option in DSN.
chekalsky commentedFeb 15, 2021
@jderusse thank you, it's working, didn't know about this possibility :-) and I agree, this option is much better. I think we could close this issue. |
When we use AWS Lambda, we need not only
ACCESS_KEYandACCESS_SECRETin order to make requests to AWS SES, but alsoSESSION TOKEN. This PR introduces support forSESSION_TOKEN. For using it include it in DSN as query parameter namedsessionTokene. g.ses+https://%env(AWS_ACCESS_KEY_ID)%:%env(urlencode:AWS_SECRET_ACCESS_KEY)%@default?region=us-east-1&sessionToken=%env(urlencode:AWS_SESSION_TOKEN)%.Didn't add any tests as there wasn't any testing for this part of code.