/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos.xml

  • Committer: Teddy Hogeborn
  • Date: 2015-08-10 09:00:23 UTC
  • Revision ID: teddy@recompile.se-20150810090023-fz6vjqr7zf33e2tf
Support the standard org.freedesktop.DBus.ObjectManager interface.

Now that the D-Bus standard has an interface to keep track of new and
removed objects, use that instead of our own methods.  This deprecates
our D-Bus methods "GetAllClients" and "GetAllClientsWithProperties"
and the signals "ClientAdded" and "ClientRemoved", all on the server
interface "se.recompile.Mandos".

* DBUS-API: Removed references to deprecated methods and signals;
  insert reference to the org.freedesktop.DBus.ObjectManager
  interface.
* mandos (DBusObjectWithProperties._get_all_interface_names): New.
  (dbus.OBJECT_MANAGER_IFACE): If not present, monkey patch.
  (DBusObjectWithObjectManager): New.
  (main/MandosDBusService): Inherit from DBusObjectWithObjectManager.
  (main/MandosDBusService.ClientRemoved): Annotate as deprecated.
  (main/MandosDBusService.GetAllClients): - '' -
  (main/MandosDBusService.GetAllClientsWithProperties): Annotate as
                                                        deprecated.
                                                        Also only
                                                        return
                                                        properties on
                                                        client
                                                        interface.
  (main/MandosDBusService.RemoveClient): Call client_removed_signal
                                         instead of ClientRemoved.
  (main/MandosDBusService.GetManagedObjects): New.
  (main/MandosDBusService.client_added_signal): New.
  (main/MandosDBusService.client_removed_signal): - '' -
  (main/cleanup): Call "client_removed_signal" instead of sending
                  "ClientRemoved" signal directly.
  (main): Call "client_added_signal" instead of sending "ClientAdded"
          signal directly.
* mandos-ctl: Use GetManagedObjects instead of
              GetAllClientsWithProperties.  Also, show better error
              message in case of failure to connect to the D-Bus

* mandos-monitor (MandosClientPropertyCache.properties_changed):
  Bug fix; only update properties on client interface.
  (UserInterface.find_and_remove_client): Change to accept arguments
                                          from InterfacesRemoved
                                          signal.  Also, bug fix:
                                          working error message when
                                          removing unknown client.
  (UserInterface.add_new_client): Change to accept arguments from
                                  InterfacesRemoved signal.  Pass
                                  properties to MandosClientWidget
                                  constructor.
  (UserInterface.run): Connect find_and_remove_client method to
                       InterfacesRemoved signal and the add_new_client
                       method to the InterfacesAdded signal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3
3
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4
4
<!ENTITY COMMANDNAME "mandos">
5
 
<!ENTITY TIMESTAMP "2008-09-30">
 
5
<!ENTITY TIMESTAMP "2015-07-20">
6
6
<!ENTITY % common SYSTEM "common.ent">
7
7
%common;
8
8
]>
19
19
        <firstname>Björn</firstname>
20
20
        <surname>Påhlsson</surname>
21
21
        <address>
22
 
          <email>belorn@fukt.bsnet.se</email>
 
22
          <email>belorn@recompile.se</email>
23
23
        </address>
24
24
      </author>
25
25
      <author>
26
26
        <firstname>Teddy</firstname>
27
27
        <surname>Hogeborn</surname>
28
28
        <address>
29
 
          <email>teddy@fukt.bsnet.se</email>
 
29
          <email>teddy@recompile.se</email>
30
30
        </address>
31
31
      </author>
32
32
    </authorgroup>
33
33
    <copyright>
34
34
      <year>2008</year>
 
35
      <year>2009</year>
 
36
      <year>2010</year>
 
37
      <year>2011</year>
 
38
      <year>2012</year>
 
39
      <year>2013</year>
 
40
      <year>2014</year>
 
41
      <year>2015</year>
35
42
      <holder>Teddy Hogeborn</holder>
36
43
      <holder>Björn Påhlsson</holder>
37
44
    </copyright>
84
91
      <replaceable>DIRECTORY</replaceable></option></arg>
85
92
      <sbr/>
86
93
      <arg><option>--debug</option></arg>
 
94
      <sbr/>
 
95
      <arg><option>--debuglevel
 
96
      <replaceable>LEVEL</replaceable></option></arg>
 
97
      <sbr/>
 
98
      <arg><option>--no-dbus</option></arg>
 
99
      <sbr/>
 
100
      <arg><option>--no-ipv6</option></arg>
 
101
      <sbr/>
 
102
      <arg><option>--no-restore</option></arg>
 
103
      <sbr/>
 
104
      <arg><option>--statedir
 
105
      <replaceable>DIRECTORY</replaceable></option></arg>
 
106
      <sbr/>
 
107
      <arg><option>--socket
 
108
      <replaceable>FD</replaceable></option></arg>
 
109
      <sbr/>
 
110
      <arg><option>--foreground</option></arg>
 
111
      <sbr/>
 
112
      <arg><option>--no-zeroconf</option></arg>
87
113
    </cmdsynopsis>
88
114
    <cmdsynopsis>
89
115
      <command>&COMMANDNAME;</command>
107
133
    <para>
108
134
      <command>&COMMANDNAME;</command> is a server daemon which
109
135
      handles incoming request for passwords for a pre-defined list of
110
 
      client host computers.  The Mandos server uses Zeroconf to
111
 
      announce itself on the local network, and uses TLS to
112
 
      communicate securely with and to authenticate the clients.  The
113
 
      Mandos server uses IPv6 to allow Mandos clients to use IPv6
114
 
      link-local addresses, since the clients will probably not have
115
 
      any other addresses configured (see <xref linkend="overview"/>).
116
 
      Any authenticated client is then given the stored pre-encrypted
117
 
      password for that specific client.
 
136
      client host computers. For an introduction, see
 
137
      <citerefentry><refentrytitle>intro</refentrytitle>
 
138
      <manvolnum>8mandos</manvolnum></citerefentry>. The Mandos server
 
139
      uses Zeroconf to announce itself on the local network, and uses
 
140
      TLS to communicate securely with and to authenticate the
 
141
      clients.  The Mandos server uses IPv6 to allow Mandos clients to
 
142
      use IPv6 link-local addresses, since the clients will probably
 
143
      not have any other addresses configured (see <xref
 
144
      linkend="overview"/>).  Any authenticated client is then given
 
145
      the stored pre-encrypted password for that specific client.
118
146
    </para>
119
147
  </refsect1>
120
148
  
189
217
      </varlistentry>
190
218
      
191
219
      <varlistentry>
 
220
        <term><option>--debuglevel
 
221
        <replaceable>LEVEL</replaceable></option></term>
 
222
        <listitem>
 
223
          <para>
 
224
            Set the debugging log level.
 
225
            <replaceable>LEVEL</replaceable> is a string, one of
 
226
            <quote><literal>CRITICAL</literal></quote>,
 
227
            <quote><literal>ERROR</literal></quote>,
 
228
            <quote><literal>WARNING</literal></quote>,
 
229
            <quote><literal>INFO</literal></quote>, or
 
230
            <quote><literal>DEBUG</literal></quote>, in order of
 
231
            increasing verbosity.  The default level is
 
232
            <quote><literal>WARNING</literal></quote>.
 
233
          </para>
 
234
        </listitem>
 
235
      </varlistentry>
 
236
      
 
237
      <varlistentry>
192
238
        <term><option>--priority <replaceable>
193
239
        PRIORITY</replaceable></option></term>
194
240
        <listitem>
228
274
          </para>
229
275
        </listitem>
230
276
      </varlistentry>
 
277
      
 
278
      <varlistentry>
 
279
        <term><option>--no-dbus</option></term>
 
280
        <listitem>
 
281
          <xi:include href="mandos-options.xml" xpointer="dbus"/>
 
282
          <para>
 
283
            See also <xref linkend="dbus_interface"/>.
 
284
          </para>
 
285
        </listitem>
 
286
      </varlistentry>
 
287
      
 
288
      <varlistentry>
 
289
        <term><option>--no-ipv6</option></term>
 
290
        <listitem>
 
291
          <xi:include href="mandos-options.xml" xpointer="ipv6"/>
 
292
        </listitem>
 
293
      </varlistentry>
 
294
      
 
295
      <varlistentry>
 
296
        <term><option>--no-restore</option></term>
 
297
        <listitem>
 
298
          <xi:include href="mandos-options.xml" xpointer="restore"/>
 
299
          <para>
 
300
            See also <xref linkend="persistent_state"/>.
 
301
          </para>
 
302
        </listitem>
 
303
      </varlistentry>
 
304
      
 
305
      <varlistentry>
 
306
        <term><option>--statedir
 
307
        <replaceable>DIRECTORY</replaceable></option></term>
 
308
        <listitem>
 
309
          <xi:include href="mandos-options.xml" xpointer="statedir"/>
 
310
        </listitem>
 
311
      </varlistentry>
 
312
      
 
313
      <varlistentry>
 
314
        <term><option>--socket
 
315
        <replaceable>FD</replaceable></option></term>
 
316
        <listitem>
 
317
          <xi:include href="mandos-options.xml" xpointer="socket"/>
 
318
        </listitem>
 
319
      </varlistentry>
 
320
      
 
321
      <varlistentry>
 
322
        <term><option>--foreground</option></term>
 
323
        <listitem>
 
324
          <xi:include href="mandos-options.xml"
 
325
                      xpointer="foreground"/>
 
326
        </listitem>
 
327
      </varlistentry>
 
328
      
 
329
      <varlistentry>
 
330
        <term><option>--no-zeroconf</option></term>
 
331
        <listitem>
 
332
          <xi:include href="mandos-options.xml" xpointer="zeroconf"/>
 
333
        </listitem>
 
334
      </varlistentry>
 
335
      
231
336
    </variablelist>
232
337
  </refsect1>
233
338
  
305
410
      The server will, by default, continually check that the clients
306
411
      are still up.  If a client has not been confirmed as being up
307
412
      for some time, the client is assumed to be compromised and is no
308
 
      longer eligible to receive the encrypted password.  The timeout,
309
 
      checker program, and interval between checks can be configured
310
 
      both globally and per client; see <citerefentry>
 
413
      longer eligible to receive the encrypted password.  (Manual
 
414
      intervention is required to re-enable a client.)  The timeout,
 
415
      extended timeout, checker program, and interval between checks
 
416
      can be configured both globally and per client; see
 
417
      <citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
 
418
      <manvolnum>5</manvolnum></citerefentry>.
 
419
    </para>
 
420
  </refsect1>
 
421
  
 
422
  <refsect1 id="approval">
 
423
    <title>APPROVAL</title>
 
424
    <para>
 
425
      The server can be configured to require manual approval for a
 
426
      client before it is sent its secret.  The delay to wait for such
 
427
      approval and the default action (approve or deny) can be
 
428
      configured both globally and per client; see <citerefentry>
311
429
      <refentrytitle>mandos-clients.conf</refentrytitle>
312
 
      <manvolnum>5</manvolnum></citerefentry>.
313
 
    </para>
 
430
      <manvolnum>5</manvolnum></citerefentry>.  By default all clients
 
431
      will be approved immediately without delay.
 
432
    </para>
 
433
    <para>
 
434
      This can be used to deny a client its secret if not manually
 
435
      approved within a specified time.  It can also be used to make
 
436
      the server delay before giving a client its secret, allowing
 
437
      optional manual denying of this specific client.
 
438
    </para>
 
439
    
314
440
  </refsect1>
315
441
  
316
442
  <refsect1 id="logging">
317
443
    <title>LOGGING</title>
318
444
    <para>
319
445
      The server will send log message with various severity levels to
320
 
      <filename>/dev/log</filename>.  With the
 
446
      <filename class="devicefile">/dev/log</filename>.  With the
321
447
      <option>--debug</option> option, it will log even more messages,
322
448
      and also show them on the console.
323
449
    </para>
324
450
  </refsect1>
325
451
  
 
452
  <refsect1 id="persistent_state">
 
453
    <title>PERSISTENT STATE</title>
 
454
    <para>
 
455
      Client settings, initially read from
 
456
      <filename>clients.conf</filename>, are persistent across
 
457
      restarts, and run-time changes will override settings in
 
458
      <filename>clients.conf</filename>.  However, if a setting is
 
459
      <emphasis>changed</emphasis> (or a client added, or removed) in
 
460
      <filename>clients.conf</filename>, this will take precedence.
 
461
    </para>
 
462
  </refsect1>
 
463
  
 
464
  <refsect1 id="dbus_interface">
 
465
    <title>D-BUS INTERFACE</title>
 
466
    <para>
 
467
      The server will by default provide a D-Bus system bus interface.
 
468
      This interface will only be accessible by the root user or a
 
469
      Mandos-specific user, if such a user exists.  For documentation
 
470
      of the D-Bus API, see the file <filename>DBUS-API</filename>.
 
471
    </para>
 
472
  </refsect1>
 
473
  
326
474
  <refsect1 id="exit_status">
327
475
    <title>EXIT STATUS</title>
328
476
    <para>
351
499
    </variablelist>
352
500
  </refsect1>
353
501
  
354
 
  <refsect1 id="file">
 
502
  <refsect1 id="files">
355
503
    <title>FILES</title>
356
504
    <para>
357
505
      Use the <option>--configdir</option> option to change where
380
528
        </listitem>
381
529
      </varlistentry>
382
530
      <varlistentry>
383
 
        <term><filename>/var/run/mandos.pid</filename></term>
384
 
        <listitem>
385
 
          <para>
386
 
            The file containing the process id of
387
 
            <command>&COMMANDNAME;</command>.
 
531
        <term><filename>/run/mandos.pid</filename></term>
 
532
        <listitem>
 
533
          <para>
 
534
            The file containing the process id of the
 
535
            <command>&COMMANDNAME;</command> process started last.
 
536
            <emphasis >Note:</emphasis> If the <filename
 
537
            class="directory">/run</filename> directory does not
 
538
            exist, <filename>/var/run/mandos.pid</filename> will be
 
539
            used instead.
 
540
          </para>
 
541
        </listitem>
 
542
      </varlistentry>
 
543
      <varlistentry>
 
544
        <term><filename class="devicefile">/dev/log</filename></term>
 
545
      </varlistentry>
 
546
      <varlistentry>
 
547
        <term><filename
 
548
        class="directory">/var/lib/mandos</filename></term>
 
549
        <listitem>
 
550
          <para>
 
551
            Directory where persistent state will be saved.  Change
 
552
            this with the <option>--statedir</option> option.  See
 
553
            also the <option>--no-restore</option> option.
388
554
          </para>
389
555
        </listitem>
390
556
      </varlistentry>
418
584
      backtrace.  This could be considered a feature.
419
585
    </para>
420
586
    <para>
421
 
      Currently, if a client is declared <quote>invalid</quote> due to
422
 
      having timed out, the server does not record this fact onto
423
 
      permanent storage.  This has some security implications, see
424
 
      <xref linkend="CLIENTS"/>.
425
 
    </para>
426
 
    <para>
427
 
      There is currently no way of querying the server of the current
428
 
      status of clients, other than analyzing its <systemitem
429
 
      class="service">syslog</systemitem> output.
430
 
    </para>
431
 
    <para>
432
587
      There is no fine-grained control over logging and debug output.
433
588
    </para>
434
589
    <para>
435
 
      Debug mode is conflated with running in the foreground.
436
 
    </para>
437
 
    <para>
438
 
      The console log messages does not show a time stamp.
439
 
    </para>
440
 
    <para>
441
590
      This server does not check the expire time of clients’ OpenPGP
442
591
      keys.
443
592
    </para>
456
605
    <informalexample>
457
606
      <para>
458
607
        Run the server in debug mode, read configuration files from
459
 
        the <filename>~/mandos</filename> directory, and use the
460
 
        Zeroconf service name <quote>Test</quote> to not collide with
461
 
        any other official Mandos server on this host:
 
608
        the <filename class="directory">~/mandos</filename> directory,
 
609
        and use the Zeroconf service name <quote>Test</quote> to not
 
610
        collide with any other official Mandos server on this host:
462
611
      </para>
463
612
      <para>
464
613
 
483
632
  
484
633
  <refsect1 id="security">
485
634
    <title>SECURITY</title>
486
 
    <refsect2 id="SERVER">
 
635
    <refsect2 id="server">
487
636
      <title>SERVER</title>
488
637
      <para>
489
638
        Running this <command>&COMMANDNAME;</command> server program
492
641
        soon after startup.
493
642
      </para>
494
643
    </refsect2>
495
 
    <refsect2 id="CLIENTS">
 
644
    <refsect2 id="clients">
496
645
      <title>CLIENTS</title>
497
646
      <para>
498
647
        The server only gives out its stored data to clients which
513
662
        compromised if they are gone for too long.
514
663
      </para>
515
664
      <para>
516
 
        If a client is compromised, its downtime should be duly noted
517
 
        by the server which would therefore declare the client
518
 
        invalid.  But if the server was ever restarted, it would
519
 
        re-read its client list from its configuration file and again
520
 
        regard all clients therein as valid, and hence eligible to
521
 
        receive their passwords.  Therefore, be careful when
522
 
        restarting servers if it is suspected that a client has, in
523
 
        fact, been compromised by parties who may now be running a
524
 
        fake Mandos client with the keys from the non-encrypted
525
 
        initial <acronym>RAM</acronym> image of the client host.  What
526
 
        should be done in that case (if restarting the server program
527
 
        really is necessary) is to stop the server program, edit the
528
 
        configuration file to omit any suspect clients, and restart
529
 
        the server program.
530
 
      </para>
531
 
      <para>
532
665
        For more details on client-side security, see
533
666
        <citerefentry><refentrytitle>mandos-client</refentrytitle>
534
667
        <manvolnum>8mandos</manvolnum></citerefentry>.
539
672
  <refsect1 id="see_also">
540
673
    <title>SEE ALSO</title>
541
674
    <para>
542
 
      <citerefentry>
543
 
        <refentrytitle>mandos-clients.conf</refentrytitle>
544
 
        <manvolnum>5</manvolnum></citerefentry>, <citerefentry>
545
 
        <refentrytitle>mandos.conf</refentrytitle>
546
 
        <manvolnum>5</manvolnum></citerefentry>, <citerefentry>
547
 
        <refentrytitle>mandos-client</refentrytitle>
548
 
        <manvolnum>8mandos</manvolnum></citerefentry>, <citerefentry>
549
 
        <refentrytitle>sh</refentrytitle><manvolnum>1</manvolnum>
550
 
      </citerefentry>
 
675
      <citerefentry><refentrytitle>intro</refentrytitle>
 
676
      <manvolnum>8mandos</manvolnum></citerefentry>,
 
677
      <citerefentry><refentrytitle>mandos-clients.conf</refentrytitle>
 
678
      <manvolnum>5</manvolnum></citerefentry>,
 
679
      <citerefentry><refentrytitle>mandos.conf</refentrytitle>
 
680
      <manvolnum>5</manvolnum></citerefentry>,
 
681
      <citerefentry><refentrytitle>mandos-client</refentrytitle>
 
682
      <manvolnum>8mandos</manvolnum></citerefentry>,
 
683
      <citerefentry><refentrytitle>sh</refentrytitle>
 
684
      <manvolnum>1</manvolnum></citerefentry>
551
685
    </para>
552
686
    <variablelist>
553
687
      <varlistentry>
574
708
      </varlistentry>
575
709
      <varlistentry>
576
710
        <term>
577
 
          <ulink url="http://www.gnu.org/software/gnutls/"
578
 
          >GnuTLS</ulink>
 
711
          <ulink url="http://gnutls.org/">GnuTLS</ulink>
579
712
        </term>
580
713
      <listitem>
581
714
        <para>
619
752
      </varlistentry>
620
753
      <varlistentry>
621
754
        <term>
622
 
          RFC 4346: <citetitle>The Transport Layer Security (TLS)
623
 
          Protocol Version 1.1</citetitle>
 
755
          RFC 5246: <citetitle>The Transport Layer Security (TLS)
 
756
          Protocol Version 1.2</citetitle>
624
757
        </term>
625
758
      <listitem>
626
759
        <para>
627
 
          TLS 1.1 is the protocol implemented by GnuTLS.
 
760
          TLS 1.2 is the protocol implemented by GnuTLS.
628
761
        </para>
629
762
      </listitem>
630
763
      </varlistentry>
640
773
      </varlistentry>
641
774
      <varlistentry>
642
775
        <term>
643
 
          RFC 5081: <citetitle>Using OpenPGP Keys for Transport Layer
644
 
          Security</citetitle>
 
776
          RFC 6091: <citetitle>Using OpenPGP Keys for Transport Layer
 
777
          Security (TLS) Authentication</citetitle>
645
778
        </term>
646
779
      <listitem>
647
780
        <para>