Add ldap auth to custom webapp?
-
I am building a Node.js based custom webapp. But I don't want my webapp files (/app/data/public) files to be publicly accessible unless it's a cloudron authenticated user. So I want to add a login prompt in front of the app (auth wall I think?).
Example: Assume Surfer app is installed at surfer.x.com, going to surfer.x.com/_admin/ shows what I am looking for.
So I am currently referring to: https://git.cloudron.io/cloudron/surfer/-/tree/master/frontend
I have added the ldap add-on in CloudronManifest.json.
What is the easiest way to accomplish this? Is the Surfer app approach the best way to go about it?
I also found this thread on the forums:
https://forum.cloudron.io/topic/3682/proxyauth-addon/14
Is this what I am looking for? -
@saikarthik Yes, the proxy addon seems good for what you are looking for.
However, it's not available yet, it'll only be released with Cloudron 6 (I think the devs estimated about 2 weeks, but it's only an estimate).
Also, it does not allow for more fine-grained control, so if you want to restrict only a few things, you'll have to do it manually, and in that case yeah you can take inspiration in the Surfer app for example.