rajgithub123 / google-enterprise-connector-sharepoint

Automatically exported from code.google.com/p/google-enterprise-connector-sharepoint
0 stars 0 forks source link

Support https crawl URL with self signed certificates #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a connector instance
2. The crawl URL should be https which is protected by a self-signed 
certificate
3. Try to save the configuration

What is the expected output? 
The configuration should be saved and connector should work (crawl, feed) 
as expected

What do you see instead?

Following exception in logs:

WARNING: Unable to connect.
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: javax.net.ssl.SSLHandshakeException: 
sun.security.validator.ValidatorException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find 
valid certification path to requested target
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLHandshakeE
xception: sun.security.validator.ValidatorException: PKIX path building 
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable 
to find valid certification path to requested target
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown 
Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at 
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown 
Source)
    at 
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown 
Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown 
Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown 
Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown 
Source)
    at 
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown 
Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown 
Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown 
Source)
    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    at java.io.BufferedOutputStream.flush(Unknown Source)

Original issue reported on code.google.com by rakeshs101981@gmail.com on 5 Aug 2009 at 9:25

GoogleCodeExporter commented 9 years ago
The connector uses Axis and HTTPClient to make web service calls to SharePoint.

If the customer has a self signed cetificate which is not from a trusted 
authority, 
the HTTPClient library (internally uses Java SSL suport) fails to find a valid 
certificate to be presented to the SharePoint server along with the request.

One of ways is to import the certificate into the JVM default keystore and 
check if 
that works. Here are couple of helpful links:

http://www.java-samples.com/showtutorial.php?tutorialid=210
http://www.nabble.com/ssl-failure-td15753599.html

The connector supports certificate, but in case it is not from a trusted 
authority it 
will have to be imported to the JDK keystore as identified above.

Original comment by rakeshs101981@gmail.com on 7 Aug 2009 at 6:19