I need to access the HttpServletRequest properties in order to get the javax.servlet.request.X509 certificate containing an X509Certificate certificate X509Certificate for TLS requests.
From JAX-RS ContainerRequestFilter I can easily extract this from the ContainerRequestContext.getProperty(String property) method, but I cannot find a way to get it from the WebSocket Session or HandshakeRequest from which I can access the HttpSession instance, but not the HttpServletRequest .
Note: this is not a duplicate of Access HttpSession from HttpServletRequest to Web Socket @ServerEndpoint , since I need accesso for HttpServletRequest (or the equivalent for retrieving TLS), not HttpSession .
Since WebSocket is a superset of HTTP, I suppose this should be possible and hope that the Java team thought of a way to access the properties of the servlet, but I really could not find them. Does anyone know if this is possible at all?
source share