Enable RTSP Digest Authentication With Gstreamer

Dwight Kulkarni dwight at realtime-7.com
Tue Aug 31 14:19:21 UTC 2021


Hi Michael and everyone,

Thank you for that info. When reviewing the referenced code snippet, I had
two questions

1) *gst_rtsp_media_factory_add_role* (this->factory, user_name,
      GST_RTSP_PERM_MEDIA_FACTORY_ACCESS, G_TYPE_BOOLEAN, TRUE,
      GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT, G_TYPE_BOOLEAN, TRUE, NULL);

What is the difference between: *GST_RTSP_PERM_MEDIA_FACTORY_ACCESS*  and
*GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT*

When I checked the docs, both said FALSE will return a 404 error when
trying to access the media. In the code, it appears to setup some users
only with MEDIA_FACTORY_ACCESS and not MEDIA_FACTORY_CONSTRUCT.


2)  After the roles are added if the user access changes. For example a
user is removed or their password updated, I could not find a way to remove
the user.

For example the code calls two functions to create the user and set the
password, I wanted the opposite to undo this.

//set the user
*gst_rtsp_media_factory_add_role( ... )*  ->
*gst_rtsp_media_factory_remove_role(
.. )*
*gst_rtsp_auth_add_digest  ( ... ) *->   *gst_rtsp_auth_remove_digest ( ..
)*


Thank you !




On Mon, Aug 30, 2021 at 6:33 PM Michael Gruner <michael.gruner at ridgerun.com>
wrote:

> Hello Dwight
>
> Here's a working example from the server repo itself:
>
>
> https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-auth-digest.c
>
> Michael
> www.ridgerun.com
>
>
> On 30 Aug 2021, at 14:09, Dwight Kulkarni via gstreamer-devel <
> gstreamer-devel at lists.freedesktop.org> wrote:
>
> Hi All,
>
> I have got Gstreamer working with my C++ program and I am using the RTSP
> server in Gstreamer to work with my pipeline.
>
> When I visit the network address: rtsp://192.168.0.20/myserviceurl
>
> It is showing the network stream correctly in VLC Client.
>
> However, now I want to turn on digest authentication so that we can secure
> the stream, and it can only be seen when the username and password is
> supplied in VLC like so:
>
> rtsp://username:password@192.168.0.20/myserviceurl
>
> If my program has a list of users and passwords, how can I register them
> with the Gstreamer RTSP server and require digest authentication?
>
> --
> Sincerely,
>
> Dwight Kulkarni
>
>
>

-- 
Sincerely,

Dwight Kulkarni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210831/c49bf7b9/attachment.htm>


More information about the gstreamer-devel mailing list