Skip to content

authentication

User65k edited this page Jul 15, 2021 · 1 revision

Specify the key auth in a mount path.

sub key meaning
type Authentication method to be used
realm String describing the secured area

Digest

Clients will have to authenticate like described in rfc2617. MD5 will be used as Hash.

Additional keys:

key meaning
userfile path to htdigest file

htdigest file

File containing a list of users with their password. Each line has the form user:realm:md5(username+":"+realm+":"+password).

It can be created using htdigest

$ sudo apt install apache2-utils
$ htdigest
Usage: htdigest [-c] passwordfile realm username
The -c flag creates a new file.
$ htdigest -c test_file "needs auth" test_user

Config

dir = "/var/www/"
auth = {type = "Digest", userfile = "./test_file", realm = "needs auth"}

Clone this wiki locally