I have this application and I have been asked to implement https, I have edited the XML file with the following lines:
<connector name="https" protocol="HTTP/1.1" scheme="https"
socket-binding="https"
enable-lookups="false" secure="true">
<ssl name="kikou-ssl" key-alias="kikou"
password="kikou"
certificate-key-file="../standalone/configuration/kikou.keystore"
protocol="TLSv1" verify-client="false"/>
</connector>
So far every thing is fine; I have HTTPs working fine, BUT, what I have to do is to use the HTTPS only for couple of wabservices! so I don't really know how to do it.
I thought about two solutions but I don't know really how to try them:
- Edit the xml file with an attribut like :
javaclass="search"
. Add something in the search class but here I don't know what to put, I have tried so far:
if (httpServletRequest.getRequestURL().toString().contains("/user/account") && servletRequest.getProtocol().contains("HTTP")) { throw new ResourceNotFoundException("The url should be HTTPS"); }
But it didn't work.
Thank you for any comments or answers!