CDN edge server (defaultApp) returns 401 Unauthorized

I am using CDN with one origin server and one edge server. Each server is behind a load balancer.
I have created a custom app called "development" pointed to my backend to authorize the publisher when a stream is connected or published.
In viewer part, the playback is streamed using HLS.

It seems custom app can't be used for HLS playback and it used "defaultApp" for connection. (Let me know if it is possible to use custom apps for HLS)

I have also enabled stream ACL management by following this link

When a stream is playbacked using HLS, it connects to http://localhost:8081/apps/defaultApp. It always returns 401 and I can't able to check why its returning Unauthorized error?

May I know is this something related to CDN ACL? And if it so, how can I overcome that?


Staff member

For HLS playback authentication, only defaultApp can be used. (There is ticket WCS-2399 for custom app support.)
In case CDN ACL is used, it is not required to enable hls_auth_enabled.
For CDN ACL, please verify that
- after a key is added on the Origin:
curl -s -X POST -d ' {"name":"streamName", "keys":["key1"]}' "http://localhost:9091/rest-api/cdn/stream/access_list/add"
the Edge does receive it - check on Edge:
curl -s -X POST -d ' {"name":"streamName"}' "http://localhost:9091/rest-api/cdn/stream/access_list/print"
- the stream can be played on the Edge, e.g. as WebRTC