Commit Graph

171 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
Stefan Metzmacher
20da6cad02 doc/standardisation: add rfc6806.txt
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-07-31 17:30:23 +12:00
Love Hornquist Astrand
ca060554fb x 2011-07-24 20:24:36 -07:00
Love Hornquist Astrand
ca1b7bfcc3 initial drop of gss-mo 2010-11-25 11:48:02 -08:00
Love Hornquist Astrand
686f2abe61 x 2010-09-19 01:14:07 -07:00
Love Hornquist Astrand
1011050f65 x 2009-08-12 22:37:03 +02:00
Love Hornquist Astrand
296ebb00ba x 2009-07-31 14:15:13 +02:00
Love Hornquist Astrand
7b662b1fb5 x 2009-07-31 10:20:32 +02:00
Love Hornquist Astrand
44d0637328 x 2009-07-31 10:15:29 +02:00
Love Hornquist Astrand
01b53ac015 x 2009-07-31 07:29:09 +02:00
Love Hörnquist Åstrand
6f23451ef8 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25322 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-07-08 00:07:19 +00:00
Love Hörnquist Åstrand
566648ae4a x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25270 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-04 22:33:23 +00:00
Love Hörnquist Åstrand
418b451e55 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25258 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-02 21:53:29 +00:00
Love Hörnquist Åstrand
0d22dfad5f x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24943 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-25 15:37:08 +00:00
Love Hörnquist Åstrand
26c1af7c93 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24938 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-25 15:36:14 +00:00
Love Hörnquist Åstrand
bfa631b1cb x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24927 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-22 17:24:46 +00:00
Love Hörnquist Åstrand
160062c045 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24805 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-22 23:29:56 +00:00
Love Hörnquist Åstrand
96c5ea43fc x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24729 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-16 18:37:06 +00:00
Love Hörnquist Åstrand
406561d04a x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24678 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-11 05:59:23 +00:00
Love Hörnquist Åstrand
91e1068f15 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24558 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-30 16:50:38 +00:00
Love Hörnquist Åstrand
535c7c5175 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24223 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:39:09 +00:00
Love Hörnquist Åstrand
fc27e9b239 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:11:55 +00:00
Love Hörnquist Åstrand
1061de8583 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24043 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-11-15 04:46:47 +00:00
Love Hörnquist Åstrand
814e4c4f1b x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24022 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-11-03 19:16:23 +00:00
Love Hörnquist Åstrand
bdc4cdf254 include old old draft that I wrote long time ago.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23813 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:44:24 +00:00
Love Hörnquist Åstrand
ba72581a0f x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23526 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-13 11:48:26 +00:00
Love Hörnquist Åstrand
4c89c23109 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23525 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-13 11:39:46 +00:00
Love Hörnquist Åstrand
737c369012 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23483 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-11 09:58:07 +00:00
Love Hörnquist Åstrand
b284984fc7 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23371 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-07-16 16:11:58 +00:00
Love Hörnquist Åstrand
098a497638 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22712 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-03-24 12:05:41 +00:00
Love Hörnquist Åstrand
3d19e0bae4 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22205 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-07 17:14:02 +00:00
Love Hörnquist Åstrand
558513be46 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22082 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-16 16:07:39 +00:00
Love Hörnquist Åstrand
6b7d49f1f6 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21697 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-25 00:17:02 +00:00
Love Hörnquist Åstrand
069b91f2ab x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21696 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-25 00:12:39 +00:00
Love Hörnquist Åstrand
580ab109e5 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21486 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-10 16:54:21 +00:00
Love Hörnquist Åstrand
c4086a7bc9 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21485 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-10 16:53:57 +00:00
Love Hörnquist Åstrand
887ef4c439 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21422 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-07 13:10:22 +00:00
Love Hörnquist Åstrand
ab86f67ed1 move to text, thanks gk
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20558 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-24 15:26:29 +00:00
Love Hörnquist Åstrand
2136f08d50 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20557 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-24 14:00:22 +00:00
Love Hörnquist Åstrand
8ff7e3fbab x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20137 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-02-02 21:07:30 +00:00
Love Hörnquist Åstrand
a595414294 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20038 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-23 17:23:50 +00:00
Love Hörnquist Åstrand
92f04a40a0 PKIX rfcs
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19929 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-16 10:50:59 +00:00
Love Hörnquist Åstrand
51f78097a6 original from Brian Tung
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19623 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-03 00:06:49 +00:00
Love Hörnquist Åstrand
eed9f58be4 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18995 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-12 17:00:26 +00:00
Love Hörnquist Åstrand
785e4c09a4 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18949 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-08 00:30:51 +00:00
Love Hörnquist Åstrand
c284a8900a x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18939 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-07 19:19:28 +00:00
Love Hörnquist Åstrand
6c898c9c9f x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18921 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-11-06 17:36:25 +00:00
Love Hörnquist Åstrand
66708877e9 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18638 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-19 21:50:00 +00:00
Love Hörnquist Åstrand
c2de386016 x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17825 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-10 17:03:52 +00:00
Love Hörnquist Åstrand
923d63fd9e x
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17785 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-07-01 09:20:27 +00:00