File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes How to organize X509 authentication in web application with Java and Spring? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How to organize X509 authentication in web application with Java and Spring?" Watch "How to organize X509 authentication in web application with Java and Spring?" New topic
Author

How to organize X509 authentication in web application with Java and Spring?

Ronhul Olafson
Greenhorn

Joined: Jul 05, 2011
Posts: 1
I have USB token with private key and X509 certificate on it. It can be seen from Firefox so it is OK. I have sample application from Spring Security (I'm using version 3), which just demonstrates different types of authentication. That app was deployed on JBoss AS 6. I've searched many forums and articles for info, how to use X509 cert instead of using login/pass auth (Example: x509 authentication with spring security 2.0.4). Everywhere i've seen: "Just add x509 tag in your applicationContext.xml", "Oh, thanks! It works!". There is x509 fragment in sample app from Spring Security in applicationContext.xml which was commented. I've uncommented that stuff, but nothing works. That app logs all actions, so I can see, that X509 filter is firing when I load an app page, but it does nothing, because it writes in log: "No certificate found in user request".

Can you help me with that problem? Should Spring get CN from certificate from browser and use it instead of login name? What do I do wrong?

P.S. I have right user service block in applicationContext.xml. It works with standart login/pass form.

P.P.S. And sorry for my language - it isn't my native one.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to organize X509 authentication in web application with Java and Spring?