1 <!DOCTYPE html>
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
3 <head>
4 <meta charset="utf-8" />
5 <meta name="generator" content="pandoc" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7 <title>Configuration</title>
8 <style type="text/css">
9 code{white-space: pre-wrap;}
10 span.smallcaps{font-variant: small-caps;}
11 span.underline{text-decoration: underline;}
12 div.column{display: inline-block; vertical-align: top; width: 50%;}
13 </style>
14 <link rel="stylesheet" href="davdoc.css" />
15 <!--[if lt IE 9]>
16 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
17 <![endif]-->
18 </head>
19 <body>
20 <div class="header">
21 <a href="./index.html"><span>DavUtils documentation</span></a>
22 </div>
23 <div class="sidebar">
24 <div class="nav">
25 <h3>dav</h3>
26 <ul>
27 <li><a href="getting-started.html">Getting started</a></li>
28 <li><a href="commands.html">Commands</a></li>
29 <ul>
30 <li><a href="list.html">list</a></li>
31 <li><a href="get.html">get</a></li>
32 <li><a href="put.html">put</a></li>
33 <li><a href="mkdir.html">mkdir</a></li>
34 <li><a href="remove.html">remove</a></li>
35 <li><a href="copy.html">copy</a></li>
36 <li><a href="move.html">move</a></li>
37 <li><a href="rename.html">rename</a></li>
38 <li><a href="export.html">export</a></li>
39 <li><a href="import.html">import</a></li>
40 <li><a href="get-property.html">get-property</a></li>
41 <li><a href="set-property.html">set-property</a></li>
42 <li><a href="remove-property.html">remove-property</a></li>
43 <li><a href="lock.html">lock</a></li>
44 <li><a href="unlock.html">unlock</a></li>
45 <li><a href="info.html">info</a></li>
46 <li><a href="date.html">date</a></li>
47 <li><a href="versioncontrol.html">versioncontrol</a></li>
48 <li><a href="list-versions.html">list-versions</a></li>
49 <li><a href="checkout.html">checkout</a></li>
50 <li><a href="checkin.html">checkin</a></li>
51 <li><a href="uncheckout.html">uncheckout</a></li>
52 <li><a href="add-repository.html">add-repository</a></li>
53 <li><a href="remove-repository.html">remove-repository</a></li>
54 <li><a href="list-repositories.html">list-repositories</a></li>
55 <li><a href="repository-url.html">repository-url</a></li>
56 <li><a href="add-user.html">add-user</a></li>
57 <li><a href="remove-user.html">remove-user</a></li>
58 <li><a href="edit-user.html">edit-user</a></li>
59 <li><a href="list-users.html">list-users</a></li>
60 <li><a href="check-config.html">check-config</a></li>
61 </ul>
62 <li><a href="configuration.html">Configuration</a></li>
63 <li><a href="encryption.html">Encryption</a></li>
64 </ul>
65 </div>
66 <div class="nav">
67 <h3>dav-sync</h3>
68 <ul>
69 <li><a href="introduction.html">Introduction</a></li>
70 <li><a href="sync-commands.html">Commands</a></li>
71 <ul>
72 <li><a href="pull.html">pull</a></li>
73 <li><a href="push.html">push</a></li>
74 <li><a href="archive.html">archive</a></li>
75 <li><a href="restore.html">restore</a></li>
76 <li><a href="list-conflicts.html">list-conflicts</a></li>
77 <li><a href="resolve-conflicts.html">resolve-conflicts</a></li>
78 <li><a href="delete-conflicts.html">delete-conflicts</a></li>
79 <li><a href="trash-info.html">trash-info</a></li>
80 <li><a href="empty-trash.html">empty-trash</a></li>
81 <li><a href="list-versions.html">list-versions</a></li>
82 <li><a href="add-tag.html">add-tag</a></li>
83 <li><a href="remove-tag.html">remove-tag</a></li>
84 <li><a href="set-tags.html">set-tags</a></li>
85 <li><a href="list-tags.html">list-tags</a></li>
86 <li><a href="add-directory.html">add-directory</a></li>
87 <li><a href="list-directories.html">list-directories</a></li>
88 <li><a href="sync-check-config.html">check-config</a></li>
89 <li><a href="check-repositories.html">check-repositories</a></li>
90 </ul>
91 <li><a href="sync-configuration.html">Configuration</a></li>
92 </ul>
93 </div>
94 </div>
95
96 <!-- begin content -->
97 <div class="content">
98 <header>
99 <h1 class="title">Configuration</h1>
100 </header>
101 <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>
102 <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>
103 <h2 id="repository">repository</h2>
104 <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>
105 <p>Required child elements: <code><name></code>, <code><url></code><br />
106 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>
107 <h3 id="name">name</h3>
108 <p>Unique repository identifer.</p>
109 <p>Type: string<br />
110 Example: <code><name>myrepo</name></code></p>
111 <h3 id="url">url</h3>
112 <p>The url must point to a valid WebDAV compilant collection.</p>
113 <p>Type: url<br />
114 Example: <code><url>https://example.com/webdav/repo1/</url></code></p>
115 <h3 id="user">user</h3>
116 <p>User used for authentication</p>
117 <p>Type: string<br />
118 Example: <code><user>alice</user></code></p>
119 <h3 id="password">password</h3>
120 <p>A base64 encoded password used for authentication.</p>
121 <p>Type: base64 string<br />
122 Example: <code><password>MTIzNDU2Nzg=</password></code></p>
123 <h3 id="stored-user">stored-user</h3>
124 <p>Credentials id used for authentication. The credentials must be stored in the secret store.</p>
125 <p>Type: string<br />
126 Example: <code><stored-user>alice</stored-user></code></p>
127 <h3 id="default-key">default-key</h3>
128 <p>Identifer of the key used by default for encryption. There must be a configured key with this name.</p>
129 <p>Type: string<br />
130 Example: <code><default-key>mykey</default-key></code></p>
131 <h3 id="full-encryption">full-encryption</h3>
132 <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>
133 <p>Type: boolean<br />
134 Default: false<br />
135 Example: <code><full-encryption>true</full-encryption></code></p>
136 <h3 id="content-encryption">content-encryption</h3>
137 <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>
138 <p>Type: boolean<br />
139 Default: false<br />
140 Example: <code><content-encryption>true</content-encryption></code></p>
141 <h3 id="decrypt-content">decrypt-content</h3>
142 <p>Controls only the decryption of content. If <code>true</code> content is decrypted.</p>
143 <p>Type: boolean<br />
144 Default false<br />
145 Example: <code><decrypt-content>true</decrypt-content></code></p>
146 <h3 id="decrypt-name">decrypt-name</h3>
147 <p>Controls only the decryption of resource names. If <code>true</code> resource names are decrypted. This effects path to url resolution.</p>
148 <p>Type: boolean<br />
149 Default: false<br />
150 Example: <code><decrypt-name>true</decrypt-name></code></p>
151 <h3 id="cert">cert</h3>
152 <p>Path to a file containing certificates to verify the TLS connection to the server.</p>
153 <p>Type: string<br />
154 Example: <code><cert>/etc/certs/cabundle.pem</cert></code></p>
155 <p>Note: This element does the same as curl’s <code>--cacert</code> option.</p>
156 <h3 id="verification">verification</h3>
157 <p>This element can disable TLS certificate verification.</p>
158 <p>Type: boolean<br />
159 Default: true<br />
160 Example: <code><verification>false</verification></code></p>
161 <h3 id="ssl-version">ssl-version</h3>
162 <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>
163 <p>Type: ssl version enum<br />
164 Example: <code><ssl-version>TLSv1.2</ssl-version></code></p>
165 <h3 id="authmethods">authmethods</h3>
166 <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>
167 <p>Type: list of authmethod</p>
168 <p>Default: basic<br />
169 Example: <code><authmethods>basic digest</authmethods></code></p>
170 <h2 id="key">key</h2>
171 <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>
172 <p>Required child elements: <code><name></code>, <code><file></code><br />
173 Optional elements: <code><type></code></p>
174 <h3 id="name-1">name</h3>
175 <p>Unique key identifer.</p>
176 <p>Type: string<br />
177 Example: <code><name>key1</name></code></p>
178 <h3 id="file">file</h3>
179 <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>
180 <p>Type: string<br />
181 Example: <code><path>keys/key1.bin</path></code></p>
182 <h3 id="type">type</h3>
183 <p>Specifies the key type. Valid values are <code>aes128</code> or <code>aes256</code>.</p>
184 <p>Type: aes type enum<br />
185 Default: aes256<br />
186 Example: <code><type>aes128</type></code></p>
187 <h2 id="http-proxy-https-proxy">http-proxy / https-proxy</h2>
188 <p>Configuration for http and https proxies is the same. Both use the same elements, but https-proxy expects an https url.</p>
189 <p>Required child elements: <code><url></code><br />
190 Optional elements: <code><user></code>, <code><password></code>, <code><no></code></p>
191 <h3 id="url-1">url</h3>
192 <p>Specifies the proxy url.</p>
193 <p>Type: url<br />
194 Example: <code><url>http://myproxy/</url></code></p>
195 <h3 id="user-1">user</h3>
196 <p>User used for authentication with the proxy.</p>
197 <p>Type: string<br />
198 Example: <code><user>alice</user></code></p>
199 <h3 id="password-1">password</h3>
200 <p>A base64 encoded password used for authentication.</p>
201 <p>Type: base64 string<br />
202 Example: <code><password>MTIzNDU2Nzg=</password></code></p>
203 <h3 id="no">no</h3>
204 <p>A comma separated list of all hosts that should not be accessed through the proxy.</p>
205 <p>Type: string<br />
206 Example: <code><no>host1, host2, host3</no></code></p>
207 <h2 id="namespace">namespace</h2>
208 <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>
209 <p>Type: no value Example: <code><namespace prefix="e" uri="http://example.com/" /></code></p>
210 <h2 id="example-1-minimal-repository-configuration">Example 1: minimal repository configuration</h2>
211 <p>A minimal configuration for a repository. If no user and/or password are configured, dav prompts for authentication informations if required.</p>
212 <pre><code><configuration>
213 <repository>
214 <name>myrepo</name>
215 <url>https://example.com/path/to/repo/</url>
216 </repository>
217 </configuration></code></pre>
218 <h2 id="example-2-repository-with-authentication-informations">Example 2: repository with authentication informations</h2>
219 <p>A typical configuration for easy accessing a repository without authentication prompt.</p>
220 <pre><code><configuration>
221 <repository>
222 <name>myrepo</name>
223 <url>https://example.com/path/to/repo/</url>
224 <user>alice</user>
225 <password>MTIzNDU2Nzg=</password>
226 </repository>
227 </configuration></code></pre>
228 <h2 id="example-3-repository-with-full-encryption">Example 3: repository with full encryption</h2>
229 <p>A configuration for a full encrypted repository. Additionally to the repository a key must be configured.</p>
230 <pre><code><configuration>
231 <repository>
232 <name>myrepo</name>
233 <url>https://example.com/path/to/repo/</url>
234 <user>alice</user>
235 <password>MTIzNDU2Nzg=</password>
236 <full-encryption>true</full-encryption>
237 <default-key>mykey1</default-key>
238 </repository>
239
240 <key>
241 <name>mykey1</name>
242 <file>keys/mykey1</file>
243 <type>aes256</type>
244 </key>
245 </configuration></code></pre>
246 </div>
247 <!-- end content -->
248 </body>
249 </html>
250