Sun, 20 Oct 2019 11:11:22 +0200
finish basic metadata sync tests
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="generator" content="pandoc" /> <title>Configuration</title> <style type="text/css">code{white-space: pre;}</style> <link rel="stylesheet" href="davdoc.css" type="text/css" /> </head> <body> <div class="header"> <a href="./index.html"><span>DavUtils documentation</span></a> </div> <div class="sidebar"> <div class="nav"> <h3>dav</h3> <ul> <li><a href="getting-started.html">Getting started</a></li> <li><a href="commands.html">Commands</a></li> <ul> <li><a href="list.html">list</a></li> <li><a href="get.html">get</a></li> <li><a href="put.html">put</a></li> <li><a href="mkdir.html">mkdir</a></li> <li><a href="remove.html">remove</a></li> <li><a href="copy.html">copy</a></li> <li><a href="move.html">move</a></li> <li><a href="export.html">export</a></li> <li><a href="import.html">import</a></li> <li><a href="get-property.html">get-property</a></li> <li><a href="set-property.html">set-property</a></li> <li><a href="remove-property.html">remove-property</a></li> <li><a href="lock.html">lock</a></li> <li><a href="unlock.html">unlock</a></li> <li><a href="info.html">info</a></li> <li><a href="date.html">date</a></li> <li><a href="add-repository.html">add-repository</a></li> <li><a href="remove-repository.html">remove-repository</a></li> <li><a href="list-repositories.html">list-repositories</a></li> <li><a href="check-config.html">check-config</a></li> </ul> <li><a href="configuration.html">Configuration</a></li> <li><a href="encryption.html">Encryption</a></li> </ul> </div> <div class="nav"> <h3>dav-sync</h3> <ul> <li><a href="introduction.html">Introduction</a></li> <li><a href="sync-commands.html">Commands</a></li> <ul> <li><a href="pull.html">pull</a></li> <li><a href="push.html">push</a></li> <li><a href="archive.html">archive</a></li> <li><a href="list-conflicts.html">list-conflicts</a></li> <li><a href="resolve-conflicts.html">resolve-conflicts</a></li> <li><a href="delete-conflicts.html">delete-conflicts</a></li> <li><a href="trash-info.html">trash-info</a></li> <li><a href="empty-trash.html">empty-trash</a></li> <li><a href="add-tag.html">add-tag</a></li> <li><a href="remove-tag.html">remove-tag</a></li> <li><a href="set-tags.html">set-tags</a></li> <li><a href="list-tags.html">list-tags</a></li> <li><a href="add-directory.html">add-directory</a></li> <li><a href="list-directories.html">list-directories</a></li> <li><a href="sync-check-config.html">check-config</a></li> <li><a href="check-repositories.html">check-repositories</a></li> </ul> <li><a href="sync-configuration.html">Configuration</a></li> </ul> </div> </div> <!-- begin content --> <div class="content"> <div id="header"> <h1 class="title">Configuration</h1> </div> <p>The main configuration file for <em>dav</em> is <code>$HOME/.dav/config.xml</code> and is used for configuring repositories, proxies and encryption keys. This configuration is also used by <em>dav-sync</em>. The file is created automaticaly if it doesn't exist.</p> <p>The <em>config.xml</em> file is an XML file with <code><configuration></code> as root element. The <code><configuration></code> element can have the following child elements: <code><repository></code>, <code><http-proxy></code>, <code><https-proxy></code>, <code><key></code>, <code><namespace></code></p> <h2 id="repository">repository</h2> <p>This element is used to configure a repository. A repository must have a unique name to identify the repository and a url pointing to the root collection for this repository.</p> <p>Required child elements: <code><name></code>, <code><url></code><br /> Optional elements: <code><user></code>, <code><password></code>, <code><default-key></code>, <code><full-encryption></code>, <code><content-encryption></code>, <code><decrypt-content></code>, <code><decrypt-name></code>, <code><cert></code>, <code><verification></code>, <code><ssl-version></code>, <code><authmethods></code></p> <h3 id="name">name</h3> <p>Unique repository identifer.</p> <p>Type: string<br /> Example: <code><name>myrepo</name></code></p> <h3 id="url">url</h3> <p>The url must point to a valid WebDAV compilant collection.</p> <p>Type: url<br /> Example: <code><url>https://example.com/webdav/repo1/</url></code></p> <h3 id="user">user</h3> <p>User used for authentication</p> <p>Type: string<br /> Example: <code><user>alice</user></code></p> <h3 id="password">password</h3> <p>A base64 encoded password used for authentication.</p> <p>Type: base64 string<br /> Example: <code><password>MTIzNDU2Nzg=</password></code></p> <h3 id="default-key">default-key</h3> <p>Identifer of the key used by default for encryption. There must be a configured key with this name.</p> <p>Type: string<br /> Example: <code><default-key>mykey</default-key></code></p> <h3 id="full-encryption">full-encryption</h3> <p>If this element has the value of true, content and resource name encryption/decryption is enabled. Resources are only encrypted if the repository has a default-key or a key is specified via command line option. Because encryption and decryption is disabled by default, <code>false</code> has no effect for this element.</p> <p>Type: boolean<br /> Default: false<br /> Example: <code><full-encryption>true</full-encryption></code></p> <h3 id="content-encryption">content-encryption</h3> <p>This element enables only content encryption and decryption. A value of <code>false</code> disables content encryption, but it does not disables content decryption, if this is enabled with <code><decrypt-content></code>.</p> <p>Type: boolean<br /> Default: false<br /> Example: <code><content-encryption>true</content-encryption></code></p> <h3 id="decrypt-content">decrypt-content</h3> <p>Controls only the decryption of content. If <code>true</code> content is decrypted.</p> <p>Type: boolean<br /> Default false<br /> Example: <code><decrypt-content>true</decrypt-content></code></p> <h3 id="decrypt-name">decrypt-name</h3> <p>Controls only the decryption of resource names. If <code>true</code> resource names are decrypted. This effects path to url resolution.</p> <p>Type: boolean<br /> Default: false<br /> Example: <code><decrypt-name>true</decrypt-name></code></p> <h3 id="cert">cert</h3> <p>Path to a file containing certificates to verify the TLS connection to the server.</p> <p>Type: string<br /> Example: <code><cert>/etc/certs/cabundle.pem</cert></code></p> <p>Note: This element does the same as curl's <code>--cacert</code> option.</p> <h3 id="verification">verification</h3> <p>This element can disable TLS certificate verification.</p> <p>Type: boolean<br /> Default: true<br /> Example: <code><verification>false</verification></code></p> <h3 id="ssl-version">ssl-version</h3> <p>Specifies the SSL version to attempt to use. The value must be one of this strings: TLSv1, TLSv1.0, TLSv1.1, TLSv1.2, SSLv2, SSLv3</p> <p>Type: ssl version enum<br /> Example: <code><ssl-version>TLSv1.2</ssl-version></code></p> <h3 id="authmethods">authmethods</h3> <p>Controls which http authentication methods are used. Multiple methods can be used. The value must be one or more authentication methods separated by space. Valid authentication methods are: basic, digest, negotiate, ntlm, any, none</p> <p>Type: list of authmethod</p> <p>Default: basic<br /> Example: <code><authmethods>basic digest</authmethods></code></p> <h2 id="key">key</h2> <p>The <code><key></code> element configures a key used for encryption. A key must have a unique name, which is stored in the properties of encrypted resources. To decrypt resources, dav looks for configured keys with this name, therefore the name of the key should never changed and must be the same on all hosts accessing the same repository.</p> <p>Required child elements: <code><name></code>, <code><file></code><br /> Optional elements: <code><type></code></p> <h3 id="name-1">name</h3> <p>Unique key identifer.</p> <p>Type: string<br /> Example: <code><name>key1</name></code></p> <h3 id="file">file</h3> <p>Path to the content of the key. The file should contain 32 (aes256) or 16 (aes128) bytes. If value is not an absolut path, it must be relative to the dav config directory <em>$HOME/.dav/</em>.</p> <p>Type: string<br /> Example: <code><path>keys/key1.bin</path></code></p> <h3 id="type">type</h3> <p>Specifies the key type. Valid values are <code>aes128</code> or <code>aes256</code>.</p> <p>Type: aes type enum<br /> Default: aes256<br /> Example: <code><type>aes128</type></code></p> <h2 id="http-proxy-https-proxy">http-proxy / https-proxy</h2> <p>Configuration for http and https proxies is the same. Both use the same elements, but https-proxy expects an https url.</p> <p>Required child elements: <code><url></code><br /> Optional elements: <code><user></code>, <code><password></code>, <code><no></code></p> <h3 id="url-1">url</h3> <p>Specifies the proxy url.</p> <p>Type: url<br /> Example: <code><url>http://myproxy/</url></code></p> <h3 id="user-1">user</h3> <p>User used for authentication with the proxy.</p> <p>Type: string<br /> Example: <code><user>alice</user></code></p> <h3 id="password-1">password</h3> <p>A base64 encoded password used for authentication.</p> <p>Type: base64 string<br /> Example: <code><password>MTIzNDU2Nzg=</password></code></p> <h3 id="no">no</h3> <p>A comma separated list of all hosts that should not be accessed through the proxy.</p> <p>Type: string<br /> Example: <code><no>host1, host2, host3</no></code></p> <h2 id="namespace">namespace</h2> <p>Configures an XML-namespace with prefix and uri. The prefix can be used with commands like <code>get-property</code>. The element must have the <code>prefix</code> and the <code>uri</code> attribute.</p> <p>Type: no value Example: <code><namespace prefix="e" uri="http://example.com/" /></code></p> <h2 id="example-1-minimal-repository-configuration">Example 1: minimal repository configuration</h2> <p>A minimal configuration for a repository. If no user and/or password are configured, dav prompts for authentication informations if required.</p> <pre><code><configuration> <repository> <name>myrepo</name> <url>https://example.com/path/to/repo/</url> </repository> </configuration></code></pre> <h2 id="example-2-repository-with-authentication-informations">Example 2: repository with authentication informations</h2> <p>A typical configuration for easy accessing a repository without authentication prompt.</p> <pre><code><configuration> <repository> <name>myrepo</name> <url>https://example.com/path/to/repo/</url> <user>alice</user> <password>MTIzNDU2Nzg=</password> </repository> </configuration></code></pre> <h2 id="example-3-repository-with-full-encryption">Example 3: repository with full encryption</h2> <p>A configuration for a full encrypted repository. Additionally to the repository a key must be configured.</p> <pre><code><configuration> <repository> <name>myrepo</name> <url>https://example.com/path/to/repo/</url> <user>alice</user> <password>MTIzNDU2Nzg=</password> <full-encryption>true</full-encryption> <default-key>mykey1</default-key> </repository> <key> <name>mykey1</name> <file>keys/mykey1</file> <type>aes256</type> </key> </configuration></code></pre> </div> <!-- end content --> </body> </html>