Enterprise deployment of DAVbox

Enterprises may have internal WebDAV-servers or online servers over which they have full control. In that case it is interesting to deploy DAVbox on those servers instead of launching it from the Pincette website. With a local installation it is possible to centralize the configuration file, because DAVbox has a command-line argument that refers to the configuration file via a URL. Each user can then have a private JNLP-URL. When the user later changes the configuration on her computer, DAVbox will attempt to upload it to the server. This way the configuration is always the same everywhere.

The directory and url elements in the configuration file may contain the parameter $​{username}. It will be replaced with the username on user's workstation. It is also possible to use a relative path for the directory, in which case it is resolved against the user's home directory. Combined with the -config-readonly command-line option this provides for a scenario where one configuration file is centrally deployed and where the user can't change any settings.

If you use the Pincette WebDAV-server you can put in the url element something like https://hostname/$​{home}/. This will be replaced with the user's home folder in Pincette. With one configuration you can set up synchronization for all users.

The license file can also be centralized through another command-line argument that refers to the license file via a URL and that can also be set in the JNLP-file. It is then no longer necessary to distribute the license file to end-users, which reduces the set-up for them to zero. Make sure, however, to put a proper access control list on the license file. It is also possible to create a license that is bound to one server. In that case DAVbox only synchronizes with that server. There is no need for access control on the license file then.

Command-line options

-config config-URL
Sets the configuration to a centrally deployed file.
-config-readonly
Removes the possiblity to change the settings, the synchronizations and the exclusions.
-settings-readonly
Removes the possiblity to change the settings.
-synchronizations-readonly
Removes the possiblity to change the synchronizations.
-exclusions-readonly
Removes the possiblity to change the exclusions.
-license license-URL
Uses a centrally deployed license file.
-plugin-interval seconds
The number of seconds between which the plugins are called. The default is 30 seconds.
-remote-plugin plugin-URL
The URL of a JAR-file that is a plugin (see below).
-start JNLP-URL
Sets the JNLP start file. Without it the start-at-login feature will be disabled.
-truststore URL
When your server doesn't have a valid SSL-certificate you can put that certificate in a Java truststore on the server itself. This option should get the URL to the truststore. It will be fetched using the HTTP-protocol.

Sample JNLP-file

<?xml version='1.0' encoding='utf-8'?>
<jnlp codebase="$$codebase">
  <information>
    <title>DAVbox</title>
    <vendor>Pincette bvba</vendor>
    <description>WebDAV synchronization</description>
    <icon href="davbox.png"/>
    <offline-allowed/>
    <shortcut online="false">
      <desktop/>
      <menu/>
    </shortcut>
  </information>
  <security>
    <all-permissions />
  </security>
  <update check="timeout" policy="prompt-run"/>
  <resources>
    <j2se version="1.7+"/>
    <jar href="davbox.jar" version="1.3" main="true"/>
    <property name="apple.awt.UIElement" value="true"/>
  </resources>
  <application-desc>
    <argument>-config</argument>
    <argument>$$contextdavbox/config.xml</argument>
    <argument>-config-readonly</argument>
    <argument>-license</argument>
    <argument>$$contextdavbox/license.xml</argument>
    <argument>-start</argument>
    <argument>$$contextdavbox/launch.jnlp</argument>
  </application-desc>
</jnlp>

Sample configuration

<?xml version='1.0' encoding='UTF-8'?>
<config>
  <exclude>.*</exclude>
  <exclude>~$*</exclude>
  <exclude>~*.tmp</exclude>
  <exclude>/act/</exclude>
  <exclude>/configuration/</exclude>
  <exclude>/groups/</exclude>
  <exclude>/lost+found/</exclude>
  <exclude>/meta/</exclude>
  <exclude>/users/</exclude>
  <exclude>/view/</exclude>
  <exclude>/web/</exclude>
  <start-at-login>true</start-at-login>
  <interval>5</interval>
  <notifications>true</notifications>
  <rename>false</rename>
  <rename-depth>10</rename-depth>
  <recursion>false</recursion>
  <chunked>true</chunked>
  <compression>true</compression>
  <pause>false</pause>
  <delete>true</delete>
  <sync>
    <directory>/Users/$​{username}/Documents/Keynote</directory>
    <url>https://$​{username}@re.pincette.net/doc/Keynote/</url>
    <direction>both</direction>
  </sync>
  <sync>
    <directory>/Users/$​{username}/Documents/Notebooks</directory>
    <url>https://$​{username}@re.pincette.net/doc/Notebooks/</url>
    <direction>download</direction>
  </sync>
  <!-- Synchronizes the local folder DAVbox, which is in the home folder of
the user, with the user's home folder on Pincette. -->
  <sync>
    <directory>DAVbox</directory>
    <url>https://re.pincette.net/$​{home}</url>
    <direction>upload</direction>
  </sync>
</config>

Sample uninstall JNLP-file

<?xml version='1.0' encoding='utf-8'?>
<jnlp codebase="$$codebase">
  <information>
    <title>Uninstall DAVbox</title>
    <vendor>Pincette bvba</vendor>
    <description>Uninstall DAVbox</description>
    <icon href="davbox.png"/>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions />
  </security>
  <update check="timeout" policy="prompt-run"/>
  <resources>
    <j2se version="1.7+"/>
    <jar href="davbox.jar" version="1.3" main="true"/>
    <property name="apple.awt.UIElement" value="true"/>
  </resources>
  <application-desc main-class="be.re.app.davbox.Uninstall"/>
</jnlp>

Plugins

DAVbox has a simple plugin API, which allows you to check for changes on the server in another way than WebDAV collection tree fetches at regular intervals. It comes with a sample plugin for the Pincette document management system.

A plugin can be placed in the subfolder "Plugins" of the settings folder, which depends on your system. You can also provide a plugin centrally on the server with the "-remote-plugin" command-line options. When DAVbox is loaded with Java Web Start there will be security restrictions, because it is sandboxed. For example, it is not possible to access certain system properties.