Compare commits

...

2 Commits

Author SHA1 Message Date
ff668b2266 chore: publish 2.3.0+v2.10.2 release
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-24 11:31:20 +02:00
e2c16be2ff feat: adds basic auth middleware
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2023-05-10 15:35:52 +02:00
4 changed files with 24 additions and 1 deletions

View File

@ -110,3 +110,9 @@ COMPOSE_FILE="compose.yml"
## Matrix
#COMPOSE_FILE="$COMPOSE_FILE:compose.matrix.yml"
#MATRIX_FEDERATION_ENABLED=1
## BASIC_AUTH
## Use httpasswd to generate the secret
#COMPOSE_FILE="$COMPOSE_FILE:compose.basicauth.yml"
#BASIC_AUTH=1
#SECRET_USERSFILE_VERSION=v1

12
compose.basicauth.yml Normal file
View File

@ -0,0 +1,12 @@
version: "3.8"
services:
app:
environment:
- BASIC_AUTH
secrets:
- usersfile
secrets:
usersfile:
name: ${STACK_NAME}_usersfile_${SECRET_USERSFILE_VERSION}
external: true

View File

@ -47,7 +47,7 @@ services:
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.service=api@internal"
- "traefik.http.routers.${STACK_NAME}.middlewares=security@file"
- "coop-cloud.${STACK_NAME}.version=2.2.0+v2.10.2"
- "coop-cloud.${STACK_NAME}.version=2.3.0+v2.10.2"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
networks:

View File

@ -17,6 +17,11 @@ http:
authResponseHeaders:
- X-Forwarded-User
{{ end }}
{{ if eq (env "BASIC_AUTH") "1" }}
basicauth:
basicAuth:
usersFile: "/run/secrets/usersfile"
{{ end }}
security:
headers:
frameDeny: true