My web application authenticates the user based on user's x509 certificate.
For now, I've configured tomcat for mutual authentication by setting "clientAuth=want"
.
However, as this certificate exchange happens during SSL handshake phase, I see following limitations with this approach:
- All other applications deployed on the same tomcat also ask for user's certificate, which may not be necessary.
- Whenever the first request is made to the server, it could be any public url such as css or img urls, the certificate pop-up comes on user's browser.
- Javascript calls to my web application from any other app's UI, causes this pop-up on user's browser.
- Once the https session is established, subsequent requests contain only end user's certificate and not the entire chain.
Is there any way using which I can negotiate with the browser and get user's certificate whenever my application needs it?
P.S. I already asked this question on stackoverflow, but no luck there, hence posting it here.