Solved

Reading SSL Certificate Information from a Java/Javabean

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now