How do I get the client certificate from the request

We are on Netweaver 2004 using the SAP webdispatcher (end-to-end). I need to do an OCSP validation, I have all of the code I need for the OCSP portion.  What I need is the X509Certficate that came from the client.  Is this stored in the request object, session? How do I get it?
Thanks.

Hi Joseph,
I think the question is which component terminates the SSL connection. It could be an upfront load balancer or the WebAS itself. The former could write the certificate into a request header vairable,  while the latter will create a J2EE standard request attribute: javax.servlet.request.X509Certificate
I never did it with the web dispatcher, but you can try the following:
X509Certificate[] certs = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate");
HTH
Daniel

Similar Messages

  • How can I get the requester inside a RequestDataValidator

    Hi all,
    I need to get the key of the requester in a class that implements the method Validate(RequestData) of class RequestDataValidator. The RequestData object does not have this information. Does anyone know hoe to get it?
    Regards,
    Kostas

    No, nothing in the validator. I have an ER with oracle for getting the pre-insert event handler on request. Also can see that your question is valid, may be someone from Oracle bothers to reply, I myself would be interested to see the solution.

  • How to exctract/backup a client certificate from Firefox for Android similar to question #1000240 but for the latest Firefox Beta for Android?

    As in #1000240 and in #1032181, I've installed a StartSSL login certificate in my Firefox for Android and having a problem with extracting/backuping it to use with another device/browser.
    I'm using the latest Firefox Beta for Android (35.0) at present; the Android version is 4.1.2, my phone model is Sony LT26i (Xperia S), so neither of the aforementioned questions asked at the Mozilla Support website do not contain any solution to the given problem.
    Any chance to recover the certificate?
    P. S. I haven't rooted my device; if getting a root is the only possible way to recover the certificate, I may consider doing so.

    You can try https://addons.mozilla.org/en-US/android/addon/copy-profile/ If that does not retrieve the file then see below.
    If you know the name and path of the file you can get it using run-as function of adb. See http://stackoverflow.com/questions/18471780/android-adb-retrieve-database-using-run-as
    If you end up down here you'll need root to be able to navigate the file system. I don't know the file name, though it is likely in your profile folder which can be determined by visiting about:cache in the Firefox address bar. It will be similar to /data/data/org.mozilla.firefox_beta/files/mozilla/$RANDOM.default/

  • How to get the request scope values?

    Hi,
    I have one question about Struts validate framework question is How can i get the request scope values when the validate method throws an exception?
    My scenario is I have some values in the request scope in one page. After submitting the page the validate method throws an exception, then the errors were displayed in the page and it ask for provide correct information. However, at this time the values in the first request will become null. How can I get those request values?
    Request.setAttribute(�con�, conn);Link after click this link user will display with user reg. form with user details input fields. After submitting he user details form if user provide some invalid information then validate method in Action form will throw errors and displayed the User details form with errors. However, the request attribute �con� will become null at this point of time. How can I get the user request attribute in user details form?
    Assume request have more than 100 values.
    Waiting for answer...
    Regards,
    Bhaskar Reddy

    Your code is probably fine, and you are probably running into http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6497210
    See also http://forum.java.sun.com/thread.jspa?messageID=9419890
    SUN needs to fix a few bugs for this to work...

  • How do I get the client IP Address from the HTTPServletRequest object

    Hi ppl,
    How do I get the IP address of the client machine from the HTTPServletRequest object?
    Thnx in advance,
    Manoj

    Take a look at: http://java.sun.com/products/servlet/2.2/javadoc/index.html and check for the ServletRequest Interface.
    Be aware also if your web server is using proxy, proxyReverse and so because you could end getting the servers' IP and not client one.

  • Applet does not get client certificate from browser (Firefox, IE7)

    I'm writing a web service which runs Tomcat through Apache. One critical requirement is that the service be able to invoke certain device drivers on the end user's machine. Fortunately, there is a Java API for this, so this requirement can be fulfilled using an applet.
    Here's the problem. This is a B2B application, so we're using SSL and requiring client authentication. I'm no web security guru, but I managed to get SSL set up through Apache (with a self-signed certificate for now; we'll get a real one from a real CA when we're ready to go to production). I also managed to set up client authentication by creating my own CA and generating a client certificate, which I then copied to my test client (Win XPSP2) and imported into both Firefox (2.0.0.15) and IE (6.0.2900). The applet is signed with a real certificate, and that causes no problems. And all of the pages for my web service work as expected.
    All except one. The page which is supposed to load the applet pops a dialog stating 'Identification required. Please select certificate to be used for authentication', and presents a list of zero certificates.
    Actually, I get this dialog in Firefox on my XPSP2 box, and also when I test on a Vista Home Premium box running IE 7.0.6000. Puzzlingly, this behavior does NOT occur on my XPSP2 box when running through IE 6.0. It seems that with XPSP2 and IE 6.0, the JVM can manage to obtain the required client certificate from the browser and pass it along to Apache, but the JVM can't do this when running in Firefox or in IE 7.0 on Vista.
    I have gone to the Java Control Panel and verified that the 'Use certificates and keys in browser keystore' option is selected on both boxes.
    I've done a fair amount of research for this (including in this forum) and see that this appears to be a chronic difficulty with applets. What makes it worse is that I don't think I can use the standard workaround, which is to download the applet from a different host/virtual host, because the applet needs to communicate with the web service. Since we have the additional layer of Tomcat container-managed user authentication, the applet needs to be communicating with the server using the same session token as everything else.
    So at this point, I'm stuck. Does anyone know a solution to this problem? Two thoughts (I'm reaching at straws here):
    1) I have the certificate imported in both Firefox and IE as a 'personal' certificate. Is there someplace else I can put it so the JVM will know how to find it? A rather old thread in this forum mentioned something about setting properties in the Java Control Panel, but I see no place in the JCP to specify such properties, so I'm guessing that solution is no longer operative.
    2) I'm using a trick I found on the internet to make the applet load cleanly with both Firefox and IE, namely, I'm using the <OBJECT> tag to specify the applet class and codebase for IE, and then using <COMMENT><EMBED ... /></COMMENT> within the <OBJECT> declaration to specify the information for Firefox. Is there some other way of doing the markup that will give the JVM a hint that it should get a certificate from the browser?
    BTW . . . I would hate to drop support for Firefox, but if someone has an IE-only solution, I'll take it. Unfortunately, I reckon a Firefox-only solution would not fly.
    Thanks all.

    My applet is also signed by a valid certificate. The question of whether the applet is signed/self-signed/unsigned >isn't an issue --- I just wanted you to make sure the Applet runs because it is a know valid Java2 Applet that is 100% signed properly and verified to run.
    This eliminates the possibility that it is a JVM issue. However after reading your message further I am afraid
    it is not relevant to your issue.
    due to the client authentication, my browser (Firefox, IE7) refuses to even download the applet.
    I went to your site, and I can see your applet in both Firefox and IE6. However, I don't believe your site is set up >quite like mine, because it appears I can run your applet whether I have imported your X509 certificate or not. What I >did was:If that is true we are all dead :) No I think you just missed the cert in the IE databse. It doesn't have to be in the
    Applet database to function. Surprise!
    Check your IE/tools/internet options/content tab/certificates/trusted root certification authorities.
    I then opened the Java control panel and verified that the certificate isn't listed there, either. So unless the certificate >is being cached/read from some other location (which could be, this certificate stuff is largely black magic to me), >then your server isn't requiring client authentication, either accidentally or by design.No HyperView is a valid java2 Applet and actually writes to a file "hyperview.dat" though it is probably empty.
    If you click on a component in the view and then on the view and type "dumpgobs" it shoud write out some data about the current graphics objects so you can see it has complete read/write access..
    Further it opens up a complete NIO server ands starts listening for connections on a random port
    (Echoed in your java console) You can connect to it with telnet and watch impressive ping messages all day :)
    This all goes back to a few years BTW back before there was a plugin and there was only Netscape & IE.
    There are actually 2 certificate databases and what loads where depends on which type of cert you are using. Now self signed or not doesn't matter but what does matter is the type of certificate. IE: is it RSA/DSA/Sha1
    etc. The Netscape DB was a Berkley DB and MS used whatever they use. The Cert is a DSA/Sha1 cert
    which I like the best ATM as it (X fingers it stays so) always has worked.
    Sadly that tidbit doesn't help you either I am afraid.
    What I'm trying to do is require client authentication through Apache by including the following markup in a virtual >host definition:
    SSLCACertificateFile D:/Certificates/ca.crt
    SSLVerifyClient require
    SSLVerifyDepth 1You got me there I avoid markup at all costs and only code in C java and assembler :)
    Now unless I am wrong I think you are saying that you want the Applet to push the certificate to the server
    automatically and I don't think this happens. Least I have never heard of this happening from an Applet automatically.
    On my client machine, I have a certificate which was generated using OpenSSL and the ca.crt file listed. Testing >shows that the server is requiring a certificate from the client, and the web browser is always providing it.
    The problem is that when the browser fires up the Java plugin to run an applet, there is not sufficient communication >between the browser and the plugin so that the plugin can obtain the certificate from the browser and provide it to >the server.
    So the server refuses to send the applet bytecode to the JVM, and we're stuck.In terms of implementation ease I think you may have the cart before the horse because I think it would be far easier to run an Applet in the first place to do the authentication, and then send, for example, a jar file to bootstrap and run
    (or some classes) in the event the connection is valid. Then again one never knows it all and there may be some classes which enables the plugin as you wish. I have never heard of this being done with the plugin the way you suggest.
    I am thinking maybe there is another method of doing this I do not know.
    Did you try pushing the cert via JavaScript/LIveConnect?? That way it could run before the Applet and do the authentication.
    Maybe someone else has other ideas; did you try the security forum??
    Sorry but I am afraid that is not much help.
    I did snarf this tidbit which may have some relevance
    The current fix for this bug in Mantis and 1.4.1_02 is using JSSE API, Here are the step:
    In Java control panel, Advanced tab -> Java Runtime Parameters, specify:
    -Djavax.net.ssl.keyStore=<name and path to client keystore file>
    -Djavax.net.ssl.keyStorePassword=<password to access this client keystore file>
    If it is a PKCS12 format keystore, specify:
    -Djavax.net.ssl.keyStoreType=PKCS12
    In our future JRE release 1.5, we will create our own client authentication keystore file for JPI and use that for client authentication, for detail info, please see RFE 4797512.
    Dennis
    Posted Date : 2005-07-28 19:55:50.0Good Luck!
    Sincerely:
    (T)
    Edited by: tswain on 23-Jul-2008 10:07 AM

  • How do I get the iTunes store to pull and use updated info from Gracenote?

    I'm helping a music group fix their CD information, which was incorrect in the Gracenote database. Gracenote made the corrections, but the iTunes store is not reflecting the changes. I verified the changes were made by inserting the CD on a PC, and, through the iTunes client, asking it to pull the track info from Gracenote. The info is correct.
    However, if you use the iTunes client to go to the store, the info in the store does not match what was pulled when sticking the CD in the drive and querying Gracenote. Also, if you go to the CD URL via a web browser to preview or purchase a digital download, the iTunes store web site is still showing the wrong information.
    How do I get the iTunes store (that is, Apple's server, not the iTunes client) to pull and use updated (correct) CD information from Gracenote?

    Geek Girl,
    The official Content Provider relationship with the Store depends how it was set up, and may be the group or their agent or a 3rd party such as TuneCore.  They can go back through the same official channel that put the tracks in the Store in the first place.
    Or, if it is simply an error, as opposed to an official change by the Artist, you can try the Feedback page:
    http://www.apple.com/feedback/itunesapp.html

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How do you get your money back from a charge you never even made on the app store?

    How do you get your money back from a charge you never even made on the app store?

    Contact iTunes.
    How to report an issue with Your iTunes Store purchase

  • Can't install the software for the Brother MFC-9440CN because it is not currently available from the Software Update server....how do I get the driver then..it ised to work in my old mac..but cant print to it in my new unit

    Can't install the software for the Brother MFC-9440CN because it is not currently available from the Software Update server....how do I get the driver then..it ised to work in my old mac..but cant print to it in my new unit

    Download the Brother Mountain Lion drivers here.

  • How do you get the web application path from the servlet?

    I have created a web application which is installed in
    /webapps/myApplication
    /webapps/myApplication/data/users.xml
    /webapps/myApplication/WEB-INF/classes/myServlet
    How can you get the path to the "users.xml" file from the "myServlet" file?
    The code below doen's seem to return the xml file. anybody knows why?
    public class myServlet extends HttpServlet {
    public void doGet( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException
    File myXmlFile = new File("/data/users.xml");

    Try this..
    String FileName = getServletContext().getRealPath("\\data\\users.xml");
    File myXmlFile = new File(FileName);
    hope this helps..

  • HT1386 My MacBook Pro HD crashed.  It is all up and runmning except for one issue.  I have about 200 songs on my iPhone but have only gotton 53 back on my laptop and those are the songs I purchased via iTunes. How do I get the rest of the songs from iPhon

    My MacBook Pro HD crashed.  It is all up and runmning except for one issue.  I have about 200 songs on my iPhone but have only gotton 53 back on my laptop from my iPhone and those are the songs I purchased via iTunes. How do I get the rest of the songs from my  iPhone back onto my HD. 
    The songs I'm not able to import casme from CD's.  Nothing from napster etc.
    I've tried and tried to import them rom iTunes vis "Library"  " Import"

    Hey kbert73
    I would do a transfer of purchases from the phone and not sync. If you sync then it will want to start over and sync music that is on the MacBook Pro. If you want to transfer the music, check out the article below that will give you multiple options on how to move. I have also provided on how to sync with multiple computers.
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/ht4527
    Using iPhone, iPad, or iPod with multiple computers
    http://support.apple.com/kb/ht1202
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • HT4101 Once pictures are moved from your camera to your iPad (using the camera connection kit), how do you get the photos off of the iPad? They do not show up in my photo stream or my iCloud.

    Once pictures are moved from your camera to your iPad (using the camera connection kit), how do you get the photos off of the iPad? They do not show up in my photo stream or my iCloud. I am able to see any photo I took on the iPad using the iPad camera (in iTunes, photo stream, or when I open windows explorer and browse the iPad director), however I cannot see any photos transfered from my camera to the iPad. The camera connection kit must have put my photos in a directory I cannot get to and cannot sync.

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

  • I just got a new macbook pro. How do I get the 900  songs that I took off of cds into iTunes on my computer from my iPhone. I had no problems syncing the music I had purchased from iTunes. I have tried to sync it using iTunes match, this did not work.

    I just got a new macbook pro. How do I get the 900+  songs that I took off of cds into iTunes on my computer from my iPhone. I had no problems syncing the music I had purchased from iTunes. I have tried to sync it using iTunes match, this did not work. I would like to have access to my full library without going into the user profile of my old computer, which is on my new computers hard drive. I would like to eventually delete the old profile so that I have more space on my hard drive.

    http://support.apple.com/kb/HT4527?viewlocale=en_US&locale=en_US

  • How can i get the data from the weblink

    Hi All,
    Good Afternoon,
    i create a page with picklist,
    that picklist contains so many currencies like(USD,AED,BSD----------)
    when ever i am selecting the currency from that picklist,
    that time i want to get the current exchage rate from this link
    http://www.oanda.com/convert/classic
    how can i get the current exchage rate from that link.
    pls give me the gudaincee.
    i hope u will help me.

    Hi Gaurav,
    Below given link gives a nice demo of integrating web service with OAF. (For using captcha user verification service).
    [http://oracle.anilpassi.com/integrate-oa-framework-with-web-service-2.html]
    However, using web services will cost little extra effort of learning SOAP and wsdl.
    Please let me know if you find any difficulties related to web services.
    Abdul Wahid

  • How can I get the photos from my old icloud backup on to my computer?

    I got a replacement phone and now there are 2 iphone backups.  There's the old phone with the pictures on it I would like to put on to my windows 8 pc.  I can't figure out how to get them.  I can't restore them to my iphone because I already have another file in icloud for that.  How can I get the old file with my pictures on to my computer??

    You can only access them by restoring the backup to your phone.  You can backup your phone (such as by backing it up to your computer using iTunes), restore the old backup, transfer the recovered photo to your computer (iOS: Import personal photos and videos from iOS devices to your computer), then restore the backup you made earlier to return your phone to its current state.

Maybe you are looking for