logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: CSRF between Apache and Tomcat
Author
hdevine



Joined: 20 Aug 2018
Posts: 2
Location: United States, Atlantic City

PostPosted: Tue 21 Aug '18 2:28    Post subject: CSRF between Apache and Tomcat Reply with quote

We have a project that operates on Tomcat via port 8080. We need to have the content protected by Apache via SSL, which we have working with a certificate we purchased. We then set up an Apache virtual host listening on 443 to ProxyPass the desired application to http://localhost:8080/app.

When we go right to the application via Tomcat, everything works. In other words, http://localhost:8080/app loads fine. However, if we try https://localhost/app, we see a bunch of errors in the browser's debug console stating that CSRF_GUARD_JS cannot be found. We have been working with both the vendor of the software (who suggested we look on this site), as well as Red Hat, as our server is RHEL 7.5.

The vendor is telling us that they believe that Tomcat is sending out a security token, and Apache is not responding to it accordingly, and therefore, causing our issue. Red Hat has been looking at it for several days, and they can't find what needs to be done in a cookie or request header to allow this to work.

Does anyone have any ideas? We have been dealing with this issue for several weeks, and our users refuse to use the software without this being corrected. I just can't seem to get any answers from anyone at this point.

I can provide Apache and/or Tomcat logs in the morning, as I'm not at the office right now.

Thanks,
Harry
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 21 Aug '18 10:23    Post subject: Reply with quote

You might can avoid that if you connect to Tomcat with ajp instead of http.
Back to top
hdevine



Joined: 20 Aug 2018
Posts: 2
Location: United States, Atlantic City

PostPosted: Tue 21 Aug '18 13:40    Post subject: Reply with quote

If I do that, I get "503 Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.". I changed this in my .conf file for the virtual host under /etc/httpd/conf.d. Do I need to change anything in the Tomcat configs too?

Thanks,
Harry
Back to top
mraddi



Joined: 27 Jun 2016
Posts: 149
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Sun 26 Aug '18 19:11    Post subject: Reply with quote

Is ajp enabled in tomcat's server.conf?
Code:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
Back to top


Reply to topic   Topic: CSRF between Apache and Tomcat View previous topic :: View next topic
Post new topic   Forum Index -> Apache