Setting Up Reverse-Proxy for SQL Server on Linux with Docker

dockerlinuxsql server

Context: For our testing environment, we were migrating from on-premise SQL Server 2017 to Docker Linux SQL 2017 container. There is a large number of TestScripts in windows that try to connect to SQLServer in windows via trusted authentication. This Windows Authentication mode doesn't work with Docker Linux SqlServer as only SqlAuth is supported.

Question:
Is there a reverse-proxy that I can use to accept TrustedConnection from TestScripts requiring TrustedAuthentication and redirect the requests to Docker Linux SqlDb that accepts only SqlAuth?

  • It is ok to pre-define SqlAuth for Docker Linux SqlDb in reverse-proxy.
  • It is ok to skip or bypass or fake-validate any form of authentication from clients. Our test scenarios are mostly positive, and we don't need to validate Sql login failures.
  • It is ok to run reverse-proxy in windows platform, for windows auth capability.

This was to avoid the work of re-writing/updating auth on large number of TestScripts (which are legacy). This is test code, and ok to ignore all the security implications.

Best Answer

I found TDSProxy useful for this purpose. This proxy handles and redirects on TDS protocol used for SQL auth. Code change to enable my scenario: https://github.com/tech-software/TDSProxy/pull/3