cancel
Showing results for 
Search instead for 
Did you mean: 

The problem of integration with google docs (03010003 Wrapped Exception)

michal_kominek
Champ in-the-making
Champ in-the-making
Hello,

We would like to integrate alfresco share with google docs. Please look at the attached pictures: screen_1.PNG, screen_2.PNG and screen_3.PNG.

1. screen_1.PNG - we choose the option to create content Google Docs Document.
2. screen_2.PNG -  a confirmation window appears.
3. I give username and password to google account
4. after logging shows me an error Exception: javax.net.ssl.SSLPeerUnverifiedException - peer not authenticated (pls. see screen_3.PNG)

- Alfresco Share Community Version 4.2.c
- Ubuntu 10.04.4 LTS


500 Description:    An error inside the HTTP server which prevented it from fulfilling the request.

Message:   03010003 Wrapped Exception (with status template): I/O error: peer not authenticated; nested exception is javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

Exception:   javax.net.ssl.SSLPeerUnverifiedException - peer not authenticated

sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:390)
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:561)
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
org.springframework.social.support.HttpComponentsClientHttpRequest.executeInternal(HttpComponentsClientHttpRequest.java:81)
org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:52)
org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:438)
org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401)
org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:279)
org.springframework.social.oauth2.OAuth2Template.postForAccessGrant(OAuth2Template.java:152)
org.springframework.social.oauth2.OAuth2Template.exchangeForAccess(OAuth2Template.java:104)
org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl.completeAuthentication(GoogleDocsServiceImpl.java:504)
org.alfresco.integrations.google.docs.webscripts.CompleteAuth.executeImpl(CompleteAuth.java:63)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:433)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:495)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:533)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:349)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)


I understand that the problem is the lack of a certificate (Google) on the machine Alfresco (Ubuntu 10.04.4 LTS).
We tried to install the google certificate on the machine  but to no avail.
Also we no managed to find the information to which the key store we must to import the certificate  to work the integration with Google Docs.
Can know how and where to import the certificate?
7 REPLIES 7

jpotts
World-Class Innovator
World-Class Innovator
There are now three named versions newer than 4.2.c. Have you successfully recreated this problem on 4.2.f, which is the latest version?

Jeff

guonei111
Champ in-the-making
Champ in-the-making
Hi,jpotts,how to integrate Google Docs with alfresco ,how to config?

jpotts
World-Class Innovator
World-Class Innovator
If you are running 4.2.f, go to this page: http://wiki.alfresco.com/wiki/Community_file_list_4.2.f

And download this file:
https://process.alfresco.com/ccdl/?file=release/community/4.2.f-build-00012/alfresco-googledocs-repo...

And this file:
https://process.alfresco.com/ccdl/?file=release/community/4.2.f-build-00012/alfresco-googledocs-shar...

Then, install both of those AMPs.

There is no other configuration necessary.

If you do not want to install the integration manually, you can select "Google Docs Integration" when you run the binary installer.

Jeff

iferraro
Champ in-the-making
Champ in-the-making
Hi Jeff,

when I try to create a google document google I get:

The Web Script /alfresco/s/googledocs/completeauth has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   11180011 Wrapped Exception (with status template): 11180319 Exception from transactional callback: org.alfresco.repo.transaction.RetryingTransactionAdvice$1@1872d40f

Exception:   sun.security.provider.certpath.SunCertPathBuilderException - unable to find valid certification path to requested target


Where am I wrong?   

Thanks in advanced

Ivan

Server:   Community v5.0.0 (d r99759-b2) schema 8.022

The full error message is:

The Web Script /alfresco/s/googledocs/completeauth has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   11180012 Wrapped Exception (with status template): 11180325 Exception from transactional callback: org.alfresco.repo.transaction.RetryingTransactionAdvice$1@198c2b91

Exception:   sun.security.provider.certpath.SunCertPathBuilderException - unable to find valid certification path to requested target

sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
sun.security.validator.Validator.validate(Validator.java:260)
sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1460)
sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:212)
sun.security.ssl.Handshaker.processLoop(Handshaker.java:957)
sun.security.ssl.Handshaker.process_record(Handshaker.java:892)
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1050)
sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363)
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391)
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375)
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.jav...
sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1282)
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1257)
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77)
com.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)
com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:283)
com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeTokenRequest.execute(GoogleAuthorizationCodeTokenRequest.java:158)
org.alfresco.integrations.google.docs.service.GoogleDocsServiceImpl.completeAuthentication(GoogleDocsServiceImpl.java:744)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:483)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:205)
org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:164)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.alfresco.repo.transaction.RetryingTransactionAdvice$1.execute(RetryingTransactionAdvice.java:64)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
org.alfresco.repo.transaction.RetryingTransactionAdvice.invoke(RetryingTransactionAdvice.java:67)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
com.sun.proxy.$Proxy234.completeAuthentication(Unknown Source)
org.alfresco.integrations.google.docs.webscripts.CompleteAuth.executeImpl(CompleteAuth.java:64)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:489)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:457)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:551)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:619)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:399)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:280)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2403)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)

Exception:   sun.security.validator.ValidatorException - PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)

Exception:   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

sun.security.ssl.Alerts.getSSLException(Alerts.java:192)

Exception:   org.alfresco.error.AlfrescoRuntimeException - 11180325 Exception from transactional callback: org.alfresco.repo.transaction.RetryingTransactionAdvice$1@198c2b91

org.alfresco.error.AlfrescoRuntimeException.create(AlfrescoRuntimeException.java:59)

Exception:   org.springframework.extensions.webscripts.WebScriptException - 11180012 Wrapped Exception (with status template): 11180325 Exception from transactional callback: org.alfresco.repo.transaction.RetryingTransactionAdvice$1@198c2b91

org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1127)

Server:   Community v5.0.0 (d r99759-b2) schema 8.022
Time:   18-dic-2015 15.59.08

Diagnostics:   Inspect Web Script (org/alfresco/integrations/google/docs/CompleteAuth.get)

zydoon
Champ on-the-rise
Champ on-the-rise
It's bit late, but might be helpful.
the starting point is that you already have at least trusting keystore (ssl.truststore) configured for your alfresco. My installation is WAR based my keystore is under a alf.data/keystore and named: ssl.truststore

download google's certificate:
[root@alfresco keystore]# openssl s_client -connect docs.google.com:443 -showcerts

from the stream you'll get copy the first PEM certificate, including the —–BEGIN CERTIFICATE—– and —–END CERTIFICATE—–, paste into a blank file: google-docs.com.pem
now, make in DER format:
openssl x509 -in google-docs.com.pem -out google-docs.com.der -outform DER

and finally import into the truststore:
keytool -import -file /root/google-docs.com.der -keystore ssl.truststore -storetype JCEKS -alias google.com


and restart your tomcat

zydoon
Champ on-the-rise
Champ on-the-rise
Hi again,

Actually, You will all the trust chain, so add all the 3 certificates:
the first one (the post above)
s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=google.com
than, it's issuer certificate:
s:/C=US/O=Google Inc/CN=Google Internet Authority G2
and finally:
s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA

make them on the DER format, import the to your truststore and restart tomcat.


This is valid on Alfresco 5.

iferraro
Champ in-the-making
Champ in-the-making
Hi zdoon,

I followed your instructions but I always get the same error:

The Web Script /alfresco/s/googledocs/completeauth has responded with a status of 500 - Internal Error.

500 Description:   An error inside the HTTP server which prevented it from fulfilling the request.

Message:   00120002 Wrapped Exception (with status template): 00120100 Exception from transactional callback: org.alfresco.repo.transaction.RetryingTransactionAdvice$1@7bd9de79

Exception:   sun.security.provider.certpath.SunCertPathBuilderException - unable to find valid certification path to requested target

My steps were

keytool -import -file /home/alfre/google-docs.com.der -keystore /home/alfre/alfresco-5.0.d/alf_data/keystore/ssl.truststore -storetype JCEKS -alias google.com

keytool -import -file /home/alfre/GeoTrust\ Global\ CA.der -keystore /home/alfre/alfresco-5.0.d/alf_data/keystore/ssl.truststore -storetype JCEKS -alias GeoTrust\ Global\ CA

keytool -import -file /home/alfre/Google\ Internet\ Authority\ G2.der -keystore /home/alfre/alfresco-5.0.d/alf_data/keystore/ssl.truststore -storetype JCEKS -alias Google\ Internet\ Authority\ G2

restart tomcat server

where am I wrong ? Do I have to configure any alfresco-global.properties ?

Thanks

Iferraro