Commit Graph

633 Commits

Author SHA1 Message Date
Nicolas Williams
6a7e7eace6 Add kx509 client and revamp kx509 service
This commit adds support for kx509 in libkrb5, and revamps the KDC's
kx509 service (fixing bugs, adding features).

Of note is that kx509 is attempted optimistically by the client, with
the certificate and private key stored in the ccache, and optionally in
an external PEM or DER file.

NOTE: We do not optimistically use kx509 in krb5_cc_store_cred() if the
      ccache is a MEMORY ccache so we don't generate a key when
      accepting a GSS context with a delegated credential.

kx509 protocol issues to be fixed in an upcoming commit:

 - no proof of possession (this is mostly not too bad, but we'll want to
   fix it by using CSRs)
 - no algorithm agility (only plain RSA is supported)
 - very limited (no way to request any options in regards to the
   requested cert)
 - error codes are not very useful

Things we're adding in this commit:

 - libkrb5 kx509 client
 - automatic kx509 usage hooked in via krb5_cc_store_cred() of start TGT
 - per-realm templates on the KDC side
 - per-realm issuer certificates
 - send error messages on the KDC side
   (this is essential to avoid client-side timeouts on error)
 - authenticate as many error messages
 - add a protocol probe feature so we can avoid generating a
   keypair if the service is not enabled
   (once we add support for ECC algorithms we won't need this
    anymore; the issue is that RSA keygen is slow)
 - support for different types of client principals, not just username:

    - host-based service and domain-based service, each with its own
      template set per-{realm, service} or per-service

   (the idea is to support issuance of server certificates too, not
    just client/user certs)
 - more complete support for SAN types
 - tests (including that PKINIT->kx509->PKINIT works, which makes it
   possible to have "delegation" of PKIX credentials by just delegating
   Kerberos credentials)
 - document the protocol in lib/krb5/kx509.c

Future work:

 - add option for longer-ticket-lifetime service certs
 - add support for ECDSA, and some day for ed25519 and ed448
 - reuse private key when running kinit
   (this will require rethinking how we trigger optimistic kx509
    usage)
 - HDB lookup for:
    - optional revocation check (not strictly necessary)
    - adding to certificates those SANs listed in HDB
       - hostname aliases (dNSName SANs)
       - rfc822Name (email)
       - XMPP SANs
       - id-pkinit-san (a user could have aliases too)
 - support username wild-card A RRs, ala OSKT/krb5_admin
    i.e., if a host/f.q.d.n principal asks for a certificate for
    some service at some-label.f.q.d.n, then issue it
   (this is not needed at OSKT sites because OSKT already
    supports keying such service principals, which means kx509
    will issue certificates for them, however, it would be nice
    to be able to have this independent of OSKT)
   (a better way to do this would be to integrate more of OSKT
    into Heimdal proper)
 - a kx509 command, or heimtools kx509 subcommand for explicitly
   attempting use of the kx509 protocol (as opposed to implicit, as is
   done in kinit via krb5_cc_store_cred() magic right now)

Issues:

 - optimistically trying kx509 on start realm TGT store -> timeout issues!
    - newer KDCs will return errors because of this commit; older ones
      will not, which causes timouts
    - need a separate timeout setting for kx509 for optimistic case
    - need a [realm] config item and DNS SRV RR lookup for whether a
      realm is expected to support kx509 service
2019-10-08 21:26:50 -05:00
Luke Howard
c6bf100b43 kadm5: move password quality checks out of daemons and into libkadm5
Note that this has a slight behavior change to c89d3f3b in order to continue
allow kadmin in local mode to bypass password quality checks. Password quality
checks are always bypassed if the *client* kadmin principal is kadmin/admin,
i.e. that of the kadmin service itself. This is the case when running kadmin in
local mode. As this is the equivalent of a superuser account, one would
anticipate that deployments would use specific administrator instances for
appropriate ACLs for day-to-day administration; operations by these will be
subject to password quality checks if enforce_on_admin_set is TRUE, or if the
user is changing their own password.
2018-12-26 11:04:05 -06:00
Luke Howard
c89d3f3b8c kadmin: allow enforcing password quality on admin password change
This patch adds the "enforce_on_admin_set" configuration knob in the
[password_quality] section. When this is enabled, administrative password
changes via the kadmin or kpasswd protocols will be subject to password quality
checks. (An administrative password change is one where the authenticating
principal is different to the principal whose password is being changed.)

Note that kadmin running in local mode (-l) is unaffected by this patch.
2018-12-26 15:38:48 +11:00
Matt Selsky
a2822719e6 Fix typos in setup documentation 2018-04-19 15:54:31 -04:00
Viktor Dukhovni
7c18507ccd Avoid make dist fail when doxyout/ does not exist 2017-03-17 12:47:39 -04:00
Nicolas Williams
fe43be8558 Add include/includedir directives for krb5.conf 2017-02-27 18:15:59 -06:00
Nicolas Williams
3e65dfbc32 Fix make dist missing files (#228) 2016-12-15 12:15:56 -06:00
Viktor Dukhovni
3657f23a9e Fix more doxygen bitrot 2016-12-15 04:28:21 -05:00
Nicolas Williams
2cc59accca Lame patch: expect dot and msgen in /usr/bin 2016-12-14 22:05:59 -06:00
Nicolas Williams
171377acd8 Fix lib/base doxygen control 2016-12-14 22:05:58 -06:00
Nicolas Williams
7aabd73f18 Remove doc/manpage noise files 2016-12-14 22:05:58 -06:00
Nicolas Williams
fa2afcc5fc Add #ifndef DOXY guard to generated headers
cf/make-proto.pl copies Doxygen docs to -private and -protos headers.
We need to either extract these from those files but not source files,
or only from source files but not the generated headers.  This commit
does the latter.
2016-12-14 22:05:58 -06:00
Nicolas Williams
5c2a3cb25a Always build hcrypto 2016-04-15 00:16:16 -05:00
Nicolas Williams
a388514712 Windows: fix two-phase commit docs 2016-02-26 12:08:05 -06:00
Nicolas Williams
7eb9b46f5b Document HDB backends 2016-02-26 00:55:33 -06:00
Nicolas Williams
a5f13331af Appveyor: workaround perl texinfo 2016-01-21 12:43:31 -06:00
Love Hörnquist Åstrand
3544bbc0b3 Update ack.texi 2015-10-06 17:26:27 +02:00
Love Hörnquist Åstrand
434020567a Update copyright.texi
Add Timothy
2015-09-28 10:52:47 +02:00
Love Hörnquist Åstrand
7c86e09dd8 Update ack.texi
Add Timothy
2015-09-28 10:50:38 +02:00
Stefan Metzmacher
20da6cad02 doc/standardisation: add rfc6806.txt
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-07-31 17:30:23 +12:00
Luke Howard
5023f55208 Add Windows CNG (BCrypt) support to HCrypto EVP API 2015-02-11 16:00:32 +11:00
Jelmer Vernooij
70e43e9808 Fix some typos. 2014-04-25 02:42:17 +02:00
Ken Dreyer
115f88a3e7 more texinfo 5.1 hacks
For hx509.texi, we need the copyright macros for both html and info.
Just remove the "ifhtml" conditionals.

For whatis.texi, texinfo 5.1 inserts the sub{} macro inline with no
newlines, so there are errors about @html not being at the end of a
line, etc.
2013-08-08 21:27:16 -06:00
Daniel Schepler
a1d7f1f3e3 fix for texinfo 5.1
Signed-off-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2013-08-08 21:27:13 -06:00
Harald Barth
7b4b415fa0 spell-and-gram-proxy-certs
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2013-04-26 00:06:07 -07:00
Landon Fuller
6fb9bc86b7 Add a configuration option to enable LDAP Start TLS.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2013-04-24 16:21:15 -07:00
Landon Fuller
64341e9ec6 Document the new hdb-ldap* configuration options.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2013-04-24 16:21:15 -07:00
Love Hornquist Astrand
1846c7a35d make @iftex case work in texinfo-5.1 2013-04-08 10:15:36 -07:00
Eray Aslan
0e0351776a @end should only appear at a line beginning
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2013-04-08 10:15:36 -07:00
Nicolas Williams
54fdd62c2b Update MIT<->Heimdal migration documentation 2012-05-03 14:24:18 -05:00
Love Hörnquist Åstrand
bf37778dbd make ipropd_slave tell its status in a status file
The ipropd_slave will log its status to /var/heimdal/ipropd-slave-status
if its connecting, up to date, or disconnected.

The master will now also confirm to slaves that are are in fact up to date
if they just restart, before there was no confirmation, the slave just didn't
get any deltas.
2012-02-15 20:59:54 -08:00
Nicolas Williams
f4ba41ebdd Pluggable libheimbase interface for DBs and misc libheimbase enhancements
[Code reviewed by Love Hörnquist Åstrand <lha@kth.se>]

    Added heim_db_*() entry points for dealing with databases, and
    make krb5_aname_to_localname() use it.

    The following enhancements to libheimbase are included:

     - Add heim_data_t and heim_string_t "reference" variants to
       avoid memory copies of potentially large data/strings.

       See heim_data_ref_create() and heim_string_ref_create().

     - Added enhancements to heim_array_t to allow their use for
       queues and stacks, and to improve performance.  See
       heim_array_insert_value().

     - Added XPath-like accessors for heim_object_t.  See
       heim_path_get(), heim_path_copy(), heim_path_create(), and
       heim_path_delete().  These are used extensively in the DB
       framework's generic composition of ACID support and in the
       test_base program

     - Made libheimbase more consistent with Core Foundation naming
       conventions.  See heim_{dict, array}_{get, copy}_value() and
       heim_path_{get, copy}().

     - Added functionality to and fixed bugs in base/json.c:
        - heim_serialize();
        - depth limit for JSON parsing (for DoS protection);
        - pretty-printing;
        - JSON compliance (see below);
        - flag options for parsing and serializing; these are needed
          because of impedance mismatches between heim_object_t and
          JSON (e.g., heim_dict_t allows non-string keys, but JSON
          does not; heimbase supports binary data, while JSON does
          not).

     - Added heim_error_enomem().

     - Enhanced the test_base program to test new functionality and
       to use heim_path*() to better test JSON encoding.  This
       includes some fuzz testing of JSON parsing, and running the
       test under valgrind.

     - Started to add doxygen documentation for libheimbase (but doc
       build for libheimbase is still incomplete).

    Note that there's still some incomplete JSON support:

     - JSON string quoting is not fully implemented;

     - libheimbase lacks support for real numbers, while JSON has
       it -- otherwise libheimbase is a superset of JSON,
       specifically in that any heim_object_t can be a key for an
       associative array.

    The following DB backends are supported natively:

     - "sorted-text", a binary search of sorted (in C locale), flat
       text files;

     - "json", a backend that stores DB contents serialized as JSON
       (this is intended for configuration-like contents).

    The DB framework supports:

     - multiple key/value tables per-DB
     - ACID transactions

    The DB framework also natively implements ACID transactions for
    any DB backends that a) do not provide transactions natively, b)
    do provide lock/unlock/sync methods (even on Windows).  This
    includes autocommit of DB updates outside transactions.

    Future DB enhancements may include:

     - add backends for various DB types (BDB, CDB, MDB, ...);

     - make libhdb use heim_db_t;

     - add a command-line tool for interfacing to databases via
       libheimbase (e.g., to get/set/delete values, create/copy/
       backup DBs, inspect history, check integrity);

     - framework-level transaction logging (with redo and undo
       logging), for generic incremental replication;

     - framework-level DB integrity checking.

       We could store a MAC of the XOR of a hash function applied to
       {key, value} for every entry in the DB, then use this to check
       DB integrity incrementally during incremental replication, as
       well as for the whole DB.
2012-02-05 16:26:32 -06:00
Patrik Lundin
10bca3892d Add missing "Debugging Kerberos problems" to menu.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-01-15 21:56:37 +01:00
Love Hörnquist Åstrand
c8f1a6f0a0 don't install hcrypto unless we build them 2011-10-30 19:51:59 -07:00
Love Hörnquist Åstrand
1a1bd736c0 merge support for FAST in as-req codepath 2011-10-28 19:25:48 -07:00
Love Hornquist Astrand
587cf45846 add @anchor 2011-10-20 22:09:40 +02:00
Love Hornquist Astrand
f7efe9516f more references 2011-10-14 14:58:29 +02:00
Love Hornquist Astrand
7b77de50a0 kadmin modify --pkinit-acl example 2011-10-14 14:53:50 +02:00
Love Hornquist Astrand
28563373a8 more documentation about pkinit 2011-10-14 14:49:00 +02:00
Love Hornquist Astrand
d6474982e5 document kdc options 2011-10-12 15:37:24 +02:00
Love Hornquist Astrand
c2be6a8580 we have @subsection Configure the KDC, let remove the XXX 2011-10-12 15:29:59 +02:00
Love Hornquist Astrand
f574312ce1 remove kaserver ref 2011-10-12 12:41:00 +02:00
Love Hornquist Astrand
a061e7b22f remove kaserver ref 2011-10-12 12:40:59 +02:00
Love Hornquist Astrand
8192b9ed35 remove refernces to kerberos 4 and kaserver 2011-10-12 12:40:59 +02:00
Love Hornquist Astrand
8aceafc430 moved to lib/gssapi/oid.txt 2011-10-11 20:28:29 +02:00
Love Hornquist Astrand
b76f6f1e93 add more people 2011-09-29 13:58:23 +02:00
Love Hornquist Astrand
0595af118e document KRB5_CONFIG 2011-09-26 14:59:30 +02:00
Love Hornquist Astrand
ca060554fb x 2011-07-24 20:24:36 -07:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Love Hornquist Astrand
cb7cbbb906 add more people that have contributed 2011-05-21 12:23:47 -07:00