Caltech Library logo
skip to main content

NAME

auth - Basic HTTP authentication for web services

SYNOPSIS

access_file = ACCESS_FILE

[access] auth_type = “Basic” auth_name = REALM routes = [ PATH, … ]

DESCRIPTION

Basic HTTP authentication for protecting access to web services. Users managed via webaccess command line tool.

USER MANAGEMENT

webaccess init access.toml
webaccess add access.toml alice
webaccess update access.toml alice
webaccess remove access.toml alice
webaccess list access.toml

PASSWORD ENCRYPTION

Supported methods (default: argon2id):

encryption = "argon2id"

PROTECTING PATHS

Protect all requests (default if no routes):

[access]
auth_type = "Basic"
auth_name = "Restricted Area"

Protect specific paths only:

[access]
auth_type = "Basic"
auth_name = "Admin Area"
routes = [ "/admin/", "/settings/" ]

SECURITY

ALWAYS use HTTPS with authentication:

[https]
cert_pem = "/etc/certs/cert.pem"
key_pem = "/etc/certs/key.pem"

[access]
auth_type = "Basic"
auth_name = "Secure Area"

TESTING

curl -I http://localhost:8000/admin/
curl -I -u username:password http://localhost:8000/admin/

SEE ALSO

config-file, webaccess, tls