Hello @everyone How can i use ssl=enable
# spicedb
a
Hello @everyone How can i use ssl=enable and provide ca certificate in spicedb connection uri for my sql managed instances ?
v
Yes, something like this should work:
Copy code
postgresql://<user>:<pass>@<endpoint>:<port>/<db-name>?sslmode=verify-ca&sslrootcert=<path-to-cert>
a
its not working for mysql datastore
v
ah, sorry, mysql, my bad, missed that. According to the MySQL Go driver, this is done with the
tls
parameter: https://github.com/go-sql-driver/mysql?tab=readme-ov-file#tls So you'd the following query parameter to you MySQL URI:
Copy code
<your_uri>?tls=skip-verify
This allows you to use TLS without validating the trust chain. Unfortunately it does not seem to support any means to provide a CA trust chain via the query parameters.
you can use
<your_uri>?tls=true
to enforce cert validation, just not sure if your machine has CAs installed and available to the go process
a
perfect thankyou very much let me try this
?tls=skip-verify is not working witH managed sql service
v
the please refer to the managed SQL service documentation. What service is it?
a
azure mysql service
v
https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-ssl-connection-security > Connection strings for various programming languages are shown in the Azure portal. Those connection strings include the required SSL parameters to connect to your database. In the Azure portal, select your server. Under the Settings heading, select the Connection strings. The SSL parameter varies based on the connector, for example "ssl=true" or "sslmode=require" or "sslmode=required" and other variations.
a
its not working , when I am trying to add these parameters after the connection string , its giving error the connection uri is not valid
v
have you tried
tls=true
?
can you please share the errors you got when you specified
tls=skip-verify
?
I found this issue (https://github.com/go-sql-driver/mysql/issues/1306), and it seems like doing
tls=true
should work
92 Views