Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method to access SSL certificates at handshake #242

Open
glassfishrobot opened this issue Mar 24, 2016 · 4 comments
Open

Method to access SSL certificates at handshake #242

glassfishrobot opened this issue Mar 24, 2016 · 4 comments
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Milestone

Comments

@glassfishrobot
Copy link

When a WS connection is established through a secure TLS connection, it would be useful to get info about the certificates used. In a JAX-RS ContainerRequestFilter I'm used to get this information using:

@Priority(Priorities.AUTHENTICATION)
public class AuthenticationFilter implements ContainerRequestFilter {
    @Override
    public void filter(ContainerRequestContext containerRequestContext) throws IOException {
        X509Certificate[] certificates = (X509Certificate[]) containerRequestContext.getProperty("javax.servlet.request.X509Certificate");
        // process authentication based on certificates
    }
}

I tried to use a similar approach in a custom ServerEndpointConfig.Configurator, looking for the same information in the HandshakeRequest, but I couldn't find a way to get it.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by heruan

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA WEBSOCKET_SPEC-242

@glassfishrobot
Copy link
Author

@glassfishrobot glassfishrobot added Priority: Major enhancement Adding a new feature or improving an existing one labels Feb 12, 2018
@markt-asf markt-asf added API (Both) Impacts the client and server API Jakarta EE 10 labels Apr 16, 2020
@markt-asf
Copy link
Contributor

See also #255 and #218

@markt-asf markt-asf added this to the backlog milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Projects
None yet
Development

No branches or pull requests

2 participants