4 Kerberos working group John Brezak
5 Internet Draft Microsoft
6 Document: draft-brezak-win2k-krb-authz-01.txt
7 Category: Informational October, 2002
10 Utilizing the Windows 2000 Authorization Data in Kerberos Tickets for
11 Access Control to Resources
16 This document is an Internet-Draft and is subject to all provisions
17 of Section 10 of RFC2026 [1] except that the right to create
18 derivative works is not granted. Internet-Drafts are working
19 documents of the Internet Engineering Task Force (IETF), its areas,
20 and its working groups. Note that other groups may also distribute
21 working documents as Internet-Drafts. Internet-Drafts are draft
22 documents valid for a maximum of six months and may be updated,
23 replaced, or obsoleted by other documents at any time. It is
24 inappropriate to use Internet- Drafts as reference material or to
25 cite them other than as "work in progress."
27 The list of current Internet-Drafts can be accessed at
28 http://www.ietf.org/ietf/1id-abstracts.txt
30 The list of Internet-Draft Shadow Directories can be accessed at
31 http://www.ietf.org/shadow.html.
35 Microsoft Windows 2000 includes operating system specific data in
36 the Kerberos V5 [1] authorization data field that is used for access
37 control. This data is used to create an NT access token. The access
38 token is used by the system to enforce access checking when
39 attempting to access objects. This document describes the structure
40 of the Windows 2000 specific authorization data that is carried in
41 that field for use by servers in performing access control.
44 2. Conventions used in this document
46 All defined data structures are defined using "C" style constructs
47 unless otherwise stated. All data is encoded as little-endian.
49 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
50 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in
51 this document are to be interpreted as described in RFC-2119 [2].
54 3. Top-Level PAC Structure
56 The PAC is generated by the KDC under the following conditions:
59 Brezak Category - Informational 1
\f
60 Windows 2000 Kerberos Authorization Data October 2002
63 o during an AS request that has been validated with pre-
65 o during a TGS request when the client has no PAC and the target
66 is a service in the domain or a ticket granting service
69 The PAC itself is included in the IF-RELEVANT (ID 1) portion of the
70 authorization data in a ticket. Within the IF-RELEVANT portion, it
71 is encoded KERB_AUTH_DATA_PAC with ID 128.
73 The PAC is defined as a C data type, with integers encoded in
74 little-endian order. The PAC itself is made up of several layers.
75 The outer structure, contained directly in the authorization data,
76 is as follows. The top-level structure is the PACTYPE structure:
78 typedef unsigned long ULONG;
79 typedef unsigned short USHORT;
80 typedef unsigned long64 ULONG64;
81 typedef unsigned char UCHAR;
83 typedef struct _PACTYPE {
86 PAC_INFO_BUFFER Buffers[1];
89 The fields are defined as follows:
90 cBuffers - contains the number of entries in the array Buffers
91 Version - this is version zero
92 Buffers - contains a conformant array of PAC_INFO_BUFFER structures
94 The PAC_INFO_BUFFER structure contains information about each piece
97 typedef struct _PAC_INFO_BUFFER {
103 Type fields are defined as follows:
105 ulType - contains the type of data contained in this buffer. For
106 Windows 2000 access control, it may be one of the following,
107 which are explained further below:
109 #define PAC_LOGON_INFO 1
110 #define PAC_SERVER_CHECKSUM 6
111 #define PAC_PRIVSVR_CHECKSUM 7
113 Offset - contains the offset to the beginning of the data, in bytes,
114 from the beginning of the PACTYPE structure. The data offset
115 must by a multiple of 8. If the data pointed to by this
117 Brezak Category - Informational 2
\f
118 Windows 2000 Kerberos Authorization Data October 2002
121 field is complex, the data is typically NDR encoded. If the
122 data is simple (indicating it includes no pointer types or
123 complex structures) it is a little-endian format data
126 4. PAC Credential Information (PAC_LOGON_INFO)
128 PAC_INFO_BUFFERs of type PAC_LOGON_INFO contain the credential
129 information for the client of the Kerberos ticket. The data itself
130 is contained in a KERB_VALIDATION_INFO structure, which is NDR
131 encoded. The output of the NDR encoding is placed in the
132 PAC_INFO_BUFFER structure of type PAC_LOGON_INFO.
134 typedef struct _KERB_VALIDATION_INFO {
137 FILETIME KickOffTime;
141 UNICODE_STRING Reserved5;
142 UNICODE_STRING Reserved6;
143 UNICODE_STRING Reserved7;
144 UNICODE_STRING Reserved8;
145 UNICODE_STRING Reserved9;
146 UNICODE_STRING Reserved10;
150 ULONG PrimaryGroupId;
152 [size_is(GroupCount)] PGROUP_MEMBERSHIP GroupIds;
155 UNICODE_STRING Reserved14;
156 UNICODE_STRING Reserved15;
162 [size_is(SidCount)] PKERB_SID_AND_ATTRIBUTES ExtraSids;
163 PSID ResourceGroupDomainSid;
164 ULONG ResourceGroupCount;
165 [size_is(ResourceGroupCount)] PGROUP_MEMBERSHIP
167 } KERB_VALIDATION_INFO;
169 Reserved fields are not defined in this document and are not used in
170 the construction of access control tokens.
172 The fields are defined as follows:
175 Brezak Category - Informational 3
\f
176 Windows 2000 Kerberos Authorization Data October 2002
179 KickOffTime - the time at which the server should forcibly logoff
180 the client. If the client should not be forced off, this
181 field should be set to (0x7fffffff,0xffffffff). If a kickoff
182 time is to be enforced, the service ticket lifetime will
183 never exceed this value.
184 UserId - This field contains the relative Id for the client. If
185 zero, then the User ID is the first SID in the ExtraSids
187 PrimaryGroupId - This field contains the relative ID for this
188 clientÆs primary group.
189 GroupCount - This field contains the number of groups, within the
190 clientÆs domain, to which the client is a member.
191 GroupIds - This field contains an array of the relative Ids and
192 attributes of the groups in the clientÆs domain of which the
194 UserFlags - This field contains information about which fields in
195 this structure are valid. The two bits that may be set are
196 indicated below. Having these flags set indicates that the
197 corresponding fields in the KERB_VALIDATION_INFO structure
198 are present and valid.
200 #define LOGON_EXTRA_SIDS 0x0020
201 #define LOGON_RESOURCE_GROUPS 0x0200
203 LogonDomainId - This field contains the SID of the clientÆs domain.
204 This field is used in conjunction with the UserId,
205 PrimaryGroupId,and GroupIds fields to create the user and
206 group SIDs for the client.
207 SidCount - This field contains the number of SIDs present in the
208 ExtraSids field. This field is only valid if the
209 LOGON_EXTRA_SIDS flag has been set in the UserFlags field.
210 ExtraSids - This field contains a list of SIDs for groups to which
211 the user is a member. This field is only valid if the
212 LOGON_EXTRA_SIDS flag has been set in the UserFlags field.
213 ResouceGroupCount - This field contains the number of resource
214 groups in the ResourceGroupIds field. This field is only
215 valid if the LOGON RESOURCE_GROUPS flag has been set in the
217 ResourceGroupDomainSid - This field contains the SID of the resource
218 domain. This field is used in conjunction with the
219 ResourceGroupIds field to create the group SIDs for the
221 ResourceGroupIds - This field contains an array of the relative Ids
222 and attributes of the groups in the resource domain of which
223 the resource is a member.
225 When used in the KERB_VALIDATION_INFO, this is NDR encoded. The
226 FILETIME type is defined as follows:
228 typedef unsigned int DWORD;
230 typedef struct _FILETIME {
233 Brezak Category - Informational 4
\f
234 Windows 2000 Kerberos Authorization Data October 2002
237 DWORD dwHighDateTime;
240 Times are encoded as the number of 100 nanosecond increments since
241 January 1, 1601, in UTC time.
243 When used in the KERB_VALIDATION_INFO, this is NDR encoded. The
244 UNICODE_STRING structure is defined as:
246 typedef struct _UNICODE_STRING
248 USHORT MaximumLength;
249 [size_is(MaximumLength / 2), length_is((Length) / 2) ]
253 The Length field contains the number of bytes in the string, not
254 including the null terminator, and the MaximumLength field contains
255 the total number of bytes in the buffer containing the string.
257 The GROUP_MEMBERSHIP structure contains the relative ID of a group
258 and the corresponding attributes for the group.
260 typedef struct _GROUP_MEMBERSHIP {
263 } *PGROUP_MEMBERSHIP;
265 The group attributes must be:
267 #define SE_GROUP_MANDATORY (0x00000001L)
268 #define SE_GROUP_ENABLED_BY_DEFAULT (0x00000002L)
269 #define SE_GROUP_ENABLED (0x00000004L)
271 The SID structure is defined as follows:
274 typedef struct _SID_IDENTIFIER_AUTHORITY {
276 } SID_IDENTIFIER_AUTHORITY, *PSID_IDENTIFIER_AUTHORITY;
278 The constant value for the NT Authority is
280 #define SECURITY_NT_AUTHORITY {0,0,0,0,0,5}
282 typedef struct _SID {
284 UCHAR SubAuthorityCount;
285 SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
286 [size_is(SubAuthorityCount)] ULONG SubAuthority[*];
291 Brezak Category - Informational 5
\f
292 Windows 2000 Kerberos Authorization Data October 2002
295 Other authorities are defined in the Microsoft Developer Network
297 The SubAuthorityCount field contains the number of elements in the
298 actual SubAuthority conformant array. The maximum number of
299 subauthorities allowed is 15.
301 The KERB_SID_AND_ATTRIBUTES structure contains entire group SIDs and
302 their corresponding attributes:
304 typedef struct _KERB_SID_AND_ATTRIBUTES {
307 } KERB_SID_AND_ATTRIBUTES, *PKERB_SID_AND_ATTRIBUTES;
309 The attributes are the same as the group attributes defined above.
311 5. Signatures (PAC_SERVER_CHECKSUM and PAC_PRIVSVR_CHECKSUM)
313 The PAC contains two digital signatures: one using the key of the
314 server, and one using the key of the KDC. The signatures are present
315 for two reasons. First, the signature with the serverÆs key is
316 present to prevent a client from generating their own PAC and
317 sending it to the KDC as encrypted authorization data to be included
318 in tickets. Second, the signature with the KDCÆs key is present to
319 prevent an untrusted service from forging a ticket to itself with an
320 invalid PAC. The two signatures are sent in PAC_INFO_BUFFERs of type
321 PAC_SERVER_CHECKSUM and PAC_PRIVSVR_CHECKSUM respectively.
324 The signatures are contained in the following structure:
326 typedef struct _PAC_SIGNATURE_DATA {
329 } PAC_SIGNATURE_DATA, *PPAC_SIGNATURE_DATA;
331 The fields are defined as follows:
333 SignatureType - This field contains the type of checksum used to
334 create a signature. The checksum must be a keyed checksum.
336 Signature - This field consists of an array of bytes containing the
337 checksum data. The length of bytes may be determined by the
338 wrapping PAC_INFO_BUFFER structure.
340 For the serverÆs checksum, the key used to generate the signature
341 should be the same key used to encrypt the ticket. Thus, if the
342 enc_tkt_in_skey option is used, the session key from the serverÆs
343 TGT should be used. The Key used to encrypt ticket granting tickets
344 is used to generate the KDCÆs checksum.
346 The checksums are computed as follows:
349 Brezak Category - Informational 6
\f
350 Windows 2000 Kerberos Authorization Data October 2002
353 1. The complete PAC is built, including space for both checksums
354 2. The data portion of both checksums is zeroed.
355 3. The entire PAC structure is checksummed with the serverÆs key,
356 and the result is stored in the serverÆs checksum structure.
357 4. The serverÆs checksum is then checksummed with the KDC's key.
358 5. The checksum with the KDC key is stored in the KDC's checksum
361 6. PAC Request Pre-Auth Data
363 Normally, the PAC is included in every pre-authenticated ticket
364 received from an AS request. However, a client may also explicitly
365 request either to include or to not include the PAC. This is done by
366 sending the PAC-REQUEST preauth data.
368 This is an ASN.1 encoded structure.
370 KERB-PA-PAC-REQUEST ::= SEQUENCE {
371 include-pac[0] BOOLEAN -- if TRUE, and no pac present,
374 -- PAC present, remove PAC
377 The fields are defined as follows:
379 include-pac - This field indicates whether a PAC should be included
380 or not. If the value is TRUE, a PAC will be included
381 independent of other preauth data. If the value is FALSE,
382 then no PAC will be included, even if other preauth data is
386 #define KRB5_PADATA_PAC_REQUEST 128
388 7. Security Considerations
390 Before the PAC data is used for access control, the
391 PAC_SERVER_CHECKSUM signature MUST be checked. This will verify that
392 the provider of the PAC data knows the server's secret key.
393 Validation of the PAC_PRIVSVR_CHECKSUM is OPTIONAL. It is used to
394 verify that the PAC was issued from the KDC and not placed in the
395 ticket by someone other than the KDC with access to the service key.
397 Caution must be used with accepting the SIDs present in the logon-
398 info part of the PAC. Only SIDs from a domain that is authoritative
399 for a particular domain's SIDs should be used in the construction of
400 access tokens. If a SID is found to be from outside of a domain's
401 authoritative SID namespace, it MUST be ignored for purposes of
407 Brezak Category - Informational 7
\f
408 Windows 2000 Kerberos Authorization Data October 2002
412 1 Kohl, J., Neuman, C., "The Kerberos Network Authentication Service
413 (V5)", RFC 1510, September 1993
415 2 Bradner, S., "Key words for use in RFCs to Indicate Requirement
416 Levels", BCP 14, RFC 2119, March 1997
418 3 Microsoft Developer's Network - http://msdn.microsoft.com
421 9. Author's Addresses
424 Microsoft Corporation
427 Email: jbrezak@microsoft.com
465 Brezak Category - Informational 8
\f
466 Windows 2000 Kerberos Authorization Data October 2002
470 Full Copyright Statement
472 Copyright (C) The Internet Society (1999). All Rights Reserved.
474 This document and translations of it may be copied and furnished to
475 others, and derivative works that comment on or otherwise explain it
476 or assist in its implementation may be prepared, copied, published
477 and distributed, in whole or in part, without restriction of any
478 kind, provided that the above copyright notice and this paragraph
479 are included on all such copies and derivative works. However, this
480 document itself may not be modified in any way, such as by removing
481 the copyright notice or references to the Internet Society or other
482 Internet organizations, except as needed for the purpose of
483 developing Internet standards in which case the procedures for
484 copyrights defined in the Internet Standards process must be
485 followed, or as required to translate it into languages other than
488 The limited permissions granted above are perpetual and will not be
489 revoked by the Internet Society or its successors or assigns.
491 This document and the information contained herein is provided on an
492 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
493 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
494 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
495 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
496 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE."
523 Brezak Category - Informational 9
\f