/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 intro.xml

  • Committer: Teddy Hogeborn
  • Date: 2019-02-09 23:23:26 UTC
  • Revision ID: teddy@recompile.se-20190209232326-z1z2kzpgfixz7iaj
Add support for using raw public keys in TLS (RFC 7250)

Since GnuTLS removed support for OpenPGP keys in TLS (RFC 6091), and
no other library supports it, we have to change the protocol to use
something else.  We choose to use "raw public keys" (RFC 7250).  Since
we still use OpenPGP keys to decrypt the secret password, this means
that each client will have two keys: One OpenPGP key and one TLS
public/private key, and the key ID of the latter key is used to
identify clients instead of the fingerprint of the OpenPGP key.

Note that this code is still compatible with GnuTLS before version
3.6.0 (when OpenPGP key support was removed).  This commit merely adds
support for using raw pulic keys instead with GnuTLS 3.6.6. or later.

* DBUS-API (Signals/ClientNotFound): Change name of first parameter
                                     from "Fingerprint" to "KeyID".
  (Mandos Client Interface/Properties/KeyID): New.
* INSTALL: Document conflict with GnuTLS 3.6.0 (which removed OpenPGP
           key support) up until 3.6.6, when support for raw public
           keys was added.  Also document new dependency of client on
           "gnutls-bin" package (for certtool).
* Makefile (run-client): Depend on TLS key files, and also pass them
                         as arguments to client.
  (keydir/tls-privkey.pem, keydir/tls-pubkey.pem): New.
  (confdir/clients.conf): Add dependency on TLS public key.
  (purge-client): Add removal of TLS key files.
* clients.conf ([foo]/key_id, [bar]/key_id): New.
* debian/control (Source: mandos/Build-Depends): Also allow
                                                 libgnutls30 (>= 3.6.6)
  (Package: mandos/Depends): - '' -
  (Package: mandos/Description): Alter description to match new
                                 design.
  (Package: mandos-client/Description): - '' -
  (Package: mandos-client/Depends): Move "gnutls-bin | openssl" to
                                    here from "Recommends".
* debian/mandos-client.README.Debian: Add --tls-privkey and
                                      --tls-pubkey options to test
                                      command.
* debian/mandos-client.postinst (create_key): Renamed to "create_keys"
                                             (all callers changed),
                                             and also create TLS key.
* debian/mandos-client.postrm (purge): Also remove TLS key files.
* intro.xml (DESCRIPTION): Describe new dual-key design.
* mandos (GnuTLS): Define different functions depending on whether
                   support for raw public keys is detected.
  (Client.key_id): New attribute.
  (ClientDBus.KeyID_dbus_property): New method.
  (ProxyClient.__init__): Take new "key_id" parameter.
  (ClientHandler.handle): Use key IDs when using raw public keys and
                          use fingerprints when using OpenPGP keys.
  (ClientHandler.peer_certificate): Also handle raw public keys.
  (ClientHandler.key_id): New.
  (MandosServer.handle_ipc): Pass key ID over the pipe IPC.  Also
                             check for key ID matches when looking up
                             clients.
  (main): Default GnuTLS priority string depends on whether we are
          using raw public keys or not.  When unpickling clients, set
          key_id if not set in the pickle.
  (main/MandosDBusService.ClientNotFound): Change name of first
                                           parameter from
                                           "Fingerprint" to "KeyID".
* mandos-clients.conf.xml (OPTIONS): Document new "key_id" option.
  (OPTIONS/secret): Mention new key ID matchning.
  (EXPANSION/RUNTIME EXPANSION): Add new "key_id" option.
  (EXAMPLE): - '' -
* mandos-ctl (tablewords, main/keywords): Add new "KeyID" property.
* mandos-keygen: Create TLS key files.  New "--tls-keytype" (-T)
                 option.  Alter help text to be more clear about key
                 types.  When in password mode, also output "key_id"
                 option.
* mandos-keygen.xml (SYNOPSIS): Add new "--tls-keytype" (-T) option.
  (DESCRIPTION): Alter to match new dual-key design.
  (OVERVIEW): - '' -
  (FILES): Add TLS key files.
* mandos-options.xml (priority): Document new default priority string
                                 when using raw public keys.
* mandos.xml (NETWORK PROTOCOL): Describe new protocol using key ID.
  (BUGS): Remove issue about checking expire times of OpenPGP keys,
          since TLS public keys do not have expiration times.
  (SECURITY/CLIENT): Alter description to match new design.
  (SEE ALSO/GnuTLS): - '' -
  (SEE ALSO): Add reference to RFC 7250, and alter description of when
              RFC 6091 is used.
* overview.xml: Alter text to match new design.
* plugin-runner.xml (EXAMPLE): Add --tls-pubkey and --tls-privkey
                               options to mandos-client options.
* plugins.d/mandos-client.c: Use raw public keys when compiling with
                             supporting GnuTLS versions. Add new
                             "--tls-pubkey" and "--tls-privkey"
                             options (which do nothing if GnuTLS
                             library does not support raw public
                             keys).  Alter text throughout to reflect
                             new design.  Only generate new DH
                             parameters (based on size of OpenPGP key)
                             when using OpenPGP in TLS.  Default
                             GnuTLS priority string depends on whether
                             we are using raw public keys or not.
* plugins.d/mandos-client.xml (SYNOPSIS): Add new "--tls-privkey" (-t)
                                          and "--tls-pubkey" (-T)
                                          options.
  (DESCRIPTION): Describe new dual-key design.
  (OPTIONS): Document new "--tls-privkey" (-t) and "--tls-pubkey" (-T)
             options.
  (OPTIONS/--dh-bits): No longer necessarily depends on OpenPGP key
                       size.
  (FILES): Add default locations for TLS public and private key files.
  (EXAMPLE): Use new --tls-pubkey and --tls-privkey options.
  (SECURITY): Alter wording slightly to reflect new dual-key design.
  (SEE ALSO/GnuTLS): Alter description to match new design.
  (SEE ALSO): Add reference to RFC 7250, and alter description of when
              RFC 6091 is used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="UTF-8"?>
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
 
<!ENTITY TIMESTAMP "2019-08-04">
 
4
<!ENTITY TIMESTAMP "2019-02-09">
5
5
<!ENTITY % common SYSTEM "common.ent">
6
6
%common;
7
7
]>
38
38
      <year>2016</year>
39
39
      <year>2017</year>
40
40
      <year>2018</year>
41
 
      <year>2019</year>
42
41
      <holder>Teddy Hogeborn</holder>
43
42
      <holder>Björn Påhlsson</holder>
44
43
    </copyright>
131
130
    </para>
132
131
    <para>
133
132
      So, at boot time, the Mandos client will ask for its encrypted
134
 
      data over the network, decrypt the data to get the password, use
135
 
      the password to decrypt the root file system, and the client can
136
 
      then continue booting.
 
133
      data over the network, decrypt it to get the password, use it to
 
134
      decrypt the root file, and continue booting.
137
135
    </para>
138
136
    <para>
139
137
      Now, of course the initial RAM disk image is not on the
145
143
      long, and will no longer give out the encrypted key.  The timing
146
144
      here is the only real weak point, and the method, frequency and
147
145
      timeout of the server’s checking can be adjusted to any desired
148
 
      level of paranoia.
 
146
      level of paranoia
149
147
    </para>
150
148
    <para>
151
149
      (The encrypted keys on the Mandos server is on its normal file
384
382
      plugin requirements.
385
383
    </para>
386
384
  </refsect1>
387
 
 
388
 
  <refsect1 id="systemd">
389
 
    <title>SYSTEMD</title>
390
 
    <para>
391
 
      More advanced startup systems like <citerefentry><refentrytitle
392
 
      >systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
393
 
      already have their own plugin-like mechanisms for allowing
394
 
      multiple agents to independently retrieve a password and deliver
395
 
      it to the subsystem requesting a password to unlock the root
396
 
      file system.  On these systems, it would make no sense to run
397
 
      <citerefentry><refentrytitle>plugin-runner</refentrytitle
398
 
      ><manvolnum>8mandos</manvolnum></citerefentry>, the plugins of
399
 
      which would largely duplicate the work of (and conflict with)
400
 
      the existing systems prompting for passwords.
401
 
    </para>
402
 
    <para>
403
 
      As for <citerefentry><refentrytitle>systemd</refentrytitle
404
 
      ><manvolnum>1</manvolnum></citerefentry> in particular, it has
405
 
      its own <ulink
406
 
      url="https://www.freedesktop.org/wiki/Software/systemd/PasswordAgents/"
407
 
      >Password Agents</ulink> system.  Mandos uses this via its
408
 
      <citerefentry><refentrytitle>password-agent</refentrytitle
409
 
      ><manvolnum>8mandos</manvolnum></citerefentry> program, which
410
 
      is run instead of <citerefentry><refentrytitle
411
 
      >plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum
412
 
      ></citerefentry> when <citerefentry><refentrytitle
413
 
      >systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
414
 
      is used during system startup.
415
 
    </para>
416
 
  </refsect1>
 
385
  
417
386
  <refsect1 id="bugs">
418
387
    <title>BUGS</title>
419
388
    <xi:include href="bugs.xml"/>
434
403
      <manvolnum>8</manvolnum></citerefentry>,
435
404
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
436
405
      <manvolnum>8mandos</manvolnum></citerefentry>,
437
 
      <citerefentry><refentrytitle>password-agent</refentrytitle>
438
 
      <manvolnum>8mandos</manvolnum></citerefentry>,
439
406
      <citerefentry><refentrytitle>mandos-client</refentrytitle>
440
407
      <manvolnum>8mandos</manvolnum></citerefentry>,
441
408
      <citerefentry><refentrytitle>password-prompt</refentrytitle>