Commit Graph

68 Commits

Author SHA1 Message Date
Nicolas Williams
6297b76362 klist: Real JSON output 2022-10-03 09:44:22 -05:00
Luke Howard
774f50b28b gss: move GSS pre-auth helpers to convenience lib
GSS pre-auth helpers do not belong in libgssapi, so move them to a separate
convenience library.
2021-08-27 15:20:07 +10:00
Luke Howard
3302b38e53 gss: fix Windows preauth build issues
Fix kdc/kuser NTMakefiles for GSS-API pre-authentication dependencies
2021-08-12 17:57:17 +10:00
Luke Howard
49f3f5bd99 kdc: support for GSS-API pre-authentication
Add support for GSS-API pre-authentication to the KDC, using a simplified
variation of draft-perez-krb-wg-gss-preauth-02 that encodes GSS-API context
tokens directly in PADATA, and uses FX-COOKIE for state management.

More information on the protocol and implementation may be found in
lib/gssapi/preauth/README.md.
2021-08-12 17:37:01 +10:00
Nicolas Williams
dfada0ccad kx509: Add CSR support
This commit adds support for proof of posession to the kx509 protocol by
using PKCS#10 CSRs.

This allows conveyance of extReq CSR attributes requesting desired
Certificate Extensions.
2019-10-09 20:53:30 -05: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
Nicolas Williams
3e65dfbc32 Fix make dist missing files (#228) 2016-12-15 12:15:56 -06:00
Nicolas Williams
6d1571a3c4 Fix --disable-afs-support disable lib/kafs 2016-08-04 18:51:23 -05:00
David Mulder
d8080162ea --disable-afs-support doesn't really disable afs 2016-08-02 12:58:26 -06:00
Nicolas Williams
490337f4f9 Make OpenSSL an hcrypto backend proper
This adds a new backend for libhcrypto: the OpenSSL backend.

Now libhcrypto has these backends:

 - hcrypto itself (i.e., the algorithms coded in lib/hcrypto)
 - Common Crypto (OS X)
 - PKCS#11 (specifically for Solaris, but not Solaris-specific)
 - Windows CNG (Windows)
 - OpenSSL (generic)

The ./configure --with-openssl=... option no longer disables the use of
hcrypto.  Instead it enables the use of OpenSSL as a (and the default)
backend in libhcrypto.  The libhcrypto framework is now always used.

OpenSSL should no longer be used directly within Heimdal, except in the
OpenSSL hcrypto backend itself, and files where elliptic curve (EC)
crypto is needed.

Because libhcrypto's EC support is incomplete, we can only use OpenSSL
for EC.  Currently that means separating all EC-using code so that it
does not use hcrypto, thus the libhx509/hxtool and PKINIT EC code has
been moved out of the files it used to be in.
2016-04-15 00:16:17 -05:00
Jelmer Vernooij
2b365b2327 Rename kcc to heimtools.
This should prevent naming clashes with other utilities named 'kcc'.

Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2012-03-06 00:06:26 -08:00
Love Hörnquist Åstrand
12403a31ce sprinkle more windows files 2011-07-23 11:18:21 -07:00
Love Hörnquist Åstrand
7aaba443bc add NTMakefile and windows directories 2011-07-17 12:16:59 -07:00
Jelmer Vernooij
5ff461d0af kcc: Add explicitly link against LIB_readline.
Fixes linking when using binutils-gold (used by e.g. Ubuntu natty).

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-01-25 17:52:53 -08:00
Love Hornquist Astrand
4055185eaf move copy_cred_cache into kcc 2010-11-25 11:34:03 -08:00
Love Hornquist Astrand
55e96fabf2 switch kswitch to kcc 2010-11-25 09:29:29 -08:00
Love Hornquist Astrand
92a827da9b move klist to kcc 2010-11-24 16:21:44 -08:00
Love Hornquist Astrand
c5dcbc41d9 first drop of kcc 2010-11-24 15:12:56 -08:00
Love Hornquist Astrand
2d169563f1 no longer install kauth, it have been a symlink to kinit for a very long time 2010-11-24 10:10:14 -08:00
Love Hornquist Astrand
9ee7dd24d9 support kswitch -i, interactive mode 2010-11-22 13:19:27 -08:00
Love Hornquist Astrand
49811a8b80 Move libexec man pages to section 8
Proposed by Jeremy C. Reed
2009-10-23 10:04:57 -07:00
Love Hornquist Astrand
dc4e8669ea Abstract out asn1_compile and slc 2009-09-16 00:12:13 -07:00
Love Hornquist Astrand
19b997c61b add kswitch.1 2009-08-25 21:34:07 -07:00
Love Hörnquist Åstrand
777752bfb2 add kdigest.1
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23864 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-28 05:14:27 +00:00
Love Hörnquist Åstrand
326718e312 i18n kinit
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23824 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:45:20 +00:00
Love Hörnquist Åstrand
74a7510937 Add kswitch.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22843 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 11:48:40 +00:00
Love Hörnquist Åstrand
370e4497d2 Add missing files, from Buchan Milne.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22285 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-13 20:40:57 +00:00
Love Hörnquist Åstrand
7acc93dd96 depend on libheimntlm
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20520 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-22 10:44:28 +00:00
Love Hörnquist Åstrand
7ba2b2006c rename des to hcrypto
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20466 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-20 08:29:05 +00:00
Love Hörnquist Åstrand
d615ca6727 kdigest depends on libheimntlm.la
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19374 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-12-15 21:23:05 +00:00
Love Hörnquist Åstrand
1b9fae5253 more files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18653 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-20 15:52:20 +00:00
Love Hörnquist Åstrand
a887c3389a split build files into dist_ and noinst_ SOURCES
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18282 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-07 09:11:49 +00:00
Love Hörnquist Åstrand
c1c7757afe Add tool for printing tickets.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18102 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-09-18 17:36:06 +00:00
Love Hörnquist Åstrand
c37191e06e Frontend for remote digest service in KDC
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17885 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-08-18 10:44:40 +00:00
Johan Danielsson
0624b4457e replace INCLUDES with AM_CPPFLAGS
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14164 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-08-26 11:55:29 +00:00
Johan Danielsson
e230725892 don't install copy_cred_cache manpage
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13998 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-06-27 14:07:54 +00:00
Johan Danielsson
b96a303522 add cred cache copy tool
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13771 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-04-24 22:46:08 +00:00
Love Hörnquist Åstrand
e24f1c1207 INCLUDES: -I$(srcdir)/../lib/krb5
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11855 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-03-18 13:15:27 +00:00
Johan Danielsson
41aef46b1e install kauth as a symlink to kinit
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10626 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-09-02 17:12:23 +00:00
Johan Danielsson
63432b5860 kauth is no more
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10613 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-31 10:01:55 +00:00
Assar Westerlund
6f0e549ca6 remove CHECK_LOCAL - non bin programs require no special treatment now
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10550 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-08-24 01:12:58 +00:00
Assar Westerlund
baebf953a8 use LIB_des
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9176 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-11-15 22:51:14 +00:00
Assar Westerlund
fc8a55a4dc (noinst_PROGRAMS): add generate-requests
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8527 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-02 15:41:54 +00:00
Assar Westerlund
5330d49b63 add kdecode_ticket
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7005 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-21 05:12:29 +00:00
Assar Westerlund
affd9327a1 add kgetcred
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6220 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-05-13 22:24:33 +00:00
Assar Westerlund
e53706c80a use LIB_roken
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5897 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-09 18:29:48 +00:00
Johan Danielsson
ca1b428cfa remove kfoo
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5825 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-01 15:10:49 +00:00
Assar Westerlund
099a573101 fix typo
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5751 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-24 22:25:09 +00:00
Assar Westerlund
6a163b6d12 (kdestroy_LDADD, klist_LDADD): more libraries
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5734 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-24 04:51:05 +00:00
Johan Danielsson
0f23e17f6f fix broken checkin
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5652 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-03-20 13:58:20 +00:00