4

I implemented a strong authentication in a web server (apache) and it work great. but I want to implement a java class that have to compare cac ID and suject name to the ones presents on java .properties file or XML

1 Answer 1

3

Not sure about your deployment but for example if you need to do that from a servlet deployed in Tomcat you could do:

X509Certificate[] certs = (X509Certificate[])request.getAttribute("javax.servlet.request.X509Certificate");   

If the client has send certificates then certs will have them and you can do the check you need and possibly reject according to your needs.
Note that this will happen after the SSL handshake has finished.

Sign up to request clarification or add additional context in comments.

6 Comments

how can i manage or detect smart card removal event? and how to disconnect the client after.
@xfocus:You did not mention this in the OP.And I don't know how you could detect this.Depends on your client program?
my middleware application(gemalto classic client) can detect and remove client certificate from personnal certificate store,after the card is removed,but i don't know how to take advantage of that.
@xfocus:Perhaps send a message to server to indicate this happened?
i don't realy know how to do that.cose the classic client only remove the client certificate so how the server will be informed?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.