Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-216

Cannot obtain the client certificate in JSE

XMLWordPrintable

      i have a small problem with obtaining a client certificate from message context of a secure web service runing on jboss 4.0.0. i have two jboss instances on two diff. computers and one instance is calling a web service hosted on another instance via TLS. The TLS is set up on both instances including the clientAuth flag. as i could see the whole communication is working, but if I try to get the certificate chain from the servlet request i always get null. The following code is called in the bean implementing the web service:
      Code:

      MessageContext messageContext = this.ctx.getMessageContext();
      HttpServletRequest request = (HttpServletRequest) messageContext.getProperty("transport.http.servletRequest");
      X509Certificate[] certificates = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate");

      Is there any possibility to get the certificates?
      The same code is working very good in case of servlet running on the same jboss instance.

              jgreene@redhat.com Jason Greene
              tdiesler@redhat.com Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: