rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
607 stars 189 forks source link

Using OpenSSL/Encrypted Connections #353

Open metaskills opened 7 years ago

metaskills commented 7 years ago

For Zbigniew Szmigiero who asked in email...

Tiny_tds is very valuable gem but I am still do not understanding lack of SSL configuration in Client object The documentation and some answers on GitHub mention that freetsd.conf file is evaluated but I have no idea when it should be located in case on Windows with pre-compiled static binaries.

Could you point where should I put this file? My suggestion is to provide SSL configuration on tiny_tds level it allows to control connection from security perspective and manage connection more suitable directly from ruby code.

metaskills commented 7 years ago

A few points about this in no particular order:

Reference Links

zbychfish commented 7 years ago

I found solution after a while. The precompiled freetds on Windows points c:Static directory where freetds.conf file should be located. So Static directory has to be located in the directory where ruby code is executed. I also noticed that FREETDS and TDSDUMP variables are ignored. The possibility to setup SSL behavior (with certificate location) will be very useful and simplify Tiny_TDS configuration without necessity to manage it by config files.

metaskills commented 7 years ago

Can you make some explicit recommendations that we could change?