Commit Graph

32 Commits

Author SHA1 Message Date
Luke Howard
fd3f463152 kdc: map KRB5_PROG_SUMTYPE_NOSUPP to KRB5KDC_ERR_SUMTYPE_NOSUPP
RFC4120 says KRB5KDC_ERR_SUMTYPE_NOSUPP should be returned if the KDC does not
support a given checksum type. Return this instead of KRB5_PROG_SUMTYPE_NOSUPP
by introducing a new wrapper function, _kdc_verify_checksum().
2021-09-21 18:17:00 +10:00
Luke Howard
ebfd48e40a kdc: avoid re-encoding KDC-REQ-BODY
Use --preserve-binary=KDC-REQ-BODY option to ASN.1 compiler to avoid
re-encoding KDC-REQ-BODYs for verification in GSS preauth, TGS and PKINIT.
2021-09-13 13:50:45 +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
Andrew Bartlett
f03983b64d HEIMDAL: Require armor_server to be a krbtgt name, not just a server name
Samba has a different lookup path for krbtgt/ principals.

armor_server is in this case the same as the server in a normal
TGS-REQ, just inside the FAST armor, so needs to have the same
lookup properties as the TGS-REQ does.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2021-08-06 12:43:17 +10:00
Andrew Bartlett
61f1be93e3 kdc: Provide flag to hint to KDC that this is a FAST key lookup
For Samba the fast key is not stored in the replicated DB, so
this helps Samba find it in the Samba hdb module.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2021-08-06 12:43:17 +10:00
Luke Howard
3604497fda kdc: zero KDCFastState padata before free 2021-08-04 18:01:48 +10:00
Luke Howard
04e3ea4307 kdc: don't leak FAST req_body checksum buffer
The temporary buffer used to checksum the KDC-REQ body in
_kdc_fast_unwrap_request() was not freed.
2021-08-03 17:30:06 +10:00
Nicolas Williams
ff13573ce5 hdb: Do not apply new service key delay to clients
The new [hdb] new_service_key_delay parameter should not apply to
principal entries when used as clients.  Otherwise new passwords would
not take effect immediately, and that would be very confusing.
2020-09-09 21:48:29 -05:00
Roland C. Dowdeswell
05e8517542 kdc/fast.c: fix leak in unusual error path. 2019-12-05 00:05:56 -05:00
Roland C. Dowdeswell
7d353d0557 Generate a single summary audit line for AS/TGS.
We refactor the code a bit to extend kdc_request_t which until now
was only used for the AS.  We make the structure extensible and
start using it for the TGS as well.  We leave digest and kx509
alone for the time being.

We also define the concept of kv-pairs in our audit trail which
allows us to define a rigorous but extensible format:

type error from-addr client server key1=val1 key2=val2 ...
2019-12-05 00:05:56 -05:00
Roland C. Dowdeswell
c7d4682aed Define log levels in docs and change default to 0-3.
We define the meaning of the various log levels in the man page
for krb5_openlog(3).  If logging configured and levels are not
specified, we change the default levels to 0-3 which should exclude
debugging messages which are generally only desired in exceptional
circumstances.

We also go through the KDC and adjust the levels to be appropriate.
2019-10-21 13:43:01 +01:00
Viktor Dukhovni
8ec4f23701 Hide principal names in errors with FAST 2017-12-05 19:01:04 -05:00
Jeffrey Altman
cdf5d324e3 kdc: _kdc_fast_unwrap_request leaks 'buf'
Change-Id: If4d3852112dadc331db1d3601b2c7bd6b3129429
2016-11-18 23:59:47 -05:00
Stefan Metzmacher
a873e21d7c kdc: base _kdc_fast_mk_error() on krb5_mk_error_ext()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-07-31 17:30:23 +12:00
Nicolas Williams
c9609cdb37 Initial patch for dealing with AD x-realm key rollover
AD issues x-realm TGTs with kvno 0.  On key x-realm trust key change
    we need to be able to try current and previous keys for trust, else
    we will have some failures.
2011-11-15 21:53:33 -06:00
Love Hörnquist Åstrand
0941d6dbce add constant for WELLKNOWN:ORG.H5L realm 2011-07-24 21:29:27 -07:00
Love Hörnquist Åstrand
fb5e32e0f6 goto out 2011-07-24 21:23:53 -07:00
Love Hörnquist Åstrand
f0371bb2ee fast cookie expiration 2011-07-24 21:21:39 -07:00
Love Hörnquist Åstrand
46f285bcc9 encode fast state in the fast cookie 2011-07-24 21:16:42 -07:00
Love Hörnquist Åstrand
7f6f4206c6 make compile after rebase 2011-07-24 20:24:40 -07:00
Linus Nordberg
12203f0fab s/krb5_decode_EncryptedData/krb5_decrypt_EncryptedData/1.
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2011-07-24 20:24:39 -07:00
Linus Nordberg
294c2786fa Fix typo.
Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>
2011-07-24 20:24:39 -07:00
Love Hörnquist Åstrand
e5c66a70cd parse fast cookie 2011-07-24 20:24:39 -07:00
Love Hörnquist Åstrand
d99c2eda40 use else if 2011-07-24 20:24:39 -07:00
Love Hörnquist Åstrand
eaa23ce96f proxy request if needed 2011-07-24 20:24:39 -07:00
Love Hornquist Astrand
7e1468ca52 new call order too _krb5_fast_armor_key 2011-07-24 20:24:38 -07:00
Love Hornquist Astrand
99ed826f7f use _krb5_fast_armor_key() 2011-07-24 20:24:38 -07:00
Love Hornquist Astrand
333471097d break out fast unwrap 2011-07-24 20:24:37 -07:00
Love Hornquist Astrand
17d5f8d19e make AS work with FAST 2011-07-24 20:24:36 -07:00
Love Hornquist Astrand
a2bcf8bbdd break out mk_error 2011-07-24 20:24:36 -07:00
Love Hornquist Astrand
580b370e08 make pa-data optional 2011-07-24 20:24:35 -07:00
Love Hornquist Astrand
5edb5d0275 move out generic fast packet building into fast.c 2011-07-24 20:24:35 -07:00