1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

91 Commits

Author SHA1 Message Date
Andrew Bartlett
d087e715fc heimdal: remove checking of KDC PAC signature, delegate to wdc plugin
The checking of the KDC signature is more complex than it looks, it may be of a different
enc type to that which the ticket is encrypted with, and may even be prefixed
with the RODC number.

This is better handled in the plugin which can easily look up the DB for the
correct key to verify this with, and can also quickly determine if this is
an interdomain trust, which we cannot verify the PAC for.

Andrew Bartlett
2012-01-12 18:02:54 +11:00
Andrew Tridgell
6b69ecd029 heimdal: handle referrals for 3 part DRSUAPI SPNs
This handles referrals for SPNs of the form
E3514235-4B06-11D1-AB04-00C04FC2DCD2/NTDSGUID/REALM, which are
used during DRS replication when we don't know the dnsHostName of the
target DC (which we don't know until the first replication from that
DC completes).

We use the 3rd part of the SPN directly as the realm name in the
referral.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-04 15:08:57 +11:00
Andrew Bartlett
b5c7eb909f heimdal: Try to handle the PAC checking when we are in a cross-realm environment 2011-09-05 11:19:25 +02:00
Stefan Metzmacher
5a8635bca1 s4:heimdal: import lorikeet-heimdal-201107241840 (commit 0fdf11fa3cdb47df9f5393ebf36d9f5742243036) 2011-07-26 02:16:08 +02:00
Stefan Metzmacher
255e3e18e0 s4:heimdal: import lorikeet-heimdal-201107150856 (commit 48936803fae4a2fb362c79365d31f420c917b85b) 2011-07-15 11:15:05 +02:00
Stefan Metzmacher
73b1e1466c s4:kdc: generate the S4U_DELEGATION_INFO in the regenerated pac
metze
2011-06-28 19:23:43 +02:00
Stefan Metzmacher
cef06b5ca1 HEIMDAL:kdc: pass down the delegated_proxy_principal to the verify_pac()
function

This is needed in order to add the S4U_DELEGATION_INFO to the pac.

metze
2011-06-28 18:24:37 +02:00
Stefan Metzmacher
6982ea767d HEIMDAL:kdc/windc_plugin.h: KRB5_WINDC_PLUGIN_MINOR 4 => 5
commit "heimdal Add support for extracting a particular KVNO from the database"
(f469fc6d4922d796f5c61bf43e3efc018e37b680 in heimdal/master
 and 9b5e304cce in samba/master)
changed the windc_plugin interface, so we need to change the
version number.

metze
2011-06-28 18:24:37 +02:00
Stefan Metzmacher
2996945de6 HEIMDAL:kdc: don't allow self delegation if a backend check_constrained_delegation() hook is given
A service should use S4U2Self instead of S4U2Proxy.

Windows servers allow S4U2Proxy only to explicitly configured
target principals.

metze
2011-06-24 18:53:49 +02:00
Stefan Metzmacher
7229b0d5b2 HEIMDAL:kdc: pass down the server hdb_entry_ex to check_constrained_delegation()
This way we can compare the already canonicalized principals,
while still passing the client specified target principal down
to the backend specific constrained_delegation() hook.

metze
2011-06-24 18:53:48 +02:00
Stefan Metzmacher
b96efe069b HEIMDAL:kdc: use the correct client realm in the EncTicketPart
With S4U2Proxy tgt->crealm might be different from tgt_name->realm.

metze
2011-06-24 18:53:48 +02:00
Stefan Metzmacher
2c46585a42 HEIMDAL:kdc: check and regenerate the PAC in the s4u2proxy case
TODO: we need to add a S4U_DELEGATION_INFO to the PAC later.

metze
2011-05-18 07:46:36 +02:00
Stefan Metzmacher
3797e46543 HEIMDAL:kdc: pass the correct principal name for the resulting service ticket
Depending on S4U2Proxy the principal name for the resulting
ticket is not the principal of the client ticket.

metze
2011-05-18 07:46:34 +02:00
Stefan Metzmacher
cc0ff48f28 HEIMDAL:kdc: let check_PAC() to verify the incoming server and krbtgt cheksums
For a normal TGS-REQ they're both signed with krbtgt key.
But for S4U2Proxy requests which ask for contrained delegation,
the keys differ.

metze
2011-05-18 07:46:33 +02:00
Jelmer Vernooij
431853c846 Merge new lorikeet heimdal, revision 85ed7247f515770c73b1f1ced1739f6ce19d75d2
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Mar 14 23:53:46 CET 2011 on sn-devel-104
2011-03-14 23:53:46 +01:00
Stefan Metzmacher
a511d37d83 HEIMDAL:kdc: correctly propagate HDB_ERR_NOT_FOUND_HERE to via tgs_parse_request() and _kdc_tgs_rep()
metze
2011-03-04 21:19:05 +01:00
Andrew Bartlett
5c12cb0556 heimdal Pass F_CANON down to the hdb layer for servers in AS-REP as well
This fixes Win2003 domain logons against Samba4, which need a
canonicalised reply, and helpfully do set that flag.

Specifically, they need that realm in krbtgt/realm@realm that these
both match exactly in the reply.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Feb 17 06:40:53 CET 2011 on sn-devel-104
2011-02-17 06:40:53 +01:00
Andrew Bartlett
2d9bcc861d s4:heimdal: import lorikeet-heimdal-201101310455 (commit aa88eb1a05c4985cc23fb65fc1bad75bdce01c1f) 2011-02-02 15:19:03 +11:00
Jelmer Vernooij
2ded4668ea heimdal_build: Add version-script for kdc. 2010-12-17 20:00:58 +01:00
Andrew Bartlett
c5bea98ddb s4:heimdal: import lorikeet-heimdal-201012010201 (commit 81fe27bcc0148d410ca4617f8759b9df1a5e935c) 2010-12-01 17:00:47 +11:00
Andrew Bartlett
4908237403 heimdal Build ticket with the canonical server name
We need to use the name that the HDB entry returned, otherwise we
will not canonicalise the reply as requested.

Andrew Bartlett
2010-11-16 15:30:13 +11:00
Andrew Bartlett
4041640bd6 heimdal Fetch the client before the PAC check, but after obtaining krbtgt_out
By checking the client principal here, we compare the realm based on
the normalised realm, but do so early enough to validate the PAC (and
regenerate it if required).

Andrew Bartlett
2010-11-15 23:17:05 +00:00
Matthias Dieter Wallnöfer
329f76c410 s4:heimdal - fix the return code of a non-void function
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Mon Nov 15 23:14:57 UTC 2010 on sn-devel-104
2010-11-15 23:14:57 +00:00
Andrew Bartlett
1e29ee3a70 heimdal Fix handling of backwards cross-realm detection for Samba4
Samba4 may modify the case of the realm in a returned entry, but will no longer modify the case of the prinicipal components.

The easy way to keep this test passing is to consider also what we
need to do to get the krbtgt account for the PAC signing - and to use
krbtgt/<this>/@REALM component to fetch the real krbtgt, and to use
that resutl for realm comparion.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Nov 15 08:47:44 UTC 2010 on sn-devel-104
2010-11-15 08:47:44 +00:00
Andrew Bartlett
1342185e33 s4:heimdal: import lorikeet-heimdal-201011102149 (commit 5734d03c20e104c8f45533d07f2a2cbbd3224f29) 2010-11-15 01:25:06 +00:00
Andrew Bartlett
aa1c32ccb0 heimdal Return HDB_ERR_NOT_FOUND_HERE to the caller
This means that no reply packet should be generated, but that instead
the user of the libkdc API should forward the packet to a real KDC,
that has a full database.

Andrew Bartlett
2010-11-12 18:18:55 +11:00
Andrew Bartlett
21460dfc14 s4:heimdal: import lorikeet-heimdal-201010022046 (commit 1bea031b9404b14114b0272ecbe56e60c567af5c) 2010-10-03 01:15:04 +00:00
Matthieu Patou
ab6e3fce04 s4:heimdal: import lorikeet-heimdal-201009250123 (commit 42cabfb5b683dbcb97d583c397b897507689e382)
I based this on Matthieu's import of lorikeet-heimdal, and then
updated it to this commit.

Andrew Bartlett
2010-10-03 01:15:04 +00:00
Andrew Bartlett
a68f4476f7 heimdal use returned server entry from HDB to compare realms
Some hdb modules (samba4) may change the case of the realm in
a returned result.  Use that to determine if it matches the krbtgt
realm also returned from the DB (the DB will return it in the 'right' case)

Andrew Bartlett
2010-10-02 09:11:37 +10:00
Andrew Bartlett
9b5e304cce heimdal Add support for extracting a particular KVNO from the database
This should allow master key rollover.

(but the real reason is to allow multiple krbtgt accounts, as used by
Active Directory to implement RODC support)

Andrew Bartlett
2010-09-29 04:23:07 +10:00
Andrew Bartlett
c8cb17a18c s4:heimdal Create a new PAC when impersonating a user with S4U2Self
If we don't do this, the PAC is given for the machine accout, not the
account being impersonated.

Andrew Bartlett
2010-04-10 21:40:59 +10:00
Andrew Bartlett
1d59abc724 s4:heimdal Add hooks to check with the DB before we allow s4u2self
This allows us to resolve multiple forms of a name, allowing for
example machine$@REALM to get an S4U2Self ticket for
host/machine@REALM.

Andrew Bartlett
2010-04-10 21:40:58 +10:00
Andrew Bartlett
533024be44 s4:heimdal: import lorikeet-heimdal-201003262338 (commit f4e0dc17709829235f057e0e100d34802d3929ff) 2010-03-27 11:55:22 +11:00
Andrew Bartlett
89eaef0253 s4:heimdal: import lorikeet-heimdal-201001120029 (commit a5e675fed7c5db8a7370b77ed0bfa724196aa84d) 2010-03-27 11:51:27 +11:00
Andrew Bartlett
4f64bc7125 heimdal Fix invalid format string 2009-11-24 11:38:41 +11:00
Andrew Bartlett
4f8ba5ad6a s4:heimdal: import lorikeet-heimdal-200911122202 (commit 9291fd2d101f3eecec550178634faa94ead3e9a1) 2009-11-13 23:19:05 +11:00
Andrew Bartlett
5bc87c14a1 s4:heimdal: import lorikeet-heimdal-200909210500 (commit 290db8d23647a27c39b97c189a0b2ef6ec21ca69) 2009-11-13 23:19:05 +11:00
Matthias Dieter Wallnöfer
3393257920 heimdal kerberos - fix memory leak (free the plugin list always - not only in error cases) 2009-10-03 15:49:40 +02:00
Andrew Bartlett
cd1d7f4be7 s4:heimdal: import lorikeet-heimdal-200908050050 (commit 8714779fa7376fd9f7761587639e68b48afc8c9c)
This also adds a new hdb-glue.c file, to cope with Heimdal's
uncondtional enabling of SQLITE.

(Very reasonable, but not required for Samba4's use).

Andrew Bartlett
2009-08-05 12:18:17 +10:00
Andrew Bartlett
8ff1f50b0c s4:kerberos Add support for user principal names in certificates
This extends the PKINIT code in Heimdal to ask the HDB layer if the
User Principal Name name in the certificate is an alias (perhaps just
by case change) of the name given in the AS-REQ.  (This was a TODO in
the Heimdal KDC)

The testsuite is extended to test this behaviour, and the other PKINIT
certficate (using the standard method to specify a principal name in a
certificate) is updated to use a Administrator (not administrator).
(This fixes the kinit test).

Andrew Bartlett
2009-07-28 14:10:47 +10:00
Andrew Bartlett
6cb81f7b37 s4:heimdal: import lorikeet-heimdal-200907162216 (commit d09910d6803aad96b52ee626327ee55b14ea0de8)
This includes in particular changes to the KDC to resolve bug 6272,
originally by Matthieu Patou <mat+Informatique.Samba@matws.net>.  We
need to sort the AuthorizationData elements to put the PAC first, or
else WinXP breaks when browsed from Win2k8.

Andrew Bartlett
2009-07-17 08:32:01 +10:00
Andrew Bartlett
e25325539a s4:heimdal: import lorikeet-heimdal-200907152325 (commit 2bef9cd5378c01e9c2a74d6221761883bd11a5c5) 2009-07-16 11:31:36 +10:00
Andrew Bartlett
89a074b784 s4:heimdal Allow KRB5_NT_ENTERPRISE names in all DB lookups
The previous code only allowed an KRB5_NT_ENTERPRISE name (an e-mail
list user principal name) in an AS-REQ.  Evidence from the wild
(Win2k8 reportadely) indicates that this is instead valid for all
types of requests.

While this is now handled in heimdal/kdc/misc.c, a flag is now defined
in Heimdal's hdb so that we can take over this handling in future (once we start
using a system Heimdal, and if we find out there is more to be done
here).

Andrew Bartlett
2009-06-30 12:11:14 +10:00
Andrew Bartlett
19413c5249 s4:kdc Allow a password change when the password is expired
This requires a rework on Heimdal's windc plugin layer, as we want
full control over what tickets Heimdal will issue.  (In particular, in
case our requirements become more complex in future).

The original problem was that Heimdal's check would permit the ticket,
but Samba would then deny it, not knowing it was for kadmin/changepw

Also (in hdb-samba4) be a bit more careful on what entries we will
make the 'change_pw' service mark that this depends on.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Bartlett
9b261c008a s4:heimdal: import lorikeet-heimdal-200906080040 (commit 904d0124b46eed7a8ad6e5b73e892ff34b6865ba)
Also including the supporting changes required to pass make test

A number of heimdal functions and constants have changed since we last
imported a tree (for the better, but inconvenient for us).

Andrew Bartlett
2009-06-12 07:45:48 +10:00
Andrew Bartlett
2fc5ca8409 Re-add support for supporting the PAC over domain trusts.
(This was not entered in lorikeet-heimdal.diff, so missed by metze's import).

Andrew Bartlett
2008-11-04 16:06:57 +11:00
Stefan Metzmacher
2b29b71864 s4: import lorikeet-heimdal-200810271034
metze
2008-10-28 08:53:09 +01:00
Andrew Bartlett
6a5547742f Allow the PAC to be passed along during cross-realm authentication 2008-10-06 14:28:27 -07:00
Stefan Metzmacher
243321b4bb heimdal: import heimdal's trunk svn rev 23697 + lorikeet-heimdal patches
This is based on f56a3b1846c7d462542f2e9527f4d0ed8a34748d in my heimdal-wip repo.

metze
(This used to be commit 467a1f2163)
2008-08-26 19:46:38 +02:00
Stefan Metzmacher
9080b5d979 heimdal_build: autogenerate the heimdal private/proto headers
Now it's possible to just use a plain heimdal tree in source/heimdal/
without any pregenerated files.

metze
(This used to be commit da333ca711)
2008-08-26 18:49:17 +02:00