I am trying to figure out what all is required to configure my server so that I can authenticate users using LDAP on the backend. Is it just a matter of setting a configuration file, or do I need to write some custom code to connect to the LDAP server? I have googled JAAS/LDAP tutorials and they all say to write custom code in order to do this, but I thought that the JAAS framework would allow for the configuration file to just be modified in order to change how users are authenticated.
Not sure what you are asking. I have a client/server architecture. I want the server to authenticate clients upon login using information stored in an LDAP server. My question is, do I have to write custom java code in order to perform this task, or can I just write a specific configuration file that JAAS can use in order to authenticate users with information found in the LDAP server.
If you can find a LDAP LoginModule implementation for you , you can config it to be used in JAAS directly. If you cannot find one , you have to write one by yourself. Another thing is all the code should be called by Subject.doAs or Subject.doAsPrivileged. So you would write some code for that. After that if you change the authentication to a database , you might just change your config file
OK, I have the JndiLoginModule working. Sorta. Now, is there a way to specify a bind password for the LDAP password? This is not the username/password that I am authenticating, but the username/password to connect to the LDAP server in order to authenticate users connecting to my server(see diagram)
client <---> server <---> LDAP
On top of spaghetti all covered in cheese, there was this tiny ad: