Commit Graph

15 Commits

Author SHA1 Message Date
Nicolas Williams
a59bb7132f When building a princ name pick a sane def type
This is part of the fix to #173.  MSFT RODCs insist on the name type for
krbtgt principals be set to KRB5_NT_SRV_INST.

Commentary from Jeffrey Altman <jaltman@secure-endpoints.com>

As reported by David Mulder of Dell's Quest, Active Directory will
return a BAD_INTEGRITY error when a request for a krbtgt service
ticket is received with principal type NT-PRINCIPAL instead of NT-SRV-INST
as required by RFC 4120.

[Nico: RFC4120 does not require this.  See the description of the
       name-type field of PrincipalName on page 55.]

  ERROR: VAS_ERR_KRB5: Failed to obtain credentials.
  Client: SLED10-32$@F.QAS,
  Service: SLED10-32$@F.QAS, Server: ad2-f.f.qas
  Caused by: KRB5KRB_AP_ERR_BAD_INTEGRITY (-1765328353): Decrypt integrity check failed

Microsoft began enforcing principal type checking for RODCs in 2008R2.
Microsoft does state that ALL krgtgt/REALM tickets SHOULD be sent using
principal name type of KRB5_NT_SRV_INST instead of KRB5_NT_PRINCIPAL.

From Microsoft:

  "I believe we discovered the problem. There isn't a bug in Windows.
  There's been a code change to address another issue which puts in additional
  checks for Kerberos tickets. The problem is with the Unix clients when the
  client request a TGT. The Unix clients are using Name-type Principal
  [KRB_NT_PRINCIPAL (1)] instead of using Name-type Service and Instance
  [KRB_NT_SRV_INST (2)]...."

This change assigns the NT-SRV-INST principal type each time a krbtgt
service principal is created.  Unlike Microsoft, the Heimdal mostly does
not care about the name-type of any principals, with the exception of
referrals, where the name type is needed to decide how to find a
next-hop realm.
2016-11-14 21:29:47 -06:00
Love Hörnquist Åstrand
fdeb7b2318 fix sizeof 2011-12-03 13:02:28 -08:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
66c15e7caf add support for sha256 and sha512 for the nist kdf 2011-04-25 14:46:38 -07:00
Asanka Herath
4925fb863c Address of an imported symbol is not always a constant
On Windows, the address of a symbol imported from a DLL is not
considered a constant.  Therefore, it can't be used to initialized
static data.
2010-09-14 08:03:37 -04:00
Love Hörnquist Åstrand
1f42785746 plug memory leak
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25282 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-06-08 22:02:25 +00:00
Love Hörnquist Åstrand
a63aa6e262 use oid variable
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25233 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:17:31 +00:00
Love Hörnquist Åstrand
942a821fab remove RCSID
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-04 06:17:40 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
45041db81e make quiet without --verbose flag
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23734 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-07 21:06:56 +00:00
Love Hörnquist Åstrand
ac33d8447b More bits from the KDF.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23485 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-11 09:58:18 +00:00
Love Hörnquist Åstrand
122f00f53b correct second half of key
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22938 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-09 13:07:19 +00:00
Love Hörnquist Åstrand
48c1854a75 Comment testcase[0]
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22937 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-09 13:07:14 +00:00
Love Hörnquist Åstrand
50edb1b440 Test the new pkinit nist kdf.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22932 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-09 13:06:52 +00:00