Score:0

traefik - BasicAuth

vn flag

Problem: I wan't to implement basic Auth on some entrypoints (e. g.: Traefik Dashboard, Prometheus), but i can't get it to work

Context: I've got a bunch of Docker Containers running between a Traefik Proxy. (GitLab, Grafana, HomeAssistant, Prometheus, Min.IO, influxdb, jaeger etc.) and i want to make sure some of the Services are secured using Traefik' BasicAuth Middleware

traefik.yml

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
    watch: true

api:
  dashboard: true
  insecure: true

entryPoints:
  http:
    address: ":80"
  https:
    address: ":443"
  gitea-ssh:
    address: ":30022"
  traefik-metrics:
    address: ":8082"
  influx-db:
    address: ":8086"
  gitlab-ssh:
    address: ":11022"
  gitlab-metrics:
    address: ":11909"
  traefik:
    address: ":8080"

http:
  traefik:
    entrypoints: traefik
    middlwares:
      - "auth"

  middlewares:
    auth:
      basicAuth:
        users:
          - "<removed>"

global:
  checkNewVersion: true

metrics:
  prometheus:
    entryPoint: traefik-metrics
    addEntryPointsLabels: true
    addRoutersLabels: true
    addServicesLabels: true
    buckets:
      - 0.1
      - 0.3
      - 1.2
      - 5.0

tracing:
  jaeger:
    localAgentHostPort: <removed>
    samplingServerURL: <removed>

accessLog:
  filePath: "/var/log/traefik"

the middleware doesn't even show up in the traefik dashboard -> http -> middlwares

i'm not that experienced in traefik, so it would be great if someone could help me.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.