-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Allows to choose SSL context for SMTP provider #33075
Allows to choose SSL context for SMTP provider #33075
Conversation
6adc0fc
to
4078fa6
Compare
Also for @hussein-awala -> I am not sure if this approach is best and how it will work with #30531 - I just figured that we have to use "smtp_provider" section rather than "smtp" from the core - and I think we should follow similar approach like here - where "smtp" will go to "pre_2_7_0" defaults, but the provider will use the "smtp_provider" section and fall back to the "smtp" one, similarly as I am falling back now to "email" / "ssl_context" - would love to hear from you on that one. As explained above, I am trying to make chain of defaults this way and added unit tests covering the behaviour |
This change add two options to choose from when SSL SMTP connection is created: * default - for balance between compatibility and security * none - in case compatibility with existing infrastructure is preferred The fallback is: * The Airflow "email", "ssl_context" * "default"
Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com>
6482eaa
to
dba5b23
Compare
@hussein-awala -> would you like to comment on that one, re #30531 - or you are ok for now. I'd love to merge that one and implement IMAP change as well so that we can release new providers today :) |
Let me merge that one now, I think we can always change it in the future. |
I'm late to the party.
For smtp_provider, I think it would be better to use the connection extras to configure ssl_context (as we do with the other configurations), instead of using Airlfow config (or even provider config). Since we cannot use the operator/hook without a connection, IMO it's better if we provide a single way to configure them. WDYT? could we move this conf to the connection before releasing the provider? |
Discussion in Slack follows |
* Allows to choose SSL context for SMTP provider This change add two options to choose from when SSL SMTP connection is created: * default - for balance between compatibility and security * none - in case compatibility with existing infrastructure is preferred The fallback is: * The Airflow "email", "ssl_context" * "default" * Update airflow/providers/smtp/CHANGELOG.rst Co-authored-by: Ephraim Anierobi <splendidzigy24@gmail.com> (cherry picked from commit e20325d)
This change add two options to choose from when SSL SMTP connection is created:
The fallback is:
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.