Implement Keycloak authentication to Admin API

This commit is contained in:
BloxerHD 2026-04-23 15:39:38 +01:00
commit 25d2e1d036
7 changed files with 91 additions and 84 deletions

View file

@ -8,9 +8,19 @@ BOSS_CDN_URL=https://boss.example.com
AES_KEY=KEY
HMAC_KEY=KEY
# Can be paired with an admin auth server for extra security,
# if disabled auth will instead check to see if the sent token
# matches ADMIN_AUTH_TOKEN
USE_ADMIN_AUTH=true
ADMIN_AUTH_URL=http://admin.example.com # Only needed when USE_ADMIN_AUTH=true
ADMIN_AUTH_TOKEN=AUTH_TOKEN
# S3 Config for Boss File Storage
S3_ENDPOINT=https://s3.example.com/
S3_BUCKET_NAME=boss-files
S3_ACCESS_KEY=key
S3_SECRET_KEY=key
# Authentication Config for Admin API
# Can either use token or Keycloak server
FORCE_KEYCLOAK=false
KEYCLOAK_URL=https://keycloak.example.com
KEYCLOAK_REALM=admin
KEYCLOAK_CLIENT_ID=id
KEYCLOAK_CLIENT_SECRET=secret
# Fallback when not using Keycloak, doesn't have to be set if using Keycloak only
AUTH_TOKEN=token