amoghrajesh commented on PR #37214:
URL: https://github.com/apache/airflow/pull/37214#issuecomment-1932289134
@potiuk to maintain the older behaviour, I think one thing we can do is:
in init:
```
if "ssl" is in self.extra and if "allow_insecure" is not in self.extras:
self.extras["allow_insecure"] = False
```
and in get_conn:
```
allow_insecure = get allow_insecure from options
if options.get("ssl", False):
if pymongo.__version__ >= "4.0.0":
# For pymongo 4.0.0+, use 'tlsAllowInvalidCertificates'
options["tlsAllowInvalidCertificates"] = allow_insecure
else:
# For older pymongo versions, use 'ssl_cert_reqs'
options["ssl_cert_reqs"] = CERT_NONE if allow_insecure else
CERT_REQUIRED
```
Thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]