Re: [sqlalchemy] TLS 1.2

2023-03-28 Thread Mike Bayer
this is a driver issue so you'd need to get specifics from the driver you're 
using, such as mysqlclient or pymysql. 

per https://dev.mysql.com/doc/c-api/8.0/en/c-api-encrypted-connections.html it 
looks like "TLS_VERSION"

create_engine("mysql+mysqldb://...?ssl=true", connect_args={"ssl": 
{"tls_version": "1.2"}})

background on customizing connections are at 
https://docs.sqlalchemy.org/en/20/core/engines.html#use-the-connect-args-dictionary-parameter
 



On Mon, Mar 27, 2023, at 2:39 PM, Patrick Bruce wrote:
> I am connecting to a MySQL db using sqlalchemy and TLS 1.2 is enforced server 
> side. I connect by setting my URI to the correct connection string and adding 
> the ?ssl=true flag at the end. However I am getting an error that the TLS 
> version does not meet the minimum requirements of the server. My question is 
> how to force sqlalchemy to connect using TLS 1.2?
> 
> App env: Python 3.6 using Flask 
> 
> 
> -- 
> SQLAlchemy - 
> The Python SQL Toolkit and Object Relational Mapper
>  
> http://www.sqlalchemy.org/
>  
> To post example code, please provide an MCVE: Minimal, Complete, and 
> Verifiable Example. See http://stackoverflow.com/help/mcve for a full 
> description.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sqlalchemy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sqlalchemy/8803031f-ca72-454a-bd73-ad3b0bc65773n%40googlegroups.com
>  
> .

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/4b1cf0a4-99d7-48a5-b06c-fc12d864f08f%40app.fastmail.com.


[sqlalchemy] TLS 1.2

2023-03-27 Thread Patrick Bruce
I am connecting to a MySQL db using sqlalchemy and TLS 1.2 is enforced 
server side. I connect by setting my URI to the correct connection string 
and adding the ?ssl=true flag at the end. However I am getting an error 
that the TLS version does not meet the minimum requirements of the server. 
My question is how to force sqlalchemy to connect using TLS 1.2?

App env: Python 3.6 using Flask 

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/8803031f-ca72-454a-bd73-ad3b0bc65773n%40googlegroups.com.