Question

How is it possible to disable WebDAV access on CQ5.x publish instances?

Answer, Resolution

Due to the fact that CQ5.x is running on top of CRX1.4.x, there are several locations that need to be configured to disable WebDAV access to CQ5 and the repository altogether.

Configuration on CRX level

On CRX level, the CRX webapp needs to be reconfigured. Simply open the web.xml of the CRX webapp which per default can be found in <cq5_home>/crx-quickstart/server/runtime/0/~_crx/WEB-INF.

Following servlets need to be commented in the S E R V L E T M A P P I N G section to effectively disable WebDAV access to the repository:

  • Webdav
  • JCRWebdavServer
  • CqResource

Your configuration should look like the following:

  <!-- ====================================================================== -->
  <!-- S E R V L E T   M A P P I N G                                          -->
  <!-- ====================================================================== -->
  <servlet-mapping>
    <servlet-name>NodeTree</servlet-name>
    <url-pattern>/ui/nodetree/*</url-pattern>
  </servlet-mapping>
  <!--servlet-mapping>
    <servlet-name>Webdav</servlet-name>
    <url-pattern>/repository/*</url-pattern>
  </servlet-mapping-->
  <servlet-mapping>
    <servlet-name>Export</servlet-name>
    <url-pattern>/export/*</url-pattern>
  </servlet-mapping>
  <!--servlet-mapping>
    <servlet-name>JCRWebdavServer</servlet-name>
    <url-pattern>/server/*</url-pattern>
  </servlet-mapping-->
  <!--servlet-mapping>
    <servlet-name>CqResource</servlet-name>
    <url-pattern>/cqresource/*</url-pattern>
  </servlet-mapping-->
  <servlet-mapping>
    <servlet-name>JCRExplorer</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>

Now restart the CQ/CRX instance to make the changes take effect.

Configuration on CQ level

On CQ level, only one bundle needs to be stopped to disable WebDAV access.

  • connect to the Felix Management Console, per default running on http://<host>:<port>/system/console
  • in the list of Bundles, find the bundle named Sling - Simple WebDAV Access to repositories
  • stop this bundle by clicking on the stop-button

A restart is not required.

Applies to

CQ5.x

Questo prodotto è concesso in licenza in base alla licenza di Attribuzione-Non commerciale-Condividi allo stesso modo 3.0 Unported di Creative Commons.  I post su Twitter™ e Facebook non sono coperti dai termini di Creative Commons.

Note legali   |   Informativa sulla privacy online