Hi,
If the playback user is using the correct playback URL, with the correct security token, then his playback request will be authorized. However, you could restrict the secure token validity to the Client IP. This way, even if the unauthorized playback user is using the correct playback URL, his IP address won’t match the one for which that particular secure token hash was generated.
Zoran
Thanks Zoran for your answer, but I wonder if there is any possibility to forbid simultaneous connections based on the same “login”. I wonder if it is possible to implement given scenario:
-
our authentication backend checks user credentials and creates signed urls
-
let’s suppose that user “paluh” had authenticated and our system generated urls for him (there is only one custom parameter for simplicity which contains user login):
http://192.168.1.1:1935/vod/sample.mp4?myTokenPrefixLogin=paluh&myTokenPrefixhash=TgJft5hsjKyC5Rem_EoUNPasdfaqVPhhd0GxIcA2oo=
rtmp://192.168.1.1:1935/vod/sample.mp4/playlist.m3u8?myTokenPrefixLogin=paluh&myTokenPrefixhash=TgJft5hsjKyC5Rem_EoUNP7xZvxbqVPhhd0GxIcA2oo=
My question is:
Is it possible to write such, a plugin which will search for every (all http and rtmp and rstp) session (within given VHost or Application) with “myTokenPrefixLogin=paluh” parameter and “kills” such sessions, before it will allow Bob to access the stream?