This project provide a simple way to manage users and provide basic access control using HTTP basic authentication and nginx auth_request.
Notes: this project current only support HTTP basic authentication which must be used with SSL.
services:
http-basic-auth-request:
image: ghcr.io/klementng/http-basic-auth-request:main
container_name: http-basic-auth-request
environment:
- CONFIG_DIR=/config
- CONFIG_PATH=/config/config.yml
- USER_DB_PATH=/config/users.yml
- LOG_LEVEL=INFO
- FLASK_SESSION_COOKIE_DOMAIN=.example.com
volumes:
- /path/to/data:/config
ports:
- 9999:9999
restart: unless-stopped
Docker environmental variables:
Name | Description | Allowed values | Default values |
---|---|---|---|
CONFIG_DIR | Working directory for storing configuration & data | Any | /config |
CONFIG_PATH | Path to config file | Any | ${CONFIG_DIR}/config.yml |
LOG_LEVEL | Set Logging | INFO, DEBUG, WARNING | INFO |
FLASK_SESSION_COOKIE_DOMAIN | Associated cookie domain | Any | - |
FLASK_* | Flask app config | Any | - |
sudo docker exec -it http-basic-auth-request server.users add <username>
sudo docker exec -it http-basic-auth-request server.users edit <username>
sudo docker exec -it http-basic-auth-request server.users delete <username>
see default.yml
see auth-request.conf and nginx.conf