4 claim: An assertion about a security principal
8 For ease of implementation, the full IDL for the data types used for
11 The below was initially obtained from MS-ADTS which is
12 Copyright © 2022 Microsoft Corporation as permitted
13 by the Open Specifications terms reproduced in IDL_LICENCE.txt
16 #include
"idl_types.h"
19 uuid("bba9cb76-eb0c-462c-aa1b-5d8c34415701"),
21 pointer_default(unique),
22 helpstring("Active Directory Claims"),
23 helper
("../librpc/ndr/ndr_claims.h")
27 #define
wchar_t uint16
28 #define CLAIM_ID
[string, charset
(UTF16
)] wchar_t *
30 const int CLAIM_LOWER_COMPRESSION_THRESHOLD
= 368;
31 const int CLAIM_UPPER_COMPRESSION_THRESHOLD
= 384;
35 CLAIM_TYPE_UINT64
= 2,
36 CLAIM_TYPE_STRING
= 3,
37 CLAIM_TYPE_BOOLEAN
= 6
41 CLAIMS_SOURCE_TYPE_AD
= 1,
42 CLAIMS_SOURCE_TYPE_CERTIFICATE
= 2
46 CLAIMS_COMPRESSION_FORMAT_NONE
= 0,
47 CLAIMS_COMPRESSION_FORMAT_LZNT1
= 2,
48 CLAIMS_COMPRESSION_FORMAT_XPRESS
= 3,
49 CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF
= 4
50 } CLAIMS_COMPRESSION_FORMAT
;
53 [range(0, 10*1024*1024)] uint32 value_count
;
54 [size_is(value_count
)] int64
*values
;
58 [range(0, 10*1024*1024)] uint32 value_count
;
59 [size_is(value_count
)] hyper *values
;
63 [range(0, 10*1024*1024)] uint32 value_count
;
64 [size_is(value_count
), string, charset
(UTF16
)] wchar_t **values
;
67 typedef [switch_type(CLAIM_TYPE
),flag
(NDR_ALIGN8
)] union {
68 [case(CLAIM_TYPE_INT64
)] CLAIM_INT64 claim_int64
;
69 [case(CLAIM_TYPE_UINT64
)] CLAIM_UINT64 claim_uint64
;
70 [case(CLAIM_TYPE_STRING
)] CLAIM_STRING claim_string
;
71 [case(CLAIM_TYPE_BOOLEAN
)] CLAIM_UINT64 claim_boolean
;
78 [switch_is(type
)] CLAIM_ENTRY_VALUES values
;
82 CLAIMS_SOURCE_TYPE claims_source_type
;
84 [size_is(claims_count
)] CLAIM_ENTRY
*claim_entries
;
88 CLAIMS_SET_METADATA
*metadata
;
89 } CLAIMS_SET_METADATA_CTR
;
95 /* Public structures. */
97 typedef [public] struct {
98 uint32 claims_array_count
;
99 [size_is(claims_array_count
)] CLAIMS_ARRAY
*claims_arrays
;
100 uint16 reserved_type
;
101 uint32 reserved_field_size
;
102 [size_is(reserved_field_size
)] uint8
*reserved_field
;
105 typedef [public, gensize
] struct {
106 [subcontext
(0xFFFFFC01)] CLAIMS_SET_CTR claims
;
109 typedef [public] struct {
110 [subcontext
(0xFFFFFC01)] CLAIMS_SET_METADATA_CTR claims
;
111 } CLAIMS_SET_METADATA_NDR
;
113 typedef [public] struct {
114 [value
(ndr_claims_compressed_size
(claims_set
,
115 r
->compression_format
,
116 ndr
->flags
))] uint32 claims_set_size
;
118 compression
(ndr_claims_compression_alg
(compression_format
),
120 uncompressed_claims_set_size
)
121 ] CLAIMS_SET_NDR
*claims_set
;
123 * The second argument to
124 * ndr_claims_actual_wire_compression_alg() in the
125 * value() below should be
126 * uncompressed_claims_set_size but the value()
127 * handling isn't recursive (enough) so we have to
128 * specify that manually otherwise the
129 * compression_format in the above includes the struct
130 * member, not the value()
132 * The caller should set compression_format to
133 * CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF and this will
134 * be reset to CLAIMS_COMPRESSION_FORMAT_NONE if the
135 * buffer is not large enough to compress.
137 * Otherwise setting CLAIMS_COMPRESSION_FORMAT_NONE
138 * disabled compression entirely.
140 [value
(ndr_claims_actual_wire_compression_alg
(r
->compression_format
,
141 ndr_size_CLAIMS_SET_NDR
(claims_set
,
142 ndr
->flags
)))] CLAIMS_COMPRESSION_FORMAT compression_format
;
143 [value
(ndr_size_CLAIMS_SET_NDR
(claims_set
,
144 ndr
->flags
))] uint32 uncompressed_claims_set_size
;
145 uint16 reserved_type
;
146 uint32 reserved_field_size
;
147 [size_is(reserved_field_size
)] uint8
*reserved_field
;
148 } CLAIMS_SET_METADATA
;