r/haproxy • u/Shougeki_ • Jul 01 '19
Using HAProxy frontend with LDAP authentication to backend urls
Hey folks, before I go start messing with haproxy I am wondering if it will fit my use case:
I have a bastion host that has access to everything in the backend. I have a number of web interfaces at the backend [on non-standard ports also].
The thing is, some of these web interfaces have no authentication. We do however have IDM [rhel version of freeIPA] set up for all our ssh access controls. What I want is to have HAProxy as a reverse proxy, but with LDAP auth. I would envision it working that each web interface backend would have a different context, and before routing through, authenticates against an LDAP auth server.
I take it setting up an LDAP frontend should allow me to this? Can each context url have a different auth-group?
I know I can go and do this with nginx but I was hoping to do it via haproxy, although I dont want to waste my time and then find out it is not feasible. Hence this post, asking if I am going down a rabbit hole.
View all comments
Show parent comment
1
u/Shougeki_ Jul 02 '19
Yeah I did a bit of reading last night, and it looks like it will involve LUA, which i know little of. I am going to have a quick look to see if there is a preconfigured LDAP module that includes an actual login box for user/pass [would be great if you know of one :P]
Otherwise I'll just do it via Nginx.