1

I'm encountering a conflict between RabbitMQ's authentication and Traefik's Basic Auth. After successfully passing Traefik's Basic Auth, I log in to RabbitMQ, but then Traefik prompts for Basic Auth again.

  rabbitmq:
    image: rabbitmq:3.11.28-management-alpine
    container_name: rabbitmq
    environment:
      - RABBITMQ_DEFAULT_USER=guest
      - RABBITMQ_DEFAULT_PASS=guest
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.${SERVICE_DOMAIN}`)"
      - "traefik.http.routers.rabbitmq.entrypoints=web"
      - "traefik.http.services.rabbitmq.loadbalancer.server.port=15672"
      - "traefik.tcp.services.ingress.loadbalancer.server.port=5672"
      - "traefik.http.routers.rabbitmq.middlewares=auth-rabbitmq"
      - "traefik.http.middlewares.auth-rabbitmq.basicauth.users=${SERVICE_USER}"
      - "traefik.http.middlewares.auth-rabbitmq.basicauth.removeheader=true"
    networks:
      - proxy

I configured RabbitMQ with Traefik Basic Auth. I expected to authenticate through Traefik once, then access RabbitMQ's management interface without further prompts. However, after passing Traefik's Basic Auth, I logged into RabbitMQ, and Traefik asked for authentication again.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.