ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.75k stars 5.28k forks source link

on_publish rtmp authentication #3906

Closed bugsyb closed 4 months ago

bugsyb commented 6 months ago

Currently using nginx-rtmp-mod which supports i.e. on_publish http://localhost:44444/auth;

This effectively implement authentication fulfilled elsewhere and returning 200 or 401 depending on good/bad credentials.

Any chances to add the like of on_publish to SRS?

Did the RTFM and only reference to auth is in regards to HTTP API, can't find also anything relate to on_publish in regards to rtmp.

Thanks!

bugsyb commented 6 months ago

Feeling is that it should be somehow reachable using token/http_callback. Just unsure how to connect it all into one: https://ossrs.net/lts/en-us/docs/v4/doc/drm#token-authentication

For my use case, need a simple user/pass auth, which have currently done through on_publish in nginx and validated by third party flask app validating credentials.

Can this be somehow plugged into SRS? If not, what would be recommended solution (best would be an example, as feeling is that token can partially support it). It needs to be static token.

winlinvip commented 4 months ago

This issue is addressed in the Wiki, please refer to the documentation. The issue will be removed, kindly read the FAQ first: #2716.

TRANS_BY_GPT4