I looked through all the examples that I could find on the Internet to create applications on the docker platform. I would like to run two services running in two docker containers:
- Windows container with ASP.NET
- Windows Container with SQL Server
Easy work and lots of examples. However, in all the examples, you need to use SQL authentication and provide a strong SA password as an environment variable when starting the SQL server container. You also need to hardcode the SA password in the connection string in the ASP.Net code (or provide it in some other way in the configuration file, etc.).
In the bottom line in all examples, the password is somewhere hardcoded.
In most of the applications that we are developing now, we actually use Windows authentication or instead use a grouped account for a managed service. But as far as I know, you cannot add a Windows container to the domain, so the SQL server is not part of the Windows domain, so I see no way to use Windows authentication here.
Does anyone have an alternative to hard coding passwords this way?
source share