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

Unable to use skip-verify or equivalent when custom SSL is used #348

Closed
evancarter-iex opened this issue Nov 19, 2018 · 4 comments · Fixed by #417
Closed

Unable to use skip-verify or equivalent when custom SSL is used #348

evancarter-iex opened this issue Nov 19, 2018 · 4 comments · Fixed by #417

Comments

@evancarter-iex
Copy link

Host operating system: output of uname -a

Centos 7.3

mysqld_exporter version: output of mysqld_exporter --version

INFO[0000] Starting mysqld_exporter (version=0.11.0, branch=HEAD, revision=5d7179615695a61ecc3b5bf90a2a7c76a9592cdd)  source="mysqld_exporter.go:206"

MySQL server version

5.7

mysqld_exporter command line flags

/usr/local/bin/mysqld_exporter --config.my-cnf=$HOME/.my.cnf

What did you do that produced an error?

Using a custom SSL configuration, if the SSL cert is invalid, there is no way to ignore "skip-verify". This is important because some cloud providers SSL certs for Mysql connections do not include ips in them.

What did you expect to see?

An ability to connect using a custom cert and use "skip-verify" as documented here: https://golang.org/src/crypto/tls/common.go?s=12984:21448#L334.
Also according to mysql documentation, it doesnt normally check SSL certs when connecting unless specified to https://dev.mysql.com/doc/refman/5.7/en/encrypted-connection-options.html#option_general_ssl-mode

What did you see instead?

An error saying

Error pinging mysqld: x509: cannot validate certificate for X.X.X.X because it doesn't contain any IP SANs" source="exporter.go:119
@evancarter-iex
Copy link
Author

@SuperQ is this something that is feasible to get done?

@SuperQ
Copy link
Member

SuperQ commented Feb 6, 2019

If you have a custom cert, you can pass the cert info via the my.cnf options. See the README.

Supporting the ssl-mode flag is possible, but I don't have time to implement this.

@evancarter-iex
Copy link
Author

Yeah we passed the custom cert via the my.cnf. Its just it defaults to verify all, and cant override that.

@janevert
Copy link

janevert commented Feb 9, 2021

@SuperQ , any idea when this issue would be in a release? The 0.12.1 release does not include this change.

Thanks.

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

Successfully merging a pull request may close this issue.

3 participants