Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is realm in htdigest?

Tags:

apache

htdigest needs the following parameters:

Usage: htdigest [-c] passwordfile realm username

What is the realm for? What value should I use to setup htdigest?

like image 443
Chau Chee Yang Avatar asked Nov 26 '11 04:11

Chau Chee Yang


2 Answers

Anyway, realm denotes authentication domain for challenge-response. In the case of digest authentication realm value participates in the password hash, that why it is required when storing password files.

See https://www.rfc-editor.org/rfc/rfc2617#section-3.2.1 for details.

like image 102
OnTheFly Avatar answered Sep 30 '22 13:09

OnTheFly


Usually the realm is the same that the authname in your .htaccess as it will be displayed at prompt for login and password

i.e:

<Location /prived/>
AuthName "Prived zone"
AuthType Digest
AuthUserFile /var/www/authfile/priveduser
AuthGroupFile /var/www/authfile/privedgroup
AuthDigestDomain /prived/ /protect/
Require group valid-users
</Location>

htdigest -c /var/www/authfile/priveduser "Prived zone" titi

like image 23
user2204789 Avatar answered Sep 30 '22 13:09

user2204789