Hi,
I am trying to implement https with self signed certificates and secure the traefik dashboard using basicauth. Things are working fine, I can open the dashboard on https and there is a login prompt. But there are couple of observations on which I am looking for more clarity.
Here is the config:
labels:
- "traefik.http.routers.traefik.rule=Host(`traefik.dev.localhost`)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=auth"
- "traefik.http.routers.traefik.entrypoints=https"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.middlewares.auth.basicauth.users=admin:$$"
Static config:
[log]
level = "DEBUG"
[entrypoints]
[entrypoints.http]
address = ":80"
[entrypoints.https]
address = ":443"
[providers]
[providers.docker]
[providers.file]
filename = "/etc/traefik/traefik.config.toml" # this file points to certs
[api]
# With this you enable the web UI
# insecure = true
dashboard = true
-
After adding this config and restarting the containers, I see the login/password prompt only once if auth is successful. Closing the dashboard and open again, I am not asked for login/password. Restarting the containers and open dashboard, I am not asked for login/password. Not sure if this has to do more with cookies or something outside the scope of traefik. Is there a setting to enforce login/password everytime the dashboard is opened?
-
I am in debug mode and see the logs floating even when there is no traffic. Hope this is some internal stuff and nothing to be concerned about.
traefik_1 | time="2019-11-26T21:40:36Z" level=debug msg="Authentication succeeded" middlewareName=auth@docker middlewareType=BasicAuth
traefik_1 | time="2019-11-26T21:40:36Z" level=debug msg="Authentication succeeded" middlewareType=BasicAuth middlewareName=auth@docker
traefik_1 | time="2019-11-26T21:40:41Z" level=debug msg="Authentication succeeded" middlewareName=auth@docker middlewareType=BasicAuth
traefik_1 | time="2019-11-26T21:40:41Z" level=debug msg="Authentication succeeded" middlewareName=auth@docker middlewareType=BasicAuth
traefik_1 | time="2019-11-26T21:40:46Z" level=debug msg="Authentication succeeded" middlewareName=auth@docker middlewareType=BasicAuth
traefik_1 | time="2019-11-26T21:40:46Z" level=debug msg="Authentication succeeded" middlewareName=auth@docker middlewareType=BasicAuth
traefik_1 | time="2019-11-26T21:40:51Z" level=debug msg="Authentication succeeded" middlewareName=auth@docker middlewareType=BasicAuth
traefik_1 | time="2019-11-26T21:40:51Z" level=debug msg="Authentication succeeded" middlewareType=BasicAuth middlewareName=auth@docker
Thanks!