grouperClient add option to use EasySslSocketFactory

XMLWordPrintable

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Component/s: grouperClient
    • None

      When using grouperClient, if you are connecting to a self-signed certificate, you need to set grouper.client.properties with

      grouperClient.https.customSocketFactory = edu.internet2.middleware.grouperClient.ssl.EasySslSocketFactory

      . There should be a way to do this with a command line option, since you can pass all the other options via command line and can avoid dealing with the properties file.

       

      SEVERE: Problem in url: https://localhost:8443/grouper-ws/servicesRest
      java.lang.RuntimeException: Problem in url: https://localhost:8443/grouper-ws/servicesRest
      	at edu.internet2.middleware.grouperClient.ws.GrouperClientWs.postMethod(GrouperClientWs.java:1094)
      	at edu.internet2.middleware.grouperClient.ws.GrouperClientWs.executeServiceHelper(GrouperClientWs.java:652)
      	at edu.internet2.middleware.grouperClient.ws.GrouperClientWs.executeService(GrouperClientWs.java:588)
      	at edu.internet2.middleware.grouperClient.api.GcGetGroups.execute(GcGetGroups.java:535)
      	at edu.internet2.middleware.grouperClient.GrouperClient.getGroups(GrouperClient.java:3243)
      	at edu.internet2.middleware.grouperClient.GrouperClient.main(GrouperClient.java:434)
      Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      	at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
      	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:383)
      	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:326)
      	at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:321)
      	at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1351)
      	at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1226)
      	at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1169)
      	at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:396)
      	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:480)
      	at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:458)
      	at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:206)
      	at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172)
      	at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1510)
      	at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1425)
      	at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:455)
      	at java.base/sun.security.ssl.SSLSocketImpl.ensureNegotiated(SSLSocketImpl.java:925)
      	at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1295)
      	at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
      	at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.StringRequestEntity.writeRequest(StringRequestEntity.java:146)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      	at edu.internet2.middleware.grouperClientExt.org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
      	at edu.internet2.middleware.grouperClient.ws.GrouperClientWs.postMethod(GrouperClientWs.java:1081)
      	... 5 more
      

            Assignee:
            Chris Hyzer (upenn.edu)
            Reporter:
            Chad Redman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: