Added configuration parameter "cipher_suite".
[pwmd.git] / doc / pwmd.1.in
blobd10fd2833780290421fd8365cd8128509087b5fa
1 .\" This program is free software; you can redistribute it and/or modify
2 .\" it under the terms of the GNU General Public License as published by
3 .\" the Free Software Foundation; either version 2 of the License, or
4 .\" (at your option) any later version.
5 .\" 
6 .\" This program is distributed in the hope that it will be useful,
7 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
8 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9 .\" GNU General Public License for more details.
10 .\" 
11 .\" You should have received a copy of the GNU General Public License
12 .\" along with this program; if not, write to the Free Software
13 .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02110-1301  USA
14 .de URL
15 \\$2 \(laURL: \\$1 \(ra\\$3
17 .if \n[.g] .mso www.tmac
18 .TH PWMD 1 "20 Dec 2008" "Password Manager Daemon" "Password Manager Daemon"
19 .SH NAME
21 pwmd \- a universal data server
22 .SH SYNOPSIS
23 .B pwmd
24 [\-hvDnP] [\-f <rcfile>] [\-I <filename> [\-i <iterations>]] [\-k <keyfile>]
25 [\-C <filename>] [\-o <filename>] [file] [...]
27 .SH DESCRIPTION
28 .B pwmd
29 is a daemon/server that serves clients data which is stored in a, optionally
30 encrypted and compressed, XML data file. Clients connect and send commands
31 that either retrieve or store data.
33 .SH OPTIONS
34 The following are the available command line options. Remaining arguments are
35 files to add to the cache on startup.
36 .TP
37 .I "\-f rcfile"
38 Specify an alternate configuration file. The default is \fI~/.pwmd/config\fR.
39 .TP
40 .I "\-I filename \-o filename"
41 Imports an XML file. The XML file should be in conformance to the pwmd DTD.
42 See COMMANDS contained in the distributed pwmd archive for details. If
43 encryption is wanted (specified with the \fIiterations\fP configuration
44 parameter or the \fB\-i\fP command line switch), you will be prompted for a
45 passphrase to encrypt with. The output is written to the filename specified
46 with the \fI\-o\fP command line switch which should then be placed in the
47 configured \fIdata_directory\fP.
48 .TP
49 .I "\-i iterations
50 The number of encryption iterations to use when importing. When not specified,
51 the \fIiterations\fP configuration option from the \fIglobal\fP section will
52 be used.
53 .TP
54 .I "\-k keyfile"
55 When importing (\fB-I\fP) or converting (\fB-C\fP), obtain the key from the
56 specified filename. Only the first line is read from this file. Be sure to set
57 \fIkey_file\fP in your configuration.
58 .TP
59 .I "\-C filename \-o filename"
60 Converts a \fBpwmd\fP version 1 data file to a version 2 data file. If
61 encrypted, you will be prompted for a passphrase to use for decryption (unless
62 using \fB-k\fP). The converted data file will be saved to the filename
63 specified with the \fB-o\fP command line switch and with the same passphrase
64 and iterations as the version 1 data file.
65 .TP
66 .I "\-D"
67 Disable the LIST and DUMP protocol commands.
68 .TP
69 .I "\-n"
70 Run as a foreground process.
71 .TP
72 .I "\-P"
73 Disable
74 .BR pinentry (1)
75 support overriding any configuration setting.
76 .TP
77 .I "\-v"
78 Version information.
79 .TP
80 .I "\-h"
81 Help text.
83 .SH CONFIGURATION FILE
84 Blank lines and lines beginning with '#' are ignored. Some options can have
85 data file-specific settings by placing them in a file section. A file section
86 is declared by surrounding the filename with braces (i.e., \fI[filename]\fP).
87 Global options may be specified in a \fI[global]\fP section and are the
88 default options for new or unspecified files. If the first character of a
89 string value is a tilde, it will be expanded to your home directory. First the
90 global options:
91 .TP
92 .I "socket_path=<string>"
93 Listen on the specified socket. The default is \fI~/.pwmd/socket\fR.
94 \fBpwmd\fP will always listen on a local socket.
95 .TP
96 .I "socket_perms=<integer>"
97 Permissions to set after creating the socket. This will override any
98 .BR umask (2)
99 setting.
101 .I "enable_tcp=<boolean>"
102 Whether to enable TCP server support. The default is \fIdisabled\fP. See
103 \fBTCP SUPPORT\fP below.
105 .I "tcp_port=<integer>"
106 The port to listen on when \fIenable_tcp\fP is \fItrue\fP. The default is
107 \fI6466\fP.
109 .I "tcp_interface=<string>"
110 Only useful when run as root.
112 .I "tcp_wait=<integer>"
113 The time in tenths of a second to wait for a new connection. The default is
114 \fB3\fP. Setting to \fB0\fP will disable waiting. This can be used to prevent
115 denial-of-service attacks.
117 .I "cipher_priority=<string>"
118 The GnuTLS cipher suite and protocol to use. The default is \fBSECURE256\fP.
119 See the 
120 .BR gnutls-cli (1)
121 documentation for more information.
123 .I "data_directory=<string>"
124 Where
125 .B pwmd
126 should store and retrieve data files. The default is \fI~/.pwmd/data\fR.
128 .I "disable_mlockall=<boolean>"
129 When set to \fBfalse\fP,
130 .BR mlockall (2)
131 will be called after the client connects. This will use alot more physical
132 memory but may also be more secure. Most will probably find it overkill since
133 the contents of all allocated memory is cleared before being freed. Note that
134 this doesn't affect the file cache which is always stored in RAM (if
135 possible).
137 .I "log_path=<string>"
138 Logs informational messages to the specified file. The default is
139 \fI~/.pwmd/log\fR.
141 .I "enable_logging=<boolean>"
142 Enable or disable logging to \fIlog_path\fR. The default is \fIfalse\fR.
144 .I "syslog=<boolean>"
145 Enable logging to
146 .BR syslog (8)
147 with facility LOG_DAEMON and priority LOG_INFO. The default is \fIfalse\fR.
149 .I "cache_push=<list>"
150 A list of filenames separated by commas that will be pushed into the file
151 cache upon startup.
152 .B pwmd
153 will ask for the key for each file specified unless the key was specified with
154 the \fBkey\fR or \fBkey_file\fR parameters in a matching file section. The
155 default is none.
157 .I "priority=<integer>"
158 The priority, or niceness, of the server. The default is inherited from the
159 parent process.
161 Below are options that can be specified in the \fI[global]\fP or
162 \fI[filename]\fP section. If in both then \fI[filename]\fP will have
163 precedence.
165 .I "backup=<boolean>"
166 Whether to create a backup of the data file when saving. The default is
167 \fItrue\fP. The backup filename has the .backup extension appended to the
168 opened file.
170 .I "cache_timeout=<integer>"
171 The number of seconds to keep the cache entry for this file. If \fI-1\fP, the
172 cache entry is kept forever. If \fI0\fP, each time the file is opened or saved
173 a key will be required.
175 .I "enable_pinentry=<boolean>"
176 If \fIfalse\fP, disable the use of
177 .BR pinentry (1).
178 When disabled and a file requires a passphrase, the passphrase must be
179 included in the command (see COMMANDS included in the archive). The default is
180 \fItrue\fP. Also see \fBPINENTRY\fP below.
182 .I "pinentry_timeout=<integer>"
183 The number of seconds before the pinentry dialog will terminate while waiting
184 for a passphrase. The default is \fB20\fP. Set to \fI0\fP to wait forever.
186 .I "iterations=<integer>"
187 The number of times to encrypt the data. A value of 10000 or more will make
188 dictionary attacks very slow depending on the CPU. The default is \fI1\fP
189 iteration. Setting to \fI0\fP will disable encryption.
191 .I "iteration_progress=<integer>"
192 After the specified number of iterations have been processed while encrypting
193 or decrypting, a status message with the keyword \fBPROGRESS\fP will be sent
194 to the client.  Setting to \fI0\fP, the default, disables sending progress
195 messages.
197 .I "key=<string>"
198 The initial passphrase to use for this file. If specified in the
199 \fI[global]\fP section then "\fIglobal\fP" is treated as a data filename and
200 not a default for other files. Note that if a client changes the passphrase
201 for this data file with the \fBSAVE\fP command, then this value is not
202 modified and will need to be updated by hand.
204 .I "key_file=<string>"
205 Same as the \fBkey\fP option above but obtains the key from the specified
206 filename with the key being on the first line of the file. Note that if the
207 cache entry for this file gets removed then the only way to have it added
208 again is to restart \fBpwmd\fP or to re-read the configuration file (i.e., you
209 won't be prompted from pinentry).
211 .I "compression_level=<integer>"
212 The default compression level for data files from \fI1\fP to \fI9\fP, \fI1\fP
213 being the fastest but least compression and \fI9\fP being the slowest but best
214 compression. To disable compression entirely, set to \fI0\fP. The default is
215 \fI6\fP.
217 .I "zlib_bufsize=<integer>"
218 The input and output buffer size when compressing and decompressing. This
219 affects how often the COMPRESS and DECOMPRESS status messages are sent and
220 also affects compression quality. The default is \fB65536\fP. Set to a higher
221 value for larger files.
223 .I "recursion_depth=<integer>"
224 The maximum number of times to resolve a target attribute for a single element
225 in an element path. An error is returned when this value is exceeded. The
226 default is \fI20\fP but can be disabled by setting to \fI0\fP.
228 .I "keepalive=<integer>"
229 Sends keep alive status messages to the client every N seconds. Set to \fI0\fP
230 to disable. The default is \fI5\fP.
232 .I "tcp_access=[!]<string>"
233 A comma separated list of client x509 certificate fingerprints in MD5 format
234 that will be allowed to open a file. If prefixed with \fB!\fP, access is
235 denied for the specified certificate. The access control is checked only when
236 a client sends the OPEN command. If found in neither the \fBglobal\fP or
237 filename sections then access will be granted. If defined but empty then
238 access will be denied.
240 .I "tcp_require_key=<boolean>"
241 Require the client to provide the key to open a file even if the key is
242 cached. The default is \fIfalse\fP.
244 .SH PINENTRY
246 When \fIenable_pinentry\fP is \fBtrue\fP, commands that require a key
247 will use
248 .BR pinentry (1)
249 to retrieve the passphrase. Since \fBpwmd\fP is a daemon process, it isn't
250 attached to any terminal. So \fBpinentry\fP needs to know where to put it's
251 dialog box by using command line options when executed. These can be set by
252 either using protocol commands (see COMMANDS included in the archive) or by
253 creating a file \fI~/.pwmd/pinentry.conf\fP. When using the file, each line
254 should contain NAME=VALUE pairs where NAME is one of:
256 .B TTYNAME
257 The full path of the tty device.
259 .B TTYTYPE
260 The terminal type (i.e., vt100). Should be set when \fBTTYNAME\fP is set.
262 .B DISPLAY
263 If using an X11 pinentry.
265 .B PATH
266 The full path to the pinentry binary. The default is \fI@pinentry@\fP.
268 The file is read only once after each client first connects. Note that if your
269 not using a \fBDISPLAY\fP, then both \fBTTYNAME\fP and \fBTTYTYPE\fP should be
270 set otherwise you'll get a segfault from ncurses.
272 .SH TCP SUPPORT
273 When compiled with TCP support and \fIenable_tcp\fP is \fItrue\fP, \fBpwmd\fP
274 can accept connections from remote hosts. Authentication is done with X509
275 certificates. The server certificate (\fB~/.pwmd/server-cert.pem\fP) should be
276 signed by a Certificate Authority (CA), which will probably be a locally
277 generated one (see the
278 .BR certtool (1)
279 documentation for how to do this). When a client connects, \fBpwmd\fP
280 will require the client to send a certificate that was signed by the same
281 CA that was used to sign the \fBpwmd\fP server certificate
282 (\fB~/.pwmd/ca-cert.pem\fP). After the client certificate is validated,
283 \fBpwmd\fP will accept commands from the client.
285 .SH SIGNALS
287 .B SIGUSR1
288 Clears the entire file cache. If there are any clients connected, a key will
289 be required for the next \fBOPEN\fP or \fBSAVE\fP command.
291 .B SIGHUP
292 Reloads the configuration file.
294 .B SIGTERM and SIGINT
295 Disallows new connections and waits for all clients to disconnect before
296 terminating.
298 .SH FILES
300 .B ~/.pwmd/config
301 Default configuration file.
303 .B ~/.pwmd/data
304 Default data directory.
306 .B ~/.pwmd/socket
307 Default listening socket.
309 .B ~/.pwmd/log
310 Default log file when logging is enabled.
312 .B @pinentry@
313 Default location of the pinentry binary.
315 .B ~/.pwmd/pinentry.conf
316 Default pinentry settings for new clients.
318 .B ~/.pwmd/ca-cert.pem
319 The certificate authority (CA) than was used to sign the server (and client)
320 certificate.
322 .B ~/.pwmd/server-cert.pem
323 The pwmd server certificate. This is sent to the client. Clients should check
324 the validity of it to ensure that the \fBpwmd\fP server hasn't been hijacked.
326 .B ~/.pwmd/server-key.pem
327 The key that was used to sign the server certificate.
329 .SH AUTHOR
330 Ben Kibbey <bjk@luxsci.net>
332 .URL "http://bjk.sourceforge.net/pwmd/" "PWMD Homepage" .
334 .SH "SEE ALSO"
335 .BR certtool (1),
336 .BR pinentry (1)
338 Also see \fBCOMMANDS\fP included in the archive for protocol commands and
339 syntax.