Skip to content
Ricardo Bánffy edited this page May 31, 2017 · 2 revisions

HTTP basic auth support

Usage

generate password hash : openssl passwd -1 badpassword add an extra label : HAPROXY_0_AUTH=My auth realm:username:$1$Xy3nnCCX$l16GhJiqDZQnBaWPYtB6K.

Currently implemented for http and https, with path support

Recipes

add a second username / password pair

overwrite USERLIST_HEAD with an extra label

HAPROXY_0_USERLIST_HEAD="userlist user_{backend}\n user {user} password {passwd}\n  user user2 password $1$my_hashed_password2 "

use insecure password

Not recommanded, use with care AND protect the _haproxy_getconfig endpoint overwrite USERLIST_HEAD with an extra label

HAPROXY_0_USERLIST_HEAD="userlist user_{backend}\n user {user} insecure-password {passwd}"
HAPROXY_0_AUTH=My insecure auth realm:username:badpassword

adding an extra superadmin global username/pass

overwrite USERLIST_HEAD global template

userlist user_{backend}
   user superadmin password $1$my_hashed_super_password
   user {user} password {passwd}