]> eyrie.org Git - kerberos/wallet.git/blob - README.md
Fix Stanford policy for password default owner
[kerberos/wallet.git] / README.md
1 # wallet 1.4
2
3 [![Build
4 status](https://github.com/rra/wallet/workflows/build/badge.svg)](https://github.com/rra/wallet/actions)
5
6 Copyright 2014, 2016, 2018 Russ Allbery <eagle@eyrie.org>.  Copyright
7 2006-2010, 2012-2014 The Board of Trustees of the Leland Stanford Junior
8 University.  This software is distributed under a BSD-style license.
9 Please see the section [License](#license) below for more information.
10
11 ## Blurb
12
13 The wallet is a system for managing secure data, authorization rules to
14 retrieve or change that data, and audit rules for documenting actions
15 taken on that data.  Objects of various types may be stored in the wallet
16 or generated on request and retrieved by authorized users.  The wallet
17 tracks ACLs, metadata, and trace information.  It is built on top of the
18 remctl protocol and uses Kerberos GSS-API authentication.  One of the
19 object types it supports is Kerberos keytabs, making it suitable as a
20 user-accessible front-end to Kerberos kadmind with richer ACL and metadata
21 operations.
22
23 ## Description
24
25 The wallet is a client/server system using a central server with a
26 supporting database and a stand-alone client that can be widely
27 distributed to users.  The server runs on a secure host with access to a
28 local database; tracks object metadata such as ACLs, attributes, history,
29 expiration, and ownership; and has the necessary access privileges to
30 create wallet-managed objects in external systems (such as Kerberos
31 service principals).  The client uses the remctl protocol to send commands
32 to the server, store and retrieve objects, and query object metadata.  The
33 same client can be used for both regular user operations and wallet
34 administrative actions.
35
36 All wallet actions are controlled by a fine-grained set of ACLs.  Each
37 object has an owner ACL and optional get, store, show, destroy, and flags
38 ACLs that control more specific actions.  A global administrative ACL
39 controls access to administrative actions.  An ACL consists of zero or
40 more entries, each of which is a generic scheme and identifier pair,
41 allowing the ACL system to be extended to use any existing authorization
42 infrastructure.  Supported ACL types include Kerberos principal names,
43 regexes matching Kerberos principal names, and LDAP attribute checks.
44
45 Currently, the object types supported are simple files, passwords,
46 Kerberos keytabs, WebAuth keyrings, and Duo integrations.  By default,
47 whenever a Kerberos keytab object is retrieved from the wallet, the key is
48 changed in the Kerberos KDC and the wallet returns a keytab for the new
49 key.  However, a keytab object can also be configured to preserve the
50 existing keys when retrieved.  Included in the wallet distribution is a
51 script that can be run via remctl on an MIT Kerberos KDC to extract the
52 existing key for a principal, and the wallet system will use that
53 interface to retrieve the current key if the unchanging flag is set on a
54 Kerberos keytab object for MIT Kerberos.  (Heimdal doesn't require any
55 special support.)
56
57 ## Requirements
58
59 The wallet client requires the C
60 [remctl](https://www.eyrie.org/~eagle/software/remctl/) client library and
61 a Kerberos library.  It will build with either MIT Kerberos or Heimdal.
62
63 The wallet server is written in Perl and requires Perl 5.8.0 or later plus
64 the following Perl modules:
65
66 * Date::Parse (part of the TimeDate distribution)
67 * DBI
68 * DBIx::Class
69 * Module::Build
70 * SQL::Translator
71
72 You will also need a DBD Perl module for the database backend that you
73 intend to use, and the DateTime::Format::* module corresponding to that
74 DBD module (such as DateTime::Format::SQLite or DateTime::Format::PG).
75
76 Currently, the server has only been tested against SQLite 3, MySQL 5, and
77 PostgreSQL, and prebuilt SQL files (for database upgrades) are only
78 provided for those servers.  It will probably not work fully with other
79 database backends.  Porting is welcome.
80
81 The wallet server is intended to be run under `remctld` and use `remctld`
82 to do authentication.  It can be ported to any other front-end, but doing
83 so will require writing a new version of `server/wallet-backend` that
84 translates the actions in that protocol into calls to the Wallet::Server
85 Perl object.
86
87 The keytab support in the wallet server supports Heimdal and MIT Kerberos
88 KDCs and has experimental support for Active Directory.  The Heimdal
89 support requires the Heimdal::Kadm5 Perl module.  The MIT Kerberos support
90 requires the MIT Kerberos `kadmin` client program be installed.  The
91 Active Directory support requires the Net::LDAP, Authen::SASL, and
92 IPC::Run Perl modules and the `msktutil` client program.
93
94 To support the unchanging flag on keytab objects with an MIT Kerberos KDC,
95 the Net::Remctl Perl module (shipped with remctl) must be installed on the
96 server and the `keytab-backend` script must be runnable via remctl on the
97 KDC.  This script also requires an MIT Kerberos `kadmin.local` binary that
98 supports the `-norandkey` option to `ktadd`.  This option is included in
99 MIT Kerberos 1.7 and later.
100
101 The WebAuth keyring object support in the wallet server requires the
102 WebAuth Perl module from [WebAuth 4.4.0 or
103 later](https://www.eyrie.org/~eagle/software/webauth/).
104
105 The Duo integration object support in the wallet server requires the
106 [Net::Duo](https://www.eyrie.org/~eagle/software/net-duo/), JSON, and
107 Perl6::Slurp Perl modules.
108
109 The password object support in the wallet server requires the
110 Crypt::GeneratePassword Perl module.
111
112 The LDAP attribute ACL verifier requires the Authen::SASL and Net::LDAP
113 Perl modules.  This verifier only works with LDAP servers that support
114 GSS-API binds.
115
116 The NetDB ACL verifier (only of interest at sites using NetDB to manage
117 DNS) requires the Net::Remctl Perl module.
118
119 To bootstrap from a Git checkout, or if you change the Automake files and
120 need to regenerate Makefile.in, you will need Automake 1.11 or later.  For
121 bootstrap or if you change configure.ac or any of the m4 files it includes
122 and need to regenerate configure or config.h.in, you will need Autoconf
123 2.64 or later.  Perl is also required to generate manual pages from a
124 fresh Git checkout.
125
126 ## Building and Installation
127
128 You can build and install wallet with the standard commands:
129
130 ```
131     ./configure
132     make
133     make install
134 ```
135
136 If you are building from a Git clone, first run `./bootstrap` in the
137 source directory to generate the build files.  `make install` will
138 probably have to be done as root.  Building outside of the source
139 directory is also supported, if you wish, by creating an empty directory
140 and then running configure with the correct relative path.
141
142 If you are upgrading the wallet server from an earlier installed version,
143 run `wallet-admin upgrade` after installation to upgrade the database
144 schema.  See the wallet-admin manual page for more information.
145
146 You can pass the `--with-wallet-server` and `--with-wallet-port` options
147 to configure to compile in a default wallet server and port.  If no port
148 is set, the remctl default port is used.  If no server is set, the server
149 must be specified either in `krb5.conf` configuration or on the wallet
150 command line or the client will exit with an error.
151
152 By default, wallet uses whatever Perl executable exists in the current
153 `PATH`.  That Perl's path is what the server scripts will use, and that
154 Perl's configuration will be used to determine where the server Perl
155 modules will be installed.
156
157 To specify a particular Perl executable to use, either set the `PERL`
158 environment variable or pass it to configure like:
159
160 ```
161     ./configure PERL=/path/to/my/perl
162 ```
163
164 By default, wallet installs itself under `/usr/local` except for the
165 server Perl modules, which are installed into whatever default site module
166 path is used by your Perl installation.  To change the installation
167 location of the files other than the Perl modules, pass the `--prefix=DIR`
168 argument to configure.
169
170 If remctl was installed in a path not normally searched by your compiler,
171 you must specify its installation prefix to configure with the
172 `--with-remctl=DIR` option, or alternately set the path to the include
173 files and libraries separately with `--with-remctl-include=DIR` and
174 `--with-remctl-lib=DIR`.
175
176 Normally, configure will use `krb5-config` to determine the flags to use
177 to compile with your Kerberos libraries.  To specify a particular
178 `krb5-config` script to use, either set the `PATH_KRB5_CONFIG` environment
179 variable or pass it to configure like:
180
181 ```
182     ./configure PATH_KRB5_CONFIG=/path/to/krb5-config
183 ```
184
185 If `krb5-config` isn't found, configure will look for the standard
186 Kerberos libraries in locations already searched by your compiler.  If the
187 the `krb5-config` script first in your path is not the one corresponding
188 to the Kerberos libraries you want to use, or if your Kerberos libraries
189 and includes aren't in a location searched by default by your compiler,
190 you need to specify a different Kerberos installation root via
191 `--with-krb5=PATH`.  For example:
192
193 ```
194     ./configure --with-krb5=/usr/pubsw
195 ```
196
197 You can also individually set the paths to the include directory and the
198 library directory with `--with-krb5-include` and `--with-krb5-lib`.  You
199 may need to do this if Autoconf can't figure out whether to use lib,
200 lib32, or lib64 on your platform.
201
202 To not use krb5-config and force library probing even if there is a
203 krb5-config script on your path, set PATH_KRB5_CONFIG to a nonexistent
204 path:
205
206 ```
207     ./configure PATH_KRB5_CONFIG=/nonexistent
208 ```
209
210 `krb5-config` is not used and library probing is always done if either
211 `--with-krb5-include` or `--with-krb5-lib` are given.
212
213 Pass `--enable-silent-rules` to configure for a quieter build (similar to
214 the Linux kernel).  Use `make warnings` instead of `make` to build with
215 full GCC compiler warnings (requires either GCC or Clang and may require a
216 relatively current version of the compiler).
217
218 You can pass the `--enable-reduced-depends` flag to configure to try to
219 minimize the shared library dependencies encoded in the binaries.  This
220 omits from the link line all the libraries included solely because other
221 libraries depend on them and instead links the programs only against
222 libraries whose APIs are called directly.  This will only work with shared
223 libraries and will only work on platforms where shared libraries properly
224 encode their own dependencies (this includes most modern platforms such as
225 all Linux).  It is intended primarily for building packages for Linux
226 distributions to avoid encoding unnecessary shared library dependencies
227 that make shared library migrations more difficult.  If none of the above
228 made any sense to you, don't bother with this flag.
229
230 ## Testing
231
232 The wallet comes with a comprehensive test suite, but it requires some
233 configuration in order to test anything other than low-level utility
234 functions.  To enable the full test suite, follow the instructions in:
235
236 * `tests/config/README`
237 * `perl/t/data/README`
238
239 Now, you can run the test suite with:
240
241 ```
242     make check
243 ```
244
245 If a test fails, you can run a single test with verbose output via:
246
247 ```
248     tests/runtests -o <name-of-test>
249 ```
250
251 Do this instead of running the test program directly since it will ensure
252 that necessary environment variables are set up.
253
254 The test suite requires `remctld` be installed and available in the user's
255 path or in `/usr/local/sbin` or `/usr/sbin`; and that `sqlite3`, `kinit`,
256 and either `kvno` or `kgetcred` be installed and available on the user's
257 path.  The test suite will also need to be able to bind to 127.0.0.1 on
258 ports 11119 and 14373 to test client/server network interactions.
259
260 The test suite uses a SQLite database for server-side and end-to-end
261 testing and therefore requires the DBD::SQLite and
262 DateTime::Format::SQLite Perl modules.
263
264 All of the requirements listed above will be required to run the full test
265 suite of server functionality, but tests will be selectively skipped if
266 their requirements aren't found.
267
268 The following additional Perl modules will be used if present:
269
270 * Test::MinimumVersion
271 * Test::Pod
272 * Test::Spelling
273 * Test::Strict
274
275 All are available on CPAN.  Those tests will be skipped if the modules are
276 not available.
277
278 To enable tests that don't detect functionality problems but are used to
279 sanity-check the release, set the environment variable `RELEASE_TESTING`
280 to a true value.  To enable tests that may be sensitive to the local
281 environment or that produce a lot of false positives without uncovering
282 many problems, set the environment variable `AUTHOR_TESTING` to a true
283 value.
284
285 ## Configuration
286
287 Before setting up the wallet server, review the Wallet::Config
288 documentation (with man Wallet::Config or perldoc Wallet::Config).  There
289 are many customization options, some of which must be set.  You may also
290 need to create a Kerberos keytab for the keytab object backend and give it
291 appropriate ACLs, and set up `keytab-backend` and its `remctld`
292 configuration on your KDC if you want unchanging flag support.
293
294 For the basic setup and configuration of the wallet server, see the file
295 `docs/setup` in the source distribution.  You will need to set up a
296 database on the server (unless you're using SQLite), initialize the
297 database, install `remctld` and the wallet Perl modules, and set up
298 `remctld` to run the `wallet-backend` program.
299
300 The wallet client supports reading configuration settings from the system
301 `krb5.conf` file.  For more information, see the CONFIGURATION section of
302 the wallet client man page (`man wallet`).
303
304 ## Support
305
306 The [wallet web page](https://www.eyrie.org/~eagle/software/wallet/) will
307 always have the current version of this package, the current
308 documentation, and pointers to any additional resources.
309
310 New wallet releases are announced on the kerberos mailing list.  To
311 subscribe or see the list archives, go to the [kerberos list information
312 page](https://mailman.mit.edu/mailman/listinfo/kerberos).
313
314 For bug tracking, use the [issue tracker on
315 GitHub](https://github.com/rra/wallet/issues).  However, please be aware
316 that I tend to be extremely busy and work projects often take priority.
317 I'll save your report and get to it as soon as I can, but it may take me a
318 couple of months.
319
320 ## Source Repository
321
322 wallet is maintained using Git.  You can access the current source on
323 [GitHub](https://github.com/rra/wallet) or by cloning the repository at:
324
325 https://git.eyrie.org/git/kerberos/wallet.git
326
327 or [view the repository on the
328 web](https://git.eyrie.org/?p=kerberos/wallet.git).
329
330 The eyrie.org repository is the canonical one, maintained by the author,
331 but using GitHub is probably more convenient for most purposes.  Pull
332 requests are gratefully reviewed and normally accepted.
333
334 ## License
335
336 The wallet package as a whole is covered by the following copyright
337 statement and license:
338
339 > Copyright 2014, 2016, 2018
340 >     Russ Allbery <eagle@eyrie.org>
341 >
342 > Copyright 2006-2010, 2012-2014
343 >     The Board of Trustees of the Leland Stanford Junior University
344 >
345 > Permission is hereby granted, free of charge, to any person obtaining a
346 > copy of this software and associated documentation files (the "Software"),
347 > to deal in the Software without restriction, including without limitation
348 > the rights to use, copy, modify, merge, publish, distribute, sublicense,
349 > and/or sell copies of the Software, and to permit persons to whom the
350 > Software is furnished to do so, subject to the following conditions:
351 >
352 > The above copyright notice and this permission notice shall be included in
353 > all copies or substantial portions of the Software.
354 >
355 > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
356 > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
357 > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
358 > THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
359 > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
360 > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
361 > DEALINGS IN THE SOFTWARE.
362
363 Some files in this distribution are individually released under different
364 licenses, all of which are compatible with the above general package
365 license but which may require preservation of additional notices.  All
366 required notices, and detailed information about the licensing of each
367 file, are recorded in the LICENSE file.
368
369 Files covered by a license with an assigned SPDX License Identifier
370 include SPDX-License-Identifier tags to enable automated processing of
371 license information.  See https://spdx.org/licenses/ for more information.
372
373 For any copyright range specified by files in this package as YYYY-ZZZZ,
374 the range specifies every single year in that closed interval.