LDAP bits
Main objective today is to put #LDAP authentication on a #Fuseki server.
I've already got both running, apparently ok, on hyperdata.it
Apache Directory Studio seemed the obvious management client. Running locally, it looks like it's seeing the server fine.
Ok, I'll start at the LDAP end, I do need to refresh my memory on this stuff. Something simple in relative isolation before I think about Fuseki. A signup/login form.
Copilot autosuggested from my miskeying: Chtulu, I mean Fuseki, is running on port 3331. I'll try to get a simple LDAP client running on the same machine.
I have an Ubuntu server with LDAP running. I also have nginx running on the same machine. I'd like to make a simple sign-up login form, using nodejs on the server. I have Apache Directory Studio running locally for LDAP management. Where do I start?
ChatGPT gave me a reasonable-looking starting point.
I've stuck it on GitHub at https://github.com/danja/hyperdata-node, locally :
~/HKMS/hyperdata-node
on server
root@hyperdata:/home/www/hyperdata.it# ln -s /home/github/hyperdata-node ./nodes
Oops, I've already got a ~/HKMS/node-services, has .git. Hey ho, merge them later.
I just remembered PM2 for managing nodejs services. Used it before, was straightforward.
2024-06-28
I had another look at the bits above, it seems there was a better approach than ldapjs, not least because that's deprecated.
Passport.js seems to be the way to go.
This time I'll use my earlier ~/HKMS/node-services, wipe that newer one.
2024-06-29
Hooray! after another hour with Cursor I've got LDAP signup & login forms that work.
Boo! It's still inserted the deprecated ldapjs library.
It's possible that the passport-ldapauth lib depends on ldapjs, but whatever, this'll do for now.