Solved

Reading SSL Certificate Information from a Java/Javabean

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
replace a word with other 1 43
pagenation logic how it is working in my code 1 26
Convert from a json string array to a Java object 3 28
Problem to Alipay 10 17
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

816 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

13 Experts available now in Live!

Get 1:1 Help Now