I have a webapplication which was deployed on tomcat and uses tomcat values, now the application is moving to websphere liberty and am not sure similar concept exists in liberty. Is there an equivalent tomcat valves concept in websphere libery profile? If yes, how can we achieve ?
Asked
Active
Viewed 236 times
2
-
2It's hard to tell. You would have to elaborate more, what your valves are doing to find the best match or alterntive for them in the Liberty. – Gas Sep 27 '17 at 11:23
-
these tomcat valves in my webapplication is restricting requests from unknown hosts. If perticular request is blocked, then it will redirect it to the error page. – veeru Sep 28 '17 at 05:56
-
This question is pretty old but I came to the same interrogations. We are using valve on JBoss and Tomcat to : - filter some URI depending on the requested port : supervision client should not be able to request business URI. This was achieved by implementing a valve based on RequestFilterValve - transform some values before logging them : remove double quotes around some header values. This was achieved by extending AccessLogValve. Does someone know how to achieve this kind of thing with Open Liberty ? – Clément Honoré Jan 24 '22 at 16:45
1 Answers
1
You can white/blacklist hostnames and ip addresses on a per-endpoint basis in server.xml. Blocked ones will get a connection reset message.
<httpEndpoint httpPort="19080" httpsPort="19443"
id="defaultHttpEndpoint" tcpOptionsRef="myTcpOptions" host="*"/>
<tcpOptions id="myTcpOptions" hostNameExcludeList="*.foo.com,*.ibm.com" />
There's more info on that here:
https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/urun_chain_typetcp.html
If you need different exclusions per app, you can use configure multiple endpoints and map them to applications using virtual hosts. https://www.ibm.com/support/knowledgecenter/en/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/cwlp_virtual_hosts.html

Bruce T.
- 992
- 4
- 5