4 ms·
I just add oauth in my proxy using libapache2-mod-auth-openidc, and set a HTTP header to pass user info to the server (which only accepts connections from the p
by iso1210 5y ago
I just add oauth in my proxy using libapache2-mod-auth-openidc, and set a HTTP header to pass user info to the server (which only accepts connections from the proxy IPs)
You can write your application in react, php, perl, bash, c, or just manually answer to http calls for all I care.
- chasd00 5y agothat's... very interesting, I never even thought about handling auth in this way (make a proxy do it). Granted, i haven't set up auth in an application in probably a decade so this may be SOP.
- mooreds 5y agoLove the gateway pattern. It's something I just spent some time investigating for a client and it is really elegant. How do you store the tokens that the OAuth server generates on successful authentication?
- iso1210 5y agoI leave that the the module, I believe it uses client cookies by default, but I use a persistent server cache on disk (the session tokens are stored encrypted) https://github.com/zmartzone/mod_auth_openidc/wiki/Session-management-settings https://github.com/zmartzone/mod_auth_openidc/wiki/Session-m...
- crucialfelix 5y agoI'm considering something similar for protecting some simple ML serving API endpoints. Just put a proxy in between. Something like https://github.com/gogatekeeper/gatekeeper/blob/master/docs/user-guide.md https://github.com/gogatekeeper/gatekeeper/blob/master/docs/... It's no problem to set up Django, but I don't want to have to separately protect all public endpoints.
- combinatoroid 5y agodo you have different backend servers for those endpoints?