After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796637 - rtsp-auth: Add support for parsing .htdigest files
rtsp-auth: Add support for parsing .htdigest files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other All
: Normal enhancement
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-20 02:44 UTC by Mathieu Duponchelle
Modified: 2018-06-21 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtsp-auth: Add support for parsing .htdigest files (11.01 KB, patch)
2018-06-20 02:44 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2018-06-20 02:44:01 UTC
Passwords are usually not stored in clear text, but instead
stored already hashed in a .htdigest file.

Add support for parsing such files, add API to allow setting
a custom realm in RTSPAuth, and update the digest example.
Comment 1 Mathieu Duponchelle 2018-06-20 02:44:07 UTC
Created attachment 372732 [details] [review]
rtsp-auth: Add support for parsing .htdigest files
Comment 2 Edward Hervey 2018-06-20 13:29:37 UTC
Review of attachment 372732 [details] [review]:

We might want to put some validation to check if the *realm* of each htdigest entry is consistent with the auth realm.

Apart from that looks good :)
Comment 3 Mathieu Duponchelle 2018-06-20 13:35:57 UTC
(In reply to Edward Hervey from comment #2)
> Review of attachment 372732 [details] [review] [review]:
> 
> We might want to put some validation to check if the *realm* of each
> htdigest entry is consistent with the auth realm.

Ah good point, do you reckon it should be an error? Eg if you have a .htdigest file with multiple different realms, I don't think we want that to error out, we can just ignore the entries with non-matching realms? Though if we do that, it will make the order in which set_realm() / parse_htdigest() are called matter, not sure we want that either :)
Comment 4 Mathieu Duponchelle 2018-06-21 13:28:27 UTC
Discussed on IRC, it is probably preferable to store all valid entries in the htdigest file, regardless of the realm, validation will be performed at authentication time, this means the order in which set_realm and parse_htdigest are called does not matter, also allows changing the realm later on without reparsing htdigest, I don't know whether that is a common use case but there's no need to prevent that :)
Comment 5 Mathieu Duponchelle 2018-06-21 13:50:25 UTC
Attachment 372732 [details] pushed as 5ede2a5 - rtsp-auth: Add support for parsing .htdigest files