Alfresco Tip: How to enable SSL in Alfresco SharePoint Protocol

There are two ways to approach getting the Alfresco SharePoint Protocol to run over SSL and avoid having to modify the Windows registry for allow non-ssl connections from MS Office (in both Windows and Mac).

One way is to use the out of the box SSL certificate that Alfresco uses for communications between itself and Solr (this blog post is about this option). The other is to generate a new certificate and configure Alfresco to use it, which is the option if you want to use a custom certificate. Next steps tested on Alfresco 4.2, it should work in 4.2 as well for both Enterprise and Community. Please, let me know through a comment if you have an objection on this.

  • 1. Rename file tomcat/shared/classes/alfresco/extension/vti-custom-context.xml.ssl to tomcat/shared/classes/alfresco/extension/vti-custom-context.xml, if it does not exist just create it like below:

[xml]

<?xml version=’1.0′ encoding=’UTF-8′?>
<!DOCTYPE beans PUBLIC ‘-//SPRING//DTD BEAN//EN’ ‘http://www.springframework.org/dtd/spring-beans.dtd’>

<beans>
<!–
<bean id="vtiServerConnector" class="org.mortbay.jetty.bio.SocketConnector">
<property name="port">
<value>${vti.server.port}</value>
</property>
<property name="headerBufferSize">
<value>32768</value>
</property>
</bean>
–>

<!– Use this Connector instead for SSL communications –>
<!– You will need to set the location of the KeyStore holding your –>
<!– server certificate, along with the KeyStore password –>
<!– You should also update the vti.server.protocol property to https –>
<bean id="vtiServerConnector" class="org.mortbay.jetty.security.SslSocketConnector">
<property name="port">
<value>${vti.server.port}</value>
</property>
<property name="headerBufferSize">
<value>32768</value>
</property>
<property name="maxIdleTime">
<value>30000</value>
</property>
<property name="keystore">
<value>${vti.server.ssl.keystore}</value>
</property>
<property name="keyPassword">
<value>${vti.server.ssl.password}</value>
</property>
<property name="password">
<value>${vti.server.ssl.password}</value>
</property>
<property name="keystoreType">
<value>JCEKS</value>
</property>
</bean>
</beans>

[/xml]

  • 2. Now add the required attributes to alfresco-global.properties:

[bash]

vti.server.port=7070
vti.server.protocol=https
vti.server.ssl.keystore=/opt/alfresco/alf_data/keystore/ssl.keystore
vti.server.ssl.password=kT9X6oe68t
vti.server.url.path.prefix=/alfresco
vti.server.external.host=localhost
vti.server.external.port=7070
vti.server.external.protocol=https
vti.server.external.contextPath=/alfresco

[/bash]

Remember to change localhost to your server full name (i.e. your-server-name.domain.com).

  • 3. Restart the Alfresco application server and try the “Edit online” action on a MS Office document through Alfresco Share. A warning message will appear to accept the Alfresco self-signed certificate but is a common behavior.

17 thoughts to “Alfresco Tip: How to enable SSL in Alfresco SharePoint Protocol”

  1. Nice series of tips, Toni, very useful and illustrative (not always easy to keep on learning on )

    I use a different aprox, with a secured SSL Apache virtual host that proxies (via http) to the jetty container for VTI module. One of disadvantages is that I have to “open” two SSL ports in the frontend because of the “alfresco” context, the standard 443 and for example 7070 (if Apache is in another machine) because of the vti module context. Now I see this property:

    vti.server.url.path.prefix=/alfresco

    Toni, Does it mean that if i set:

    vti.server.url.path.prefix=/sharepoint

    all the 7070 urls for MS-Office are created in /sharepoint context ?

    Regards, and thanks in advance.

    –C.

  2. Hi Cesar, these two generate the online edit url:
    vti.server.external.host=${localname} vti.server.external.port=${vti.server.port}
    vti.server.port=7070 makes jetty run on the 7070 port

  3. A mi no me funciona. He cambiado el hostname, la ruta de /opt/alfresco a la de mi alfresco community y copiado el .xml tal cual dices … pero nada…da un error al hacer login en el share y no entra.

    Tengo Alfresco Community 4.2.f sin ningún cambio/añadido más.

  4. Que error? A priori no tiene sentido el error al login de Alfresco Share ya q esto pone ssl en sharepoint (jetty embebido en Alfresco)

  5. Si te pide usuario y contraseña debes poner el correspondiente en Alfresco. Que versión de MS Office estas usando? Esa parece la última, yo diría que solo está soportado MS Office 2010, MS Office 2011 y MS Office 2013. He visto en versiones más nuevas que se exige un certificado válido (no uno autogenerado y autofirmado). Saludos.

  6. tengo problemas con el directorio activo cuando configuro lo que me dices sabes a que se debe??

  7. Hola Alejandra, ese tema no tiene mucho que ver con este blog post, si tienes alguna duda puedes escribirme un email, mira la sección contacto. Saludos.

  8. Disculpa no es con el directorio activo es con cualquier usuario.. no puedo ingresar a alfresco cuando realizo esas configuraciones.

  9. cuando configuro el SharePoint Protocol indicado en este tutorial, no me permite ingresar a alfresco me sale este error 04310002 Failed to execute script ‘classpath*:alfresco/site-webscripts/org/alfresco/components/dashlets/my-sites.get.js’: 04310001 04310001 Failed during processing of IMAP server status configuration from Alfresco: 04310000 Unable to retrieve IMAP server status from Alfresco: 404
    Server: Alfresco Spring WebScripts – v5.0.0 (Release) schema 1.000 sabes a que se debera??

  10. Insisto, con esa información no es fácil adivinar. Puede ser que tengas un error de configuración, una personalización que está fallando o un bug del software. Mira la web de contacto y me mandas mas información por email, por aquí será difícil que te ayude alguien si mandas la información tan escueta.

  11. hola toni gracias por tu ayuda, ya pude solucionar mi problema la cuestión es que no se como guardar lo editado, me podrías ayudar.

  12. Hola Alejandra, realmente no sé cual es tu problema, te pedí que contactaras por correo electrónico para darme mas detalles del tema ya que con tus comentarios no tengo información suficiente. Saludos.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.