web applications - Java web app serve both secure and insecure resource -
i writing java web app (spring 3.2).
basically, have several sites need access web service. these sites mixture of both secured (ssl) , insecured. have endpoint /validate/{id} should respond both secured requests
(https://localhost:8443/ws/validate/123 , http://localhost:8080/ws/validate/123)
how do this? i've added
<security-constraint> <web-resource-collection> <web-resource-name>ws</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>confidential</transport-guarantee> </user-data-constraint> </security-constraint>
to web.xml, forces ssl ( calls 8080 302 found response location header pointing 8443.
how allow both secured , insecured requests on same endpoint (with different ports)?
<transport-guarantee>none</transport-guarantee>
seems have done trick...
Comments
Post a Comment