rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.23k stars 280 forks source link

SSL connections with client certs #27

Open luna-duclos opened 8 years ago

luna-duclos commented 8 years ago

Currently, I haven't found a way to connect to a MySQL server that requires client cert-based authentication. Is there a way to do this ? If not, I'd be happy to contribute a PR after discussing how we want this to be done.

rubenv commented 8 years ago

I haven't used cert-based auth myself, so I can't really tell what should be added, but I don't think it'll be hard to add.

Will happily accept a PR, it's probably a small change anyway.

luna-duclos commented 8 years ago

For MySQL, cert-based auth requires calling mysql.RegisterTLSConfig, I was thinking of adding an option to the yml file: mysql-cert-file, and having sql-migrate open and register it if specified, would that work for you?

rubenv commented 8 years ago

Sounds good!

adamrt commented 7 years ago

@luna-duclos I've run into the same issue with goose migrations and we are looking to switch. Have you made any progress on this or did you find another solution?

Thank you