feat(serve): per-api-key cdm and service config with server-side identity cache

serve.users.<key>.cdm and service_config give each API key its own device and service config. Service.IDENTITY_CACHE keys route to a per-key directory that clients never receive
This commit is contained in:
imSp4rky
2026-11-16 13:31:17 -07:00
parent 08481d3a33
commit f1e4081313
16 changed files with 508 additions and 63 deletions
+1 -1
View File
@@ -362,4 +362,4 @@ The REST API authenticates with `X-Secret-Key`. The middleware advertises `Autho
### Where device access is read
The map of accepted API keys lives at `request.app["config"]["users"]`. For DRM operations, an API key's permitted Widevine devices come from its `devices` list, and PlayReady devices from `playready_devices`. The server uses the first configured device when a request does not (or may not) override it. A server-wide `config.cdm[<service>]` mapping, if present, takes precedence over the API key's device list when the server chooses which device to use.
The map of accepted API keys lives at `request.app["config"]["users"]`. For DRM operations, an API key's permitted Widevine devices come from its `devices` list, and PlayReady devices from `playready_devices`. The server uses the first configured device when a request does not (or may not) override it. A `cdm` entry for the service takes precedence over the API key's device list when the server chooses which device to use: the API key's own `serve.users.<key>.cdm` entry, else the server-wide `config.cdm[<service>]` mapping.