Commit Graph

84 Commits

Author SHA1 Message Date
Nicolas Williams
6633f6e525 bx509d: Implement /get-tgt end-point 2021-04-06 17:19:48 -05:00
Nicolas Williams
0205237a6e kdc: Add missing dep for tests/kdc/check-pkinit.in 2021-03-26 23:37:52 -05:00
Nicolas Williams
8e7c7209e8 kdc: Add param to derive max_life from client cert
This adds a KDC configuration parameter that can be used to indicate
that a PKINIT client's certificate's notAfter overrides the client
principal's HDB entry's max_life.  This parameter is a relative time
parameter, and it enables this only if set to a non-zero value (defaults
to zero).  The value of this parameter caps the max_life inferred from
the certificate.
2021-03-23 16:44:50 -05:00
Nicolas Williams
0e09fa7fde iprop: Support hierarchical iprop 2020-09-18 14:31:43 -05:00
Nicolas Williams
9574783d04 kdc: Add httpkadmind
TBD:

 - improve error handling, logging, tracing!
 - move all REST services out of kdc/
2020-09-08 14:34:08 -05:00
Nicolas Williams
f5f63daa69 tests/kdc: Make make clean clean cleaner 2020-09-07 22:04:59 -05:00
Nicolas Williams
7bf4d76e75 krb5: Improve cccol sub naming; add gss_store_cred_into2()
- Formalize the TYPE:collection_name:subsidiary_name naming scheme for
   ccaches in ccache collections
    - KEYRING: ccaches are weird because they have one more optional field: the
      "anchor", so rather than just assume a naming convention everywhere, we
      add new functions as well
 - Add krb5_cc_{resolve,default}_sub() that allows one to specify a
   "subsidiary" ccache name in a collection separately from the
   collection name
 - Add krb5_cc_{resolve,default}_for() which take a principal name,
   unparse it, and use it as the subsidiary ccache name (with colons
   replaced)
 - Make kinit use the new interfaces
 - Add missing DIR ccache iteration functionality
 - Revamps test_cc
 - Add krb5_cc_get_collection() and krb5_cc_get_subsidiary()
 - Bump the ccops SPI version number
 - Add gss_store_cred_into2()
 - Make MEMORY:anonymous not linked into the global MEMORY ccache
   collection, and uses this for delegated cred handles

TBD:

 - Split this up into a krb5 change and gss mech_krb5 change?
 - Add krb5_cc_init_and_store() utility, per Greg's suggestion?
2020-03-02 17:48:04 -06:00
Nicolas Williams
1482309565 iprop: Use test port for testing 2019-12-20 16:52:00 -06:00
Nicolas Williams
d1a2652090 bx509: CSRF protection for /bnegotiate 2019-12-09 20:13:33 -06:00
Nicolas Williams
575c67806b Add bx509d 2019-12-04 21:34:44 -06:00
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
Viktor Dukhovni
28b6b96e09 Don't do AFS string-to-key tests when feature is disabled 2017-03-09 20:26:30 -05:00
Nicolas Williams
3e65dfbc32 Fix make dist missing files (#228) 2016-12-15 12:15:56 -06:00
Nicolas Williams
16b77f7dfa Fix make dist 2016-11-28 21:35:34 -06:00
Nicolas Williams
a94dc50114 Add --with-db-type-preference config param 2016-02-26 00:55:32 -06:00
Nicolas Williams
05a919b94b iprop slave: try incremental after complete xfer
The following sequence of events results in slave B having a stale HDB:

 - slave A connects to master, master dumps HDB for the slave
 - kadm5 operations
 - slave B connects to master, master sends previously dumped HDB

slave B won't discover any updates until the next transaction.

The fix is simple: the slave should immediately call ihave() after
receiving a complete HDB.
2015-05-20 10:07:52 -05:00
Love Hörnquist Åstrand
44ba0bcd24 no need to make chmod quiet, it supposed to be already because of \ 2014-08-23 19:29:04 -07:00
Love Hörnquist Åstrand
8504dce265 make quiet 2014-08-22 21:26:15 -07:00
Love Hörnquist Åstrand
a6e136c739 make quiet 2014-02-18 08:27:00 -08:00
Love Hörnquist Åstrand
6a192f0dce clean files 2014-02-16 11:53:56 -08:00
Love Hörnquist Åstrand
54378de6b4 add an2ln-db.txt 2014-02-16 10:05:24 -08:00
Nicolas Williams
36f22356c5 Add [manual] test of kinit cmd
It's not ready to always be run.  First, it's slow.  Second, it tortures
the system.  Third, it doesn't look for signs of failure.  Fourth, if it
did it'd fail: because something about the racing is causing the KDC to
think that the foo principal doesn't exist.
2013-09-12 12:14:41 -05:00
Nicolas Williams
e00b43a94b Address code review comments (k5login/foo in EXTRA_DIST) 2011-12-10 14:06:15 -06:00
Nicolas Williams
abd065be02 Add a test for krb5_kuserok() 2011-12-08 13:34:02 -06:00
Nicolas Williams
da14596f0e Add a test for aname2lname 2011-12-02 01:03:31 -06:00
Love Hörnquist Åstrand
8242b14eb9 add kdc-tester3.json 2011-11-22 18:59:38 -08:00
Nicolas Williams
35f4032381 Add PKINIT support in kdc-tester and check-tester 2011-11-22 18:48:41 -06:00
Love Hornquist Astrand
72e88209f8 support keytab testing (and use it) 2011-11-22 11:00:51 -08:00
Love Hörnquist Åstrand
3f1d903a85 add kinit test to kdc-tester 2011-11-21 20:34:36 -08:00
Love Hornquist Astrand
3489110db0 fixup rule for krb5-hdb-mitdb.conf 2011-11-19 10:57:51 -08:00
Love Hörnquist Åstrand
1a1bd736c0 merge support for FAST in as-req codepath 2011-10-28 19:25:48 -07:00
Nicolas Williams
9c8ceada75 Fix test bug, add test of DNS resolver searchlist name canon rule 2011-10-22 14:54:26 -05:00
Nicolas Williams
8fde93e3fb Initial name canon rules tests (just kgetcred) 2011-10-22 14:54:26 -05:00
Nicolas Williams
c3936f72c3 Test for hdb-mitdb, including an MIT KDB file. 2011-09-26 17:08:33 -05:00
Love Hornquist Astrand
17d5f8d19e make AS work with FAST 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
f9d3a70469 clean pkinit4.crt 2009-09-29 18:51:52 -07:00
Love Hornquist Astrand
72908828b1 remove $Id$ 2009-09-21 10:36:37 -07:00
Love Hornquist Astrand
6683a553f2 externlize env-setup 2009-09-06 23:16:03 -07:00
Love Hornquist Astrand
45cb91dde2 switch to mostly configuration in setup-env for check-kdc 2009-09-06 18:38:23 -07:00
Love Hornquist Astrand
d77febb894 clean better 2009-08-06 10:20:19 +02:00
Love Hornquist Astrand
e8fb270ace add leaks-kill.sh 2009-08-05 13:21:05 +02:00
Love Hörnquist Åstrand
8e927d2367 check-kdc-weak is build from check-kdc.in, drop check-kdc-weak.in
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25006 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-29 20:35:20 +00:00
Love Hörnquist Åstrand
5106f5f173 test weak enctypes too
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24610 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-04 22:09:31 +00:00
Love Hörnquist Åstrand
80911b9a2b drop ap-req
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24552 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-30 16:49:26 +00:00
Love Hörnquist Åstrand
de21e6b391 remove malloc-log
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24532 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-27 22:52:34 +00:00
Love Hörnquist Åstrand
be83e7b995 remove leaks-log
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24164 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:10:40 +00:00
Love Hörnquist Åstrand
5e9cd1e5b7 check delegation
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23849 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-20 11:16:46 +00:00
Love Hörnquist Åstrand
410932703b test disabling and expection of des.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23600 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-17 14:11:37 +00:00
Love Hörnquist Åstrand
a1b3c3e661 test SDB: cache
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23127 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-28 18:01:25 +00:00