From 4881d65434a3c6d1ec1cec467a16e4be77128be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Thu, 6 Nov 2025 19:47:51 +0100 Subject: [PATCH] feat: add HTTP Basic Auth to paint service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Protected paint.pivoine.art with HTTP Basic Auth using shared AUTH_USERS credentials, matching the security setup of scrapy and other protected services. Changes: - Added basicauth middleware with AUTH_USERS variable - Added compression middleware - Updated router middlewares chain to include auth, compress, and security headers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- paint/compose.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paint/compose.yaml b/paint/compose.yaml index 2faa8d6..4eaa8c3 100644 --- a/paint/compose.yaml +++ b/paint/compose.yaml @@ -15,11 +15,13 @@ services: - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web.middlewares=${PAINT_COMPOSE_PROJECT_NAME}-redirect-web-secure' - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web.rule=Host(`${PAINT_TRAEFIK_HOST}`)' - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web.entrypoints=web' - # HTTPS router + # HTTPS router with auth - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web-secure.rule=Host(`${PAINT_TRAEFIK_HOST}`)' - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web-secure.tls.certresolver=resolver' - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web-secure.entrypoints=web-secure' - - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web-secure.middlewares=security-headers@file' + - 'traefik.http.middlewares.${PAINT_COMPOSE_PROJECT_NAME}-auth.basicauth.users=${AUTH_USERS}' + - 'traefik.http.middlewares.${PAINT_COMPOSE_PROJECT_NAME}-web-secure-compress.compress=true' + - 'traefik.http.routers.${PAINT_COMPOSE_PROJECT_NAME}-web-secure.middlewares=${PAINT_COMPOSE_PROJECT_NAME}-auth,${PAINT_COMPOSE_PROJECT_NAME}-web-secure-compress,security-headers@file' # Service - 'traefik.http.services.${PAINT_COMPOSE_PROJECT_NAME}-web-secure.loadbalancer.server.port=80' - 'traefik.docker.network=${NETWORK_NAME}'