Solved

Reading SSL Certificate Information from a Java/Javabean

Posted on 2008-10-29
3
439 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

792 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