-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do you handle authentication? #5
Comments
Firstly thank you for your kind words 😃 This has been a personal project that grew a too large and took up a too much time, I'm really happy with the reception it achieved. I think there are primarily two main ways to deal with authentication. You either embed it into the application itself or use a micro-services approach.
I believe the best way to solve this problem is to have an authentication service and use a load-balancer that sends all unauthenticated traffic to that authentication service and all authenticated requests to their intended destination. The big advantage of this is you create a sort of single sign-on, at least within your suite of products and you also don't have to add code to do authentication into all of your services, so it's more DRY... I don't know about you, but I think authentication code is always non-trivial and stressful to write, I don't want that multiple times! So I'm doing number 2, but I'm more than happy to give you a few pointers. Service Graph
The Authentication Gateway, could choose to pass authentication to Google / GitHub / Microsoft / Auth Zero and depending on their response, send the appropriate response to the Load Balancer. You could of course choose to maintain usernames / hashed-passwords within the Authentication Gateway itself. The key to all of this is NGINX's We use this method at work and I wrote the authentication system (against Microsoft) over two years ago and I've pretty much not touched it since, it's particularly nice because there's not even a user-interface for the authentication gateway, it just bounces them to Microsoft. I'm planning to write a blog post about this because I think so many people use the first option without knowing about the second and I believe the second is far superior many circumstances. Anyway I wrote the basic code for this blog post about 6 months ago so I've just published it in another repository. Of course the load-balancer is also a great place to do SSL termination too |
Hi Matt, I'm kind of overwhelmed by such a great and lengthy reply, I've learned a lot just by reading it and clicking through the links! It would be nice to include some documentation on this project, to offer some guidance to other fellow users. If you don't mind I'd leave the issue open as a reminder for anyone willing to document this. I don't exclude it could be me as soon as I get some bandwidth to start hacking around with this project! |
I’m impressed by your tool and would love to use it at our company. Thanks for publishing it!
How do you authenticate/authorize access to the admin panel published via esqlate? Can you offer pointers?
The text was updated successfully, but these errors were encountered: