chop-dbhi / sql-agent

HTTP interface for executing ad-hoc SQL queries.
BSD 2-Clause "Simplified" License
93 stars 23 forks source link

Which SSL arguments should I use? #22

Closed alexgesser closed 2 years ago

alexgesser commented 2 years ago

Hello, everyone. Started to use with prometheus-sql. On database server turned on TLS. (It's impossible to turn off on mysql by requirements) Getting an error: [some_query] 503 Service Unavailable: problem connecting to database: Error 3159: Connections using insecure transport are prohibited while --require_secure_transport=ON In parameters I didn't find any arguments in settings except sslmode: disable. Can you point me please on configuration with SSL enabled?

I tried sslmode: enable sslmode: enabled ssl_ca: /path/to/cert.pem ssl_cert: /path/to/cert.pem ssl-ca: /path/to/cert.pem ssl-cert: /path/to/cert.pem etc.

my basic config:

connection:
        host: sql.apples.com
        port: 3306
        user: sql-agent
        password: superpassword
        database: specialdatabase
        #sslmode: enable?
alexgesser commented 2 years ago

ATM I found working solution with flag tls: skip-verify not exactly what I wanted, but it works.