I have a windows docker container with iis and windows authentication on https in a docker swarm
The container is verified to work with windows authentication by a host port mapping.
We would like to use Traefik so we don't need to map a port to the host.
In Traefik 1.x this was not possible due to the missing of tcp routing.
We think it should be possible to do with Traefik 2.0
Does anyone have a docker label example which works with windows authentication?
Can you elaborate what is "windows authentication" please? Is it a backend service to be served through Traefik? Or is it an external authentication system to be used by Traefik for incoming requests to your other webapps?
Any help with a current config and a diagram could help us to give you the right label
Traefik should not handle the authentication.
The container will handle the authentication but the requests should go through Traefik and be forwarded to the container. As far as I know this uses also a tcp connection and this was the reason it could not work with Traefik 1.x
I use these labels now but they don't work:
Based on your feedback, they are other question raised in order to help you top get to the right configuration. The labels you used are a good starting point, but the high level need has to be clarified even more:
Can you confirm that:
What you refers as "Windows Authentication" is an application using HTTP protocol (with or without TLS)?
I see that the "backend" container for "Windows Authentication" only listens on its port 443. Should HTTP request goes though this port on the backend as well?
Do you want TLS to be terminated by Traefik or by the backend system?
The container generates a self signed certificate so Traefik connects with it through https.
In the global config we configured insecureSkipVerify=true so this works. Ideally we would install our root certificate in Traefik to verify the connection but we could not get that working in 1.x
Traefik is terminated with our public wildcard certificate. So Traefik receives https traffic and sends https traffic over different connections with different certificates.
Hope this answers your questions @dduportal.
I see other problems accessing other https docker containers without windows authentication so I should fix this first. This was working for us in Traefik 1.x but probably I made a mistake or Traefik does not honor
[serversTransport]
insecureSkipVerify = true
Traefik responds Bad request. I'll try to fix this first which maybe also fixes the original problem.
Hi @marcgerritsen, I am sorry but I don't understand the problem. Would you have a diagram explaining the topology to help us understand what you're trying to achieve please?
I can confirm that Windows Integrated authentication works successfully with Traefik 2.0 using TCP routers with successful logins proven on Windows/Mac using Safari/Chrome/IE.
Note that when testing it is important to ensure you have cleared cookie caches or you can get unpredictable results due to prior login attempts on non-working configurations you may have attempted.
In our configuration we have a mixed-OS docker Swarm (Linux/Windows) with Traefik operating on Linux and sending requests straight to back-end Windows-containers running on Windows swarm nodes.
If you have configured your Windows app and containers correctly I can confirm that from:
A domain-joined machine you will get straight through login to Windows back-end containers using the domain-joined machine's Kerberos credentials
A non-domain-joined machine connection will downgrade to Windows NTLM authentication and prompt for Windows authentication credentials.
From a Traefik configuration perspective our docker containers have labels like this:
@fifofonix can you verify your settings work with Windows Admin Center?
I'm trying to get that to work for me, and I keep getting an internal server error.
Here is my config...
I am also configuring Windows Admin Center to work through traefik
I get the login prompt after pressing enter I get "Internal Server Error"
It works fine if I directly use the IP address of the Windows Admin Center server.
Was anyone able to get Windows Admin Center to work? I too am getting Internal Server Error after entering creds in the login prompt like the others mentioned.
Is "Windows Admin Center" a web GUI? Is that a TLS issue between browser and Traefik or between Traefik and target service?
It looks like you have a http and tcp router on the same entrypoint for the same domain, is that on purpose? And the TCP router is passing on TLS, which seems to be created by a certresolver, so with LetsEncrypt. The target will probably not have the same cert, therefore can not decrypt. What do you want to achieve?
Share your full Traefik static and dynamic config, and docker-compose.yml if used. You can check Traefik debug log and look at Traefik Dashboard for more info.
Well, my dynamic config is scattered across multiple files and I installed it from the binary.
And yes, Windows Admin Center is a web Gui. It's the Windows version of the Linux Cockpit.
You made me realize, that with a TCP router the HTTP one wasn't necessary, so I removed it, and now I get either a NET::ERR_CERT_COMMON_NAME_INVALID error from the browser with tls passthrough or a "connection reset by peer" error if I use my own certificate.
I would understand the first case because the cert's domains are: "Windows Admin Center", "", "localhost"
Here is the connection reset error:
level=debug msg="Error while handling TCP connection: read tcp 192.168.1.35:34700->192.168.1.125:6516: read: connection reset by peer"
What do you mean by “localhost” domain in cert? If you use LE you need a valid domain name. If you create your own cert you need to have it available in both Traefik and target service.