Solved

Reading SSL Certificate Information from a Java/Javabean

Posted on 2008-10-29
3
453 Views
Last Modified: 2013-11-24
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
Comment
Question by:johnchan2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 27

Accepted Solution

by:
rrz earned 250 total points
ID: 22835682
If you have access to the request obect try
String name = request.getUserPrincipal().getName();
0
 
LVL 5

Expert Comment

by:muktajindal
ID: 22838994
After getting the name as mentioned above, you can extract the common name (cn) to get the client name.
0
 
LVL 1

Author Closing Comment

by:johnchan2000
ID: 31511389
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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question