0

Right now I have my web application code residing in the tomcat. Basically,my web based code make ajax calls to the web service written in Java.It basically get deployed in the war file and then the project is run on tomcat.

Regarding Authentication:

We need to implement authentication for the users using LDAP and we have a requirement that it should happen in Apache web server and not in Tomcat where my code resides. So, I am wondering, what is the best process in this scenario, I mean, should I move my code to Apache and then have my code talk to Tomcat which is calling web service. In this way, I can pull the user related details from Apache in some way.

OR

Is it a good idea to have my code in Tomcat only where it is right now and then get the user related details after authentication reach tomcat from Apache?

John
  • 145
  • 8
  • You don't have any choice. If authentication is done in Apache, then all you get in your application is a REMOTE_USER environment variable to tell you the username. – Michael Hampton Nov 15 '16 at 15:03
  • @MichaelHampton Thanks for your input. So basically where exactly you think my code should reside in this case, tomcat or Apache? Also, since I am only using javascript to make Ajax calls and no server side language, can I retrieve the username(REMOTE_USER) with plain javascript or jQuery? – John Nov 15 '16 at 15:05

0 Answers0