README 17.5 KB
Newer Older
Russ Allbery's avatar
Russ Allbery committed
1
                            wallet release 1.2
2
3
                     (secure data management system)

4
                Written by Russ Allbery <eagle@eyrie.org>
5

6
7
8
9
  Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013, 2014 The Board of
  Trustees of the Leland Stanford Junior University.  This software is
  distributed under a BSD-style license.  Please see the section LICENSE
  below for more information.
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

BLURB

  The wallet is a system for managing secure data, authorization rules to
  retrieve or change that data, and audit rules for documenting actions
  taken on that data.  Objects of various types may be stored in the
  wallet or generated on request and retrieved by authorized users.  The
  wallet tracks ACLs, metadata, and trace information.  It is built on top
  of the remctl protocol and uses Kerberos GSS-API authentication.  One of
  the object types it supports is Kerberos keytabs, making it suitable as
  a user-accessible front-end to Kerberos kadmind with richer ACL and
  metadata operations.

DESCRIPTION

  The wallet is a client/server system using a central server with a
  supporting database and a stand-alone client that can be widely
  distributed to users.  The server runs on a secure host with access to a
  local database; tracks object metadata such as ACLs, attributes,
  history, expiration, and ownership; and has the necessary access
  privileges to create wallet-managed objects in external systems (such as
  Kerberos service principals).  The client uses the remctl protocol to
  send commands to the server, store and retrieve objects, and query
  object metadata.  The same client can be used for both regular user
  operations and wallet administrative actions.

  All wallet actions are controlled by a fine-grained set of ACLs.  Each
  object has an owner ACL and optional get, store, show, destroy, and
  flags ACLs that control more specific actions.  A global administrative
  ACL controls access to administrative actions.  An ACL consists of zero
  or more entries, each of which is a generic scheme and identifier pair,
  allowing the ACL system to be extended to use any existing authorization
42
43
  infrastructure.  Supported ACL types include Kerberos principal names,
  regexes matching Kerberos principal names, and LDAP attribute checks.
44

45
  Currently, the object types supported are simple files, Kerberos
46
47
48
49
50
51
52
53
54
55
  keytabs, WebAuth keyrings, and Duo integrations.  By default, whenever a
  Kerberos keytab object is retrieved from the wallet, the key is changed
  in the Kerberos KDC and the wallet returns a keytab for the new key.
  However, a keytab object can also be configured to preserve the existing
  keys when retrieved.  Included in the wallet distribution is a script
  that can be run via remctl on an MIT Kerberos KDC to extract the
  existing key for a principal, and the wallet system will use that
  interface to retrieve the current key if the unchanging flag is set on a
  Kerberos keytab object for MIT Kerberos.  (Heimdal doesn't require any
  special support.)
56
57
58
59
60
61
62
63
64

REQUIREMENTS

  The wallet client is written in C and builds against the C remctl
  libraries.  You will have to install the remctl client libraries in
  order to build it.  remctl can be obtained from:

      http://www.eyrie.org/~eagle/software/remctl/

65
  The wallet client will build with either MIT Kerberos or Heimdal.
66

67
68
69
70
  The wallet server is written in Perl and requires Perl 5.6.0 or later
  plus Module::Build to build.  It uses DBIx::Class and DBI to talk to a
  database, and therefore the DBIx::Class and DBI modules (and their
  dependencies) and a DBD module for the database it will use must be
71
72
73
74
  installed.  The Date::Parse (part of the TimeDate distribution) and
  DateTime modules are required for date handling, and the SQL::Translator
  Perl module is also required for schema deployment and database
  upgrades.  You will also need the DateTime::Format::* module
75
76
  corresponding to your DBD module (such as DateTime::Format::SQLite or
  DateTime::Format::PG).
77
78
79
80
81

  Currently, the server has only been tested against SQLite 3, MySQL 5,
  and PostgreSQL, and prebuilt SQL files (for database upgrades) are only
  provided for those servers.  It will probably not work fully with other
  database backends.  Porting is welcome.
82
83
84
85
86
87
88

  The wallet server is intended to be run under remctld and use remctld to
  do authentication.  It can be ported to any other front-end, but doing
  so will require writing a new version of server/wallet-backend that
  translates the actions in that protocol into calls to the Wallet::Server
  Perl object.

89
90
91
92
  The file object support in the wallet server requires the Digest::MD5
  Perl module, which comes with recent versions of Perl and is available
  on CPAN for older versions.

93
94
95
96
97
98
99
  The keytab support in the wallet server supports either Heimdal or MIT
  Kerberos KDCs.  The Heimdal support requires the Heimdal::Kadm5 Perl
  module.  The MIT Kerberos support requires the MIT Kerberos kadmin
  client program be installed.  In either case, wallet also requires that
  the wallet server have a keytab for a principal with appropriate access
  to create, modify, and delete principals from the KDC (as configured in
  kadm5.acl on an MIT Kerberos KDC).
100

101
102
103
104
105
106
  To support the unchanging flag on keytab objects with an MIT Kerberos
  KDC, the Net::Remctl Perl module (shipped with remctl) must be installed
  on the server and the keytab-backend script must be runnable via remctl
  on the KDC.  This script also requires an MIT Kerberos kadmin.local
  binary that supports the -norandkey option to ktadd.  This option is
  included in MIT Kerberos 1.7 and later.
107

108
109
110
  The WebAuth keyring object support in the wallet server requires the
  WebAuth Perl module from WebAuth 4.4.0 or later.

111
  The Duo integration object support in the wallet server requires the
112
  Net::Duo, JSON, and Perl6::Slurp Perl modules.
113

114
115
116
  The password object support in the wallet server requires the
  Crypt::GeneratePassword Perl module.

117
118
119
120
  To support the LDAP attribute ACL verifier, the Authen::SASL and
  Net::LDAP Perl modules must be installed on the server.  This verifier
  only works with LDAP servers that support GSS-API binds.

121
  To support the NetDB ACL verifier (only of interest at sites using NetDB
122
  to manage DNS), the Net::Remctl Perl module must be installed on the
123
124
  server.

125
  To run the full test suite, all of the above software requirements must
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
  be met.  The full test suite also requires that remctld be installed and
  available on the user's path or in /usr/local/sbin or /usr/sbin, that
  sqlite3 be installed and available on the user's path, that test cases
  can run services on and connect to port 14373 on 127.0.0.1, and that
  kinit and either kvno or kgetcred (which come with Kerberos) be
  installed and available on the user's path.  The full test suite also
  requires a local keytab and some additional configuration.

  The following additional Perl modules will be used if present:

      Test::MinimumVersion
      Test::Pod
      Test::Spelling
      Test::Strict

  All are available on CPAN.  Those tests will be skipped if the modules
  are not available.

  To enable tests that don't detect functionality problems but are used to
  sanity-check the release, set the environment variable RELEASE_TESTING
  to a true value.  To enable tests that may be sensitive to the local
  environment or that produce a lot of false positives without uncovering
  many problems, set the environment variable AUTHOR_TESTING to a true
  value.
150

151
152
153
154
155
  To bootstrap from a Git checkout, or if you change the Automake files
  and need to regenerate Makefile.in, you will need Automake 1.11 or
  later.  For bootstrap or if you change configure.ac or any of the m4
  files it includes and need to regenerate configure or config.h.in, you
  will need Autoconf 2.64 or later.
156
157
158
159
160

BUILD AND INSTALLATION

  You can build and install wallet with the standard commands:

161
      ./configure
162
163
164
      make
      make install

165
166
167
168
  If you are upgrading the wallet server from an earlier installed
  version, run wallet-admin upgrade after installation to upgrade the
  database schema.  See the wallet-admin manual page for more information.

169
170
171
172
  Pass --enable-silent-rules to configure for a quieter build (similar to
  the Linux kernel).  Use make warnings instead of make to build with full
  GCC compiler warnings (requires a relatively current version of GCC).

173
  The last step will probably have to be done as root.  Currently, this
174
175
176
177
178
179
180
  always installs both the client and the server.

  You can pass the --with-wallet-server and --with-wallet-port options to
  configure to compile in a default wallet server and port.  If no port is
  set, the remctl default port is used.  If no server is set, the server
  must be specified either in krb5.conf configuration or on the wallet
  command line or the client will exit with an error.
181
182
183
184
185
186
187
188
189

  By default, wallet installs itself under /usr/local except for the
  server Perl modules, which are installed into whatever default site
  module path is used by your Perl installation.  To change the
  installation location of the files other than the Perl modules, pass the
  --prefix=DIR argument to configure.  To change the Perl module
  installation location, you will need to run perl on Makefile.PL in the
  perl subdirectory of the build tree with appropriate options and rebuild
  the module after running make and before running make install.
190
191
192

  If remctl was installed in a path not normally searched by your
  compiler, you must specify its installation prefix to configure with the
193
194
195
  --with-remctl=DIR option, or alternately set the path to the include
  files and libraries separately with --with-remctl-include=DIR and
  --with-remctl-lib=DIR.
196
197
198
199
200
201
202
203

  Normally, configure will use krb5-config to determine the flags to use
  to compile with your Kerberos libraries.  If krb5-config isn't found, it
  will look for the standard Kerberos libraries in locations already
  searched by your compiler.  If the the krb5-config script first in your
  path is not the one corresponding to the Kerberos libraries you want to
  use or if your Kerberos libraries and includes aren't in a location
  searched by default by your compiler, you need to specify
204
  --with-krb5=PATH and --with-gssapi=PATH:
205

206
207
208
209
210
211
212
213
      ./configure --with-krb5=/usr/pubsw --with-gssapi=/usr/pubsw

  You can also individually set the paths to the include directory and the
  library directory with --with-krb5-include, --with-krb5-lib,
  --with-gssapi-include, and --with-gssapi-lib.  You may need to do this
  if Autoconf can't figure out whether to use lib, lib32, or lib64 on your
  platform.  Note that these settings aren't used if a krb5-config script
  is found.
214
215
216
217
218
219

  To specify a particular krb5-config script to use, either set the
  KRB5_CONFIG environment variable or pass it to configure like:

      ./configure KRB5_CONFIG=/path/to/krb5-config

220
221
222
223
224
  To not use krb5-config and force library probing even if there is a
  krb5-config script on your path, set KRB5_CONFIG to a nonexistent path:

      ./configure KRB5_CONFIG=/nonexistent

225
226
227
228
  You can build wallet in a different directory from the source if you
  wish.  To do this, create a new empty directory, cd to that directory,
  and then give the path to configure when running configure.  Everything
  else should work as above.
229

230
231
232
233
234
235
236
237
238
239
240
  You can pass the --enable-reduced-depends flag to configure to try to
  minimize the shared library dependencies encoded in the binaries.  This
  omits from the link line all the libraries included solely because the
  Kerberos libraries depend on them and instead links the programs only
  against libraries whose APIs are called directly.  This will only work
  with shared Kerberos libraries and will only work on platforms where
  shared libraries properly encode their own dependencies (such as Linux).
  It is intended primarily for building packages for Linux distributions
  to avoid encoding unnecessary shared library dependencies that make
  shared library migrations more difficult.  If none of the above made any
  sense to you, don't bother with this flag.
241
242
243
244
245
246
247
248
249
250
251
252

TESTING

  The wallet system comes with an extensive test suite which you can run
  with:

      make check

  In order to test the client in a meaningful way and test the keytab
  support in the server, however, you will need to do some preparatory
  work before running the test suite.  Review the files:

253
      tests/config/README
254
255
256
      perl/t/data/README

  and follow the instructions in those files to enable the full test
257
  suite.
258
259
260
261
262
263
264
265

  The test suite also requires some additional software be installed that
  isn't otherwise used by the wallet.  See REQUIREMENTS above for the full
  list of requirements for the test suite.  The test driver attempts to
  selectively skip those tests for which the necessary configuration is
  not available, but this has not yet been fully tested in all of its
  possible permutations.

266
267
268
269
270
271
  If a test fails, you can run a single test with verbose output via:

      tests/runtests -o <name-of-test>

  Do this instead of running the test program directly since it will
  ensure that necessary environment variables are set up.
272

Russ Allbery's avatar
Russ Allbery committed
273
274
275
276
277
278
279
280
281
CONFIGURATION

  For the basic setup and configuration of the wallet server, see the file
  docs/setup in the source distribution.  You will need to set up a
  database on the server (unless you're using SQLite), initialize the
  database, install remctld and the wallet Perl modules, and set up
  remctld to run the wallet-backend program.

  Before setting up the wallet server, review the Wallet::Config
282
  documentation (with man Wallet::Config or perldoc Wallet::Config).
Russ Allbery's avatar
Russ Allbery committed
283
284
  There are many customization options, some of which must be set.  You
  may also need to create a Kerberos keytab for the keytab object backend
285
286
  and give it appropriate ACLs, and set up keytab-backend and its remctld
  configuration on your KDC if you want unchanging flag support.
Russ Allbery's avatar
Russ Allbery committed
287

288
289
290
  The wallet client supports reading configuration settings from the
  system krb5.conf file.  For more information, see the CONFIGURATION
  section of the wallet client man page (man wallet).
Russ Allbery's avatar
Russ Allbery committed
291

292
293
294
295
296
297
298
299
300
301
302
303
304
SUPPORT

  The wallet web page at:

      http://www.eyrie.org/~eagle/software/wallet/

  will always have the current version of this package, the current
  documentation, and pointers to any additional resources.

  New releases of the wallet are announced on the kerberos@mit.edu mailing
  list and discussion of the wallet (particularly the keytab components)
  are welcome there.

305
  I welcome bug reports and patches for this package at eagle@eyrie.org.
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
  However, please be aware that I tend to be extremely busy and work
  projects often take priority.  I'll save your mail and get to it as soon
  as I can, but it may take me a couple of months.

SOURCE REPOSITORY

  The wallet is maintained using Git.  You can access the current source
  by cloning the repository at:

      git://git.eyrie.org/kerberos/wallet.git

  or view the repository on the web at:

      http://git.eyrie.org/?p=kerberos/wallet.git

  When contributing modifications, patches (possibly generated by
  git-format-patch) are preferred to Git pull requests.

324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
THANKS

  To Roland Schemers for the original idea that kicked off this project
  and for the original implementation of the leland_srvtab system, which
  was its primary inspiration.

  To Anton Ushakov for his prior work on Kerberos v5 synchronization and
  his enhancements to kasetkey to read a key from an existing srvtab.

  To Jeffrey Hutzelman for his review of the original wallet design and
  multiple useful discussions about what actions and configurations the
  wallet would need to support to be useful outside of Stanford.

  To Huaqing Zheng, Paul Pavelko, David Hoffman, and Paul Keser for their
  reviews of the wallet system design and comments on design decisions and
  security models.
340
341

  To Jon Robertson for the refactoring of Wallet::Kadmin, Heimdal support,
342
343
  many of the wallet server-side reports, and the initial wallet-rekey
  implementation.
344
345
346
347
348
349

LICENSE

  The wallet distribution as a whole is covered by the following copyright
  statement and license:

350
    Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013, 2014
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
        The Board of Trustees of the Leland Stanford Junior University

    Permission is hereby granted, free of charge, to any person obtaining
    a copy of this software and associated documentation files (the
    "Software"), to deal in the Software without restriction, including
    without limitation the rights to use, copy, modify, merge, publish,
    distribute, sublicense, and/or sell copies of the Software, and to
    permit persons to whom the Software is furnished to do so, subject to
    the following conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  All individual files without an explicit exception below are released
  under this license.  Some files may have additional copyright holders as
  noted in those files.  There is detailed information about the licensing
  of each file in the LICENSE file in this distribution.

  Some files in this distribution are individually released under
  different licenses, all of which are compatible with the above general
  package license but which may require preservation of additional
  notices.  All required notices are preserved in the LICENSE file.