/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 plugins.d/plymouth.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:
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 "plymouth">
5
 
<!ENTITY TIMESTAMP "2019-07-27">
 
5
<!ENTITY TIMESTAMP "2018-02-08">
6
6
<!ENTITY % common SYSTEM "../common.ent">
7
7
%common;
8
8
]>
40
40
      <year>2016</year>
41
41
      <year>2017</year>
42
42
      <year>2018</year>
43
 
      <year>2019</year>
44
43
      <holder>Teddy Hogeborn</holder>
45
44
      <holder>Björn Påhlsson</holder>
46
45
    </copyright>
61
60
  <refsynopsisdiv>
62
61
    <cmdsynopsis>
63
62
      <command>&COMMANDNAME;</command>
64
 
      <arg choice="opt">
65
 
        <option>--prompt <replaceable>PROMPT</replaceable></option>
66
 
      </arg>
67
 
      <arg><option>--debug</option></arg>
68
 
    </cmdsynopsis>
69
 
    <cmdsynopsis>
70
 
      <command>&COMMANDNAME;</command>
71
 
      <group choice="req">
72
 
        <arg choice="plain"><option>--help</option></arg>
73
 
        <arg choice="plain"><option>-?</option></arg>
74
 
      </group>
75
 
    </cmdsynopsis>
76
 
    <cmdsynopsis>
77
 
      <command>&COMMANDNAME;</command>
78
 
      <arg choice="plain"><option>--usage</option></arg>
79
 
    </cmdsynopsis>
80
 
    <cmdsynopsis>
81
 
      <command>&COMMANDNAME;</command>
82
 
      <group choice="req">
83
 
        <arg choice="plain"><option>--version</option></arg>
84
 
        <arg choice="plain"><option>-V</option></arg>
85
 
      </group>
86
63
    </cmdsynopsis>
87
64
  </refsynopsisdiv>
88
65
  
124
101
  <refsect1 id="options">
125
102
    <title>OPTIONS</title>
126
103
    <para>
127
 
      This program is commonly not invoked from the command line; it
128
 
      is normally started by the <application>Mandos</application>
129
 
      plugin runner, see <citerefentry><refentrytitle
130
 
      >plugin-runner</refentrytitle><manvolnum>8mandos</manvolnum>
131
 
      </citerefentry>.  Any command line options this program accepts
132
 
      are therefore normally provided by the plugin runner, and not
133
 
      directly.
 
104
      This program takes no options.
134
105
    </para>
135
 
    
136
 
    <variablelist>
137
 
      <varlistentry>
138
 
        <term><option>--prompt=<replaceable
139
 
        >PROMPT</replaceable></option></term>
140
 
        <listitem>
141
 
          <para>
142
 
            The password prompt.  Note that using this option will
143
 
            make this program ignore the <envar>cryptsource</envar>
144
 
            and <envar>crypttarget</envar> environment variables.
145
 
          </para>
146
 
        </listitem>
147
 
      </varlistentry>
148
 
      
149
 
      <varlistentry>
150
 
        <term><option>--debug</option></term>
151
 
        <listitem>
152
 
          <para>
153
 
            Enable debug mode.  This will enable a lot of output to
154
 
            standard error about what the program is doing.  The
155
 
            program will still perform all other functions normally.
156
 
          </para>
157
 
        </listitem>
158
 
      </varlistentry>
159
 
      
160
 
      <varlistentry>
161
 
        <term><option>--help</option></term>
162
 
        <term><option>-?</option></term>
163
 
        <listitem>
164
 
          <para>
165
 
            Gives a help message about options and their meanings.
166
 
          </para>
167
 
        </listitem>
168
 
      </varlistentry>
169
 
      
170
 
      <varlistentry>
171
 
        <term><option>--usage</option></term>
172
 
        <listitem>
173
 
          <para>
174
 
            Gives a short usage message.
175
 
          </para>
176
 
        </listitem>
177
 
      </varlistentry>
178
 
      
179
 
      <varlistentry>
180
 
        <term><option>--version</option></term>
181
 
        <term><option>-V</option></term>
182
 
        <listitem>
183
 
          <para>
184
 
            Prints the program version.
185
 
          </para>
186
 
        </listitem>
187
 
      </varlistentry>
188
 
    </variablelist>
189
106
  </refsect1>
190
107
  
191
108
  <refsect1 id="exit_status">
207
124
        <term><envar>crypttarget</envar></term>
208
125
        <listitem>
209
126
          <para>
210
 
            If set, and if the <option>--prompt</option> option is not
211
 
            used, these environment variables will be assumed to
 
127
            If set, these environment variables will be assumed to
212
128
            contain the source device name and the target device
213
129
            mapper name, respectively, and will be shown as part of
214
130
            the prompt.
216
132
        <para>
217
133
          These variables will normally be inherited from
218
134
          <citerefentry><refentrytitle>plugin-runner</refentrytitle>
219
 
          <manvolnum>8mandos</manvolnum></citerefentry>, which might
220
 
          have in turn inherited them from its calling process.
 
135
          <manvolnum>8mandos</manvolnum></citerefentry>, which will
 
136
          normally have inherited them from
 
137
          <filename>/scripts/local-top/cryptroot</filename> in the
 
138
          initial <acronym>RAM</acronym> disk environment, which will
 
139
          have set them from parsing kernel arguments and
 
140
          <filename>/conf/conf.d/cryptroot</filename> (also in the
 
141
          initial RAM disk environment), which in turn will have been
 
142
          created when the initial RAM disk image was created by
 
143
          <filename
 
144
          >/usr/share/initramfs-tools/hooks/cryptroot</filename>, by
 
145
          extracting the information of the root file system from
 
146
          <filename >/etc/crypttab</filename>.
221
147
        </para>
222
148
        <para>
223
149
          This behavior is meant to exactly mirror the behavior of
224
 
          <command>askpass</command>, the default password prompter
225
 
          from initramfs-tools.
 
150
          <command>askpass</command>, the default password prompter.
226
151
        </para>
227
152
        </listitem>
228
153
      </varlistentry>
295
220
    </para>
296
221
    <informalexample>
297
222
      <para>
298
 
        Normal invocation needs no options:
 
223
        This program takes no options.
299
224
      </para>
300
225
      <para>
301
226
        <userinput>&COMMANDNAME;</userinput>
302
227
      </para>
303
228
    </informalexample>
304
 
    <informalexample>
305
 
      <para>
306
 
        Show a different prompt.
307
 
      </para>
308
 
      <para>
309
 
        <userinput>&COMMANDNAME; --prompt=Password</userinput>
310
 
      </para>
311
 
    </informalexample>
312
229
  </refsect1>
313
230
  
314
231
  <refsect1 id="security">
354
271
    <para>
355
272
      <citerefentry><refentrytitle>intro</refentrytitle>
356
273
      <manvolnum>8mandos</manvolnum></citerefentry>,
 
274
      <citerefentry><refentrytitle>crypttab</refentrytitle>
 
275
      <manvolnum>5</manvolnum></citerefentry>,
357
276
      <citerefentry><refentrytitle>plugin-runner</refentrytitle>
358
277
      <manvolnum>8mandos</manvolnum></citerefentry>,
359
278
      <citerefentry><refentrytitle>proc</refentrytitle>