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
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.
6 Comments
xfocus
how can i manage or detect smart card removal event? and how to disconnect the client after.
Cratylus
@xfocus:You did not mention this in the OP.And I don't know how you could detect this.Depends on your client program?
xfocus
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.
Cratylus
@xfocus:Perhaps send a message to server to indicate this happened?
xfocus
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?
|