Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User authentication and dynamic routing in traefik

I want to replace haproxy with traefik. But in order to that, I have to replace a Lua script which handles authentication (via auth token calling a rest API) and custom redirect (certain docker service) depending on headers and authentication from before. Is there an (easy) way to that?

Right now as for migrating I was thinking to leave haproxy for now and routing all valid traffic to traefik.

like image 806
fentas Avatar asked Oct 27 '17 17:10

fentas


1 Answers

Authentication and Traefik is not an easy thing. At my company, we just switched back from Traefik to nginx since handling ldap/kerberos/pki etc. With Traefik can be painfully awkward. There is the possibility to pass authentication on from Traefik to a 3rd party and collect the session token or other relevant information using Forward Auth, so maybe take a look at that. You can also use BasicAuth Although getting it to run with your setup might prove hacky.

like image 162
Daniel Avatar answered Sep 29 '22 02:09

Daniel