I have a spring boot 1.2 web application is deployed on standalone tomcat.
I need to authorize an url based on remote IP.
In case of embedded tomcat , we can use
server.tomcat.remote_ip_header= x-forwarded-for
How do we configure, when deployed in standalone tomcat.
Note :
I did try RemoteIpValve of tomcat by setting remoteIpHeader="x-forwarded-for" and it did not work and My tomcat is behind a web Application firewall.
without changing tomcat settings etc, can we tell spring security to look for remote ip in x-forwarded-for(in stand alone tomcat deployement)
You can use Remote IP Filter available with Tomcat. There are many such filters available.
Please see (Tomcat Documentation](http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Remote_IP_Filter)
You can configure these filters in $CATALINA_BASE/conf/web.xml which will be available for all web application or you can do it in web applications web.xml.
Related
Is there a way to deploy a containerized say .net core web app to IIS on a web server and use things like docker swarm and a virtual load balancer.
Am I looking at this all wrong? Would IIS even factor here?
If you want to go down this path, IIS does run in a (Windows) container, however most web apps I’ve seen uses Kestrel as the application web server (I.e. the default netcore images) and some kind of reverse proxy in front (Nginx, HAproxy) to handle things like load balancing, SSL termination and serving of static content.
I think the use case for IIS (though I haven’t used it so I may be wrong here) is to serve legacy ASP.net applications in a containerized environment.
See:
https://hub.docker.com/r/microsoft/iis/
I have one application says "app1"(main application support login) which is deploy some different machine tomcat server and another application says "app2" which also deployed in another machine tomcat server. So, should i need to install siteminder web agent to both the machine or it is on only in "appl2"?
Depends on what kind of agent you are using- if you're using a web agent for a web server (IIS, Apache), you could just install it on that box assuming it handles requests to both app servers. If you are installing the agent for the app server, Siteminder could log the user into the app on the "app1" server, and then the app/app server token could be passed to "app2"
You can use a traditional reverse proxy (apache with mod_proxy) or SiteMinder Secure Proxy Server to handle the Web Agent work and forward traffic to the destination web/app servers.
Secure Proxy Server enables your Single Sign-On environment to have "agentless" capabilities. You will still have 1 or more SiteMinder Web Agents (depending on the number of proxies that are deployed), but the web and application servers will not need to have any agents installed. The web/app servers only need to be able to consume the HTTP Headers provided by SiteMinder.
is it possible to deploy java app and rails app to same EC2 sever. I have a rails app that communicates a java app via AJAX so I need to deploy both to same server. Is there any way to do that or any resource to see how to?
I guess it is possible by using apache2 with tomcat and passenger. Is it true?
You can install two servers in diferent ports i.e. Apache HTTP on 80 and Apache Tomcat (or other) on 8080. Also you can use mod_jk if you want attend all your clients through Apache HTTP. MOD_JK enables to you to integrate Apache Tomcat and Apache HTTP.
how can i convert my grails application from http to https under Linux operating system
the configuration depends on what container you are running the application in your production environment. You should be deploying a war to your Production Server not doing a grails run-app -https
here is a stackoverflow question with a configuration for Tomcat.
I am certain you can google around and find proper configuration based on your application server
What do you mean by "convert"?
You can run the embedded tomcat with HTTPS enabled by adding -https to the run-app command:
grails run-app -https
If you want HTTPS enabled in production then you need to configure your app server to support it.
We have Ruby Rails and Apache tomcat servers running on the samw windows server. When the App on Apache Tomcat is installed alone its working fine, but when the ruby app is installed, the Apace Tomcat App stops working. We need to have both the apps running on the same server. Please help. The application running on Tomcat is displaying the login screens and allowing the users the login. And then rest of the things are failing. The application running on Ruby is just fine as expected. Also, we installed Apace Tomcat and then Ruby on to this server. so there are a lot of chances that the Ruby took Tomcat's port. But how to figure out the overlap?
You probably have both trying to bind to port 80. Whatever server you're using for rails (passenger via nginx/apache http server, nginx+thin/mongrel, etc) is bound to port 80, then tomcat tries to do the same and can't.
If you're using nginx, I would configure tomcat to run on 8080 and reverse proxy http requests to tomcat based on the hostname of part of the url.
You can do this too with apache http server with mod_proxy.