GNOME Bugzilla – Bug 774416
RTSP digest Authentification for gst-rtsp-server
Last modified: 2016-11-21 07:41:08 UTC
Need a way to use digest Auth for RTSP server Now only basic Auth is supported: gst_rtsp_auth_make_basic gst_rtsp_auth_add_basic Need similar methods for RTSP digest Authentification
Created attachment 339993 [details] [review] rtsp-auth: Add support for Digest authentication
Review of attachment 339993 [details] [review]: ::: gst/rtsp-server/rtsp-auth.c @@ +792,3 @@ + + GST_DEBUG_OBJECT (auth, "check Digest auth"); + The code to parse the Digest auth header, and to check if the response is the correct one (i.e. to generate the response), is copied from the RTSP RECORD sink and/or RTSP connection. Should probably be exposed as API in libgstrtsp instead before this here is merged.
Review of attachment 339993 [details] [review]: ::: gst/rtsp-server/rtsp-auth.c @@ +730,3 @@ +auth_digest_compute_response (const gchar * method, + const gchar * uri, const gchar * hex_a1, const gchar * nonce, + gchar response[33]) I would add a gst_rtsp_generate_digest_auth_response(algorithm (=="md5", method, real, username, password, uri, nonce) @@ +837,3 @@ + response = g_strdup (value); + else if (!uri && strcmp (item, "uri") == 0 && value) + uri = g_strdup (value); And for this a gst_rtsp_message_parse_authorization(request, &method, &tokens) Where tokens is a struct {char *key; char *value} (do we have something reusable for that?)
Created attachment 340230 [details] [review] rtsp: Add gst_rtsp_generate_digest_auth_response() to calculate digest auth response
Created attachment 340237 [details] [review] rtsp: Add gst_rtsp_message_parse_auth_credentials() to parse authentication credentials
Created attachment 340238 [details] [review] rtspsrc: Move to new helper function to parse authentication responses
Created attachment 340250 [details] [review] rtsp: Add gst_rtsp_message_parse_auth_credentials() to parse authentication credentials
Created attachment 340251 [details] [review] rtspsrc: Move to new helper function to parse authentication responses
Created attachment 340252 [details] [review] rtsp-auth: Add support for Digest authentication
Created attachment 340253 [details] [review] rtspclientsink: Move to new helper function to parse authentication responses
Created attachment 340293 [details] [review] rtsp-auth: Add support for Digest authentication
Created attachment 340294 [details] [review] rtspclientsink: Move to new helper function to parse authentication responses
Attachment 340230 [details] pushed as 828c860 - rtsp: Add gst_rtsp_generate_digest_auth_response() to calculate digest auth response Attachment 340250 [details] pushed as 90b24d3 - rtsp: Add gst_rtsp_message_parse_auth_credentials() to parse authentication credentials
Comment on attachment 340251 [details] [review] rtspsrc: Move to new helper function to parse authentication responses Attachment 340251 [details] pushed as 058ab0d - rtspsrc: Move to new helper function to parse authentication responses
Attachment 340293 [details] pushed as 927a44c - rtsp-auth: Add support for Digest authentication Attachment 340294 [details] pushed as 6622b5b - rtspclientsink: Move to new helper function to parse authentication responses