logo

How to create basic authentication on HAProxy(Userlist)

About Userlists

You can control access to frontend/backend/listen sections or to http stats by allowing it only to authenticated and authorized users.To do this, you need to create at least one userlist and to define users.

Go to TOP

Create Userlists

For creating a userlist go to the HAProxy -> Add proxy -> Userlists tab.

Select a server where you would like to create the userlist and enter the name of the userlist (in the black box)

If you would like to create a group inside the userlist, enter the name of thsis group group(in the green box). Press the "+" if you would like to add extra groups.

Add usernames and passwords for them(in the green box). Press the "+" if you would like to add extra users

Note: Roxy-WI creates a plain password without hashing it!

Also you can set groups for users(in the yellow box)

Go to TOP

Add Your Userlist to HAProxy config

Create an ACL rule inside frontend/backend/listen section that will allow every user defined in specified userlist:

If you would like to use a group from the userlist, create the following ACL:

Go to TOP

Was this article helpful?

Yes, thanks!
Go back