Harden auth and security controls with session auth and docs
This commit is contained in:
28
README.md
28
README.md
@@ -50,17 +50,23 @@ Before first run, set required secrets and connection values in `.env` (or your
|
||||
- `DATABASE_URL`
|
||||
- `REDIS_PASSWORD`
|
||||
- `REDIS_URL`
|
||||
- `ADMIN_API_TOKEN`
|
||||
- `USER_API_TOKEN`
|
||||
- `AUTH_BOOTSTRAP_ADMIN_USERNAME`
|
||||
- `AUTH_BOOTSTRAP_ADMIN_PASSWORD`
|
||||
- optional `AUTH_BOOTSTRAP_USER_USERNAME`
|
||||
- optional `AUTH_BOOTSTRAP_USER_PASSWORD`
|
||||
- `APP_SETTINGS_ENCRYPTION_KEY`
|
||||
- `TYPESENSE_API_KEY`
|
||||
|
||||
Start from `.env.example` to avoid missing required variables.
|
||||
|
||||
Open:
|
||||
|
||||
- Frontend: `http://localhost:5173`
|
||||
- API docs: `http://localhost:8000/docs`
|
||||
- Health: `http://localhost:8000/api/v1/health`
|
||||
|
||||
Use bootstrap credentials (`AUTH_BOOTSTRAP_ADMIN_USERNAME` and `AUTH_BOOTSTRAP_ADMIN_PASSWORD`) to sign in from the frontend login screen.
|
||||
|
||||
Stop the stack:
|
||||
|
||||
```bash
|
||||
@@ -115,8 +121,8 @@ cd frontend && npm run preview
|
||||
|
||||
Main runtime variables are defined in `docker-compose.yml`:
|
||||
|
||||
- API and worker: `DATABASE_URL`, `REDIS_URL`, `REDIS_SECURITY_MODE`, `REDIS_TLS_MODE`, `STORAGE_ROOT`, `PUBLIC_BASE_URL`, `CORS_ORIGINS`, `ALLOW_DEVELOPMENT_ANONYMOUS_USER_ACCESS`, `TYPESENSE_*`, `APP_SETTINGS_ENCRYPTION_KEY`
|
||||
- Frontend: optional `VITE_API_BASE`, optional `VITE_API_TOKEN` compatibility fallback
|
||||
- API and worker: `DATABASE_URL`, `REDIS_URL`, `REDIS_SECURITY_MODE`, `REDIS_TLS_MODE`, `STORAGE_ROOT`, `PUBLIC_BASE_URL`, `CORS_ORIGINS`, `CORS_ALLOW_CREDENTIALS`, `AUTH_BOOTSTRAP_*`, `PROCESSING_LOG_STORE_*`, `CONTENT_EXPORT_*`, `TYPESENSE_*`, `APP_SETTINGS_ENCRYPTION_KEY`
|
||||
- Frontend: optional `VITE_API_BASE`
|
||||
|
||||
When `VITE_API_BASE` is unset, the frontend uses `http://<current-hostname>:8000/api/v1`.
|
||||
|
||||
@@ -128,12 +134,18 @@ Provider API keys are persisted encrypted at rest (`api_key_encrypted`) and are
|
||||
|
||||
Settings endpoints:
|
||||
|
||||
- `GET/PUT /api/v1/settings`
|
||||
- `GET/PATCH /api/v1/settings`
|
||||
- `POST /api/v1/settings/reset`
|
||||
- `POST /api/v1/settings/handwriting`
|
||||
- `POST /api/v1/processing/logs/trim`
|
||||
- `PATCH /api/v1/settings/handwriting`
|
||||
- `POST /api/v1/processing/logs/trim` (admin only)
|
||||
|
||||
Note: the compose file currently includes host-specific URL values (for example `PUBLIC_BASE_URL` and `VITE_API_BASE`). Adjust these for your environment when needed.
|
||||
Auth endpoints:
|
||||
|
||||
- `POST /api/v1/auth/login`
|
||||
- `GET /api/v1/auth/me`
|
||||
- `POST /api/v1/auth/logout`
|
||||
|
||||
Detailed DEV and LIVE environment guidance, including HTTPS reverse-proxy deployment values, is documented in `doc/operations-and-configuration.md` and `.env.example`.
|
||||
|
||||
## Data Persistence
|
||||
|
||||
|
||||
Reference in New Issue
Block a user