Playback session authorization for SLDP Live streaming

Сергей 2022-11-05 07:48:05 UTC in Nimble Streamer

Hi all!
Playback session authorization Nimble not block for SLDP Live streaming.
For SLDP Live requests auth handler send {"return_code":403}.
For HLS requests forbidden correct.
Can fix it ?
Nimble Streamer restarted after changed.
Nimble:3.7.11-4. Debian 8.

Сергей 2022-11-05 08:29:52 UTC 

Addition for post above.
HLS request start working too after send many requests retry!

Used SSL certificates.

Aleksandr 2022-11-05 12:38:16 UTC 

- Make sure the 'Allow by default' tick is not enabled;
- Check the handler's behavior to make sure it's not returning {"return_code":200} for the tested stream for some reason;
- You can enable "Debug log" in Nimble to gather more details live.
If you still have issues - I'd suggest opening a ticket here: and sharing more details there to avoid disclosing any sensitive information of yours.

Сергей 2022-11-05 14:44:57 UTC 

- 'Allow by default' - tryed both case: with true and false
"AuthHandlerSettings": {
"hash": "1667584986424",
"auth_handler_url": "http:\/\/\/nimble_auth\/",
"auth_handler_concurrency": 10,
"allow_by_default": false

- Handler very simple and return constant.
We can see in logs - Forbidden 403 Nimble return, but with some retries not block.

- With debug log for HLS

- ScreenShot for HLS requests

SLDP is more interesting!
In access.log, you can see the 403 return status, but the usual data sent to the HTML player via websocket. - - [2022-11-05 17:34:52] "GET /live/81 HTTP/1.1" 403 563 256 288750 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36"

Aleksandr 2022-11-05 17:11:40 UTC 

First - the responses from handler look strange, e.g.:
Have you used this code as example?

Сергей 2022-11-06 03:30:27 UTC 

Aleksandr, thank you for answer!
Nimble very sensitive to handle answer.
I use java spring boot, not python.

1. Block work.
@PostMapping({ "/nimble_auth" })
public ResponseEntity<String> nimble_auth(@RequestBody String requestBody) {
return ResponseEntity.ok("{\"return_code\":200}");
HTTP/1.1 200
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 19
Date: Sat, 05 Nov 2022 18:15:48 GMT


2. Block NOT work.
@PostMapping({ "/nimble_auth" })
public ResponseEntity<?> nimble_auth(@RequestBody String requestBody) {
JSONObject jres = null;
JSONParser parser = new JSONParser();
try {
jres = (JSONObject) parser.parse("{\"return_code\":403}");
} catch (Exception e) {
LOGGER.error("Internal error {}", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(e.getMessage());
return ResponseEntity.ok(jres);
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 05 Nov 2022 18:24:23 GMT


I will be more careful, thank you!

Post a reply

Post a new question


This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.