A very small guard dog ... and a minimalist authentication server designed to work with Traefik forward auth
Requires:
- python >= 3.11
- docker and docker-compose
Setup
- Install the python requirements in a virtual environment:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt -r requirements_dev.txt
# with Conda
conda create -n cn-auth python=3.8
conda activate cn-auth
pip install -r requirements.txt -r requirements_dev.txt
-
In different terminal windows:
a. Start Traefik and dummy services for development:
docker-compose -f docker-compose.dev.yml up
b. Start the Chihuahua server:
export $(xargs < .env.dev) uvicorn chihuahua.main:app --reload --port 8000
The API's documentation is available at http://localhost/auth/api/docs
For the tests to run successfully, Traefik, the dummy services, and the Chihuahua server must be running as described above.
pytest tests/