mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-26 10:55:08 +00:00
feat(serve): add service allowlist for global and per-user access control
Allow server operators to restrict which services are exposed via the API using serve.services (global) and serve.users.<key>.services (per-user). Effective access is the intersection of both when both are set. Unlisted services return the same error as non-existent ones to prevent enumeration.
This commit is contained in:
@@ -469,6 +469,12 @@ serve:
|
||||
# Maximum concurrent sessions before oldest is evicted (default: 100)
|
||||
max_sessions: 100
|
||||
|
||||
# Global service allowlist (optional)
|
||||
# Only these services will be exposed on the API. If omitted, all services are available.
|
||||
# services:
|
||||
# - SERVICE_TAG_1
|
||||
# - SERVICE_TAG_2
|
||||
|
||||
users:
|
||||
secret_key_for_user:
|
||||
devices: # Widevine devices (WVDs) this user can access
|
||||
@@ -476,6 +482,12 @@ serve:
|
||||
playready_devices: # PlayReady devices (PRDs) this user can access
|
||||
- playready_device_sl3000
|
||||
username: user
|
||||
# Per-user service allowlist (optional)
|
||||
# Restricts this user to only the listed services. If omitted, user can access
|
||||
# all globally-allowed services. Effective access is the intersection of global
|
||||
# and per-user allowlists.
|
||||
# services:
|
||||
# - SERVICE_TAG_1
|
||||
# devices: # Widevine device paths (auto-populated from directories.wvds)
|
||||
# - '/path/to/device.wvd'
|
||||
# playready_devices: # PlayReady device paths (auto-populated from directories.prds)
|
||||
|
||||
Reference in New Issue
Block a user