https://github.com/dbrgn/traefik-phpbb-basic-auth
https://github.com/dbrgn/traefik-phpbb-basic-auth
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dbrgn/traefik-phpbb-basic-auth
- Owner: dbrgn
- Created: 2020-12-29T19:18:15.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-01T16:34:46.000Z (over 5 years ago)
- Last Synced: 2025-09-13T06:17:19.855Z (10 months ago)
- Language: Rust
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# traefik-phpbb-basic-auth
Log in using static phpbb3 hashes and the Traefik ForwardAuth middleware.
Note: It is not possible to reliably clear basic auth login data stored in the
browser. This means that if a user enters the wrong credentials, the browser
must be closed and re-opened in order for the basic auth login window to pop up
again.
## Building
Requirements: Rust and Cargo.
cargo build --release
## Usage
traefik-phpbb-basic-auth
The hashes file must contain username and password hash separated by a
semicolon, one credentials pair per line. There should be no quoting or CSV
header. Note: Username matching is case insensitive.
## Configuration
The service can be configured using the following env vars:
- `LOGINS_FILE`: The path to the logins file (defaults to `logins.txt`)
- `BASIC_AUTH_REALM`: The realm used for basic auth (defaults to `Login`)
## Dockerfile
The provided Dockerfile runs the server on port 8080. The data file should be
mounted to `/data/logins.txt`. (An alternative location can be configured with
the `LOGINS_FILE` env var.)
To build:
docker build . -t dbrgn/traefik-phpbb-basic-auth:latest
To run (with the data in `./logins.txt`):
docker run --rm -p 8080:8080 -v "$(pwd):/data" dbrgn/traefik-phpbb-basic-auth
To run (with the data in `/tmp/hashes.txt`):
docker run --rm -p 8080:8080 -v "/tmp:/data" \
-e LOGINS_FILE=/data/hashes.txt \
dbrgn/traefik-phpbb-basic-auth
## License
MIT