Skip to content
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

Add ssl=on parameter to mysql plugin. #2036

Open
dotmitsu opened this issue Dec 16, 2023 · 6 comments
Open

Add ssl=on parameter to mysql plugin. #2036

dotmitsu opened this issue Dec 16, 2023 · 6 comments

Comments

@dotmitsu
Copy link

dotmitsu commented Dec 16, 2023

We use mariadb and strongswan sql plugin for connecting to DB. https://docs.strongswan.org/docs/5.9/plugins/sql.html
We need to use ssl encrypted connection but can't because sql plugin doesn't have this parameter.
Please add this parameter. It will be like:

charon {
  plugins {
    sql {
      database = mysql://user:pass@localhost/database?ssl=on
    }
  }
}
@straystreyk
Copy link

+1

@PashaShredder
Copy link

That's an important aspect, I'm all for it

@strongX509
Copy link
Contributor

Well, you are free to add ?ssl=on to the mysql URI. Is strongSwan supposed to negotiate a TLS-protected connection? It doesn't make make sense for localhost.

@dotmitsu
Copy link
Author

Our mariadb is on another host. We use a few strongswan on different hosts with one mariadb database. ssl=on doesn't work for strongswan plugin. This plugin doesn't support ssl connection to mariadb. If we turn off encrypted connection on mariadb and use unencrypted connection, everithing works in strongswan plugin.

@Thermi
Copy link
Contributor

Thermi commented Jan 24, 2024

Well, you are free to add ?ssl=on to the mysql URI. Is strongSwan supposed to negotiate a TLS-protected connection? It doesn't make make sense for localhost.

strongswan needs to handle the URL parameter by doing this if it is found: https://dev.mysql.com/doc/c-api/8.3/en/c-api-encrypted-connections.html

@Thermi
Copy link
Contributor

Thermi commented Feb 9, 2024

I think in the meantime you can try working with stunnel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants