711 B
711 B
Ubuntu User Management API (FastAPI, V1)
Run
pip install -r requirements.txt
uvicorn app.main:app --host 0.0.0.0 --port 8000
Required Env
TOKENHOME_BASE_DIR(default/home)USE_LIBUSER(defaultfalse)LOG_LEVEL(defaultINFO)LOG_PATH(default./logs/user_manage_api.log)SUDO_PATH(default/usr/bin/sudo)
Notes
- API process should run as non-root.
- System account commands are executed through sudo allowlist.
- Password input is pre-hashed only (no plaintext transformation in service).
- Deleting user keeps home directory by default.
Test
pytest -q
Generate Python SDK
python scripts/generate_python_sdk.py