HAProxy community

Dynamic userlist from file or lua script

I’d like to setup basic auth with userlist(s) that have to be dynamically generated with a lua script. Is that possible? From what I’ve read userslists are static and have to be defined in the haproxy.cfg. But maybe I missed something
Thanks in advance,
Julian

Hi,

You are correct, the userlist are static.
You may be able to do something dynamic by storing your credential in a Lua array, use a Lua service for unauthenticated people and a lua fetch for people who sent authentication headers (to validate if their auth is valid or not)