• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 466
  • Last Modified:

Reading SSL Certificate Information from a Java/Javabean

Experts,
  I have a java bean that is being deployed in JBOSS in the secure mode (SSL/HTTPS).  Is there a way for me to programatically find out which client (based on the ssl certificate(?)) invoked my java bean?  Please help.

Thanks,
jc
0
johnchan2000
Asked:
johnchan2000
1 Solution
 
rrzCommented:
If you have access to the request obect try
String name = request.getUserPrincipal().getName();
0
 
muktajindalCommented:
After getting the name as mentioned above, you can extract the common name (cn) to get the client name.
0
 
johnchan2000Author Commented:
Thanks!!! That's it.  I was baffled for a while because I tried that and keep getting null - it turned out that the client/user must be authenticated.  Anyways, this is the solution I was looking for.

Thanks,
jc
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now