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_MINIMUM_BYTES_TO_COMPRESS
= 384;
34 CLAIM_TYPE_UINT64
= 2,
35 CLAIM_TYPE_STRING
= 3,
36 CLAIM_TYPE_BOOLEAN
= 6
40 CLAIMS_SOURCE_TYPE_AD
= 1,
41 CLAIMS_SOURCE_TYPE_CERTIFICATE
= 2
45 CLAIMS_COMPRESSION_FORMAT_NONE
= 0,
46 CLAIMS_COMPRESSION_FORMAT_LZNT1
= 2,
47 CLAIMS_COMPRESSION_FORMAT_XPRESS
= 3,
48 CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF
= 4
49 } CLAIMS_COMPRESSION_FORMAT
;
52 [range(1, 10*1024*1024)] uint32 value_count
;
53 [size_is(value_count
)] dlong
*values
;
57 [range(1, 10*1024*1024)] uint32 value_count
;
58 [size_is(value_count
)] hyper *values
;
62 [range(1, 10*1024*1024)] uint32 value_count
;
63 [size_is(value_count
), string, charset
(UTF16
)] wchar_t **values
;
66 typedef [switch_type(CLAIM_TYPE
),nodiscriminant
,flag
(NDR_ALIGN8
)] union {
67 [case(CLAIM_TYPE_INT64
)] CLAIM_INT64 claim_int64
;
68 [case(CLAIM_TYPE_UINT64
)] CLAIM_UINT64 claim_uint64
;
69 [case(CLAIM_TYPE_STRING
)] CLAIM_STRING claim_string
;
70 [case(CLAIM_TYPE_BOOLEAN
)] CLAIM_UINT64 claim_boolean
;
77 [switch_is(type
)] CLAIM_ENTRY_VALUES values
;
81 CLAIMS_SOURCE_TYPE claims_source_type
;
83 [size_is(claims_count
)] CLAIM_ENTRY
*claim_entries
;
87 CLAIMS_SET_METADATA
*metadata
;
88 } CLAIMS_SET_METADATA_CTR
;
94 /* Public structures. */
96 typedef [public] struct {
97 uint32 claims_array_count
;
98 [size_is(claims_array_count
)] CLAIMS_ARRAY
*claims_arrays
;
100 uint32 reserved_field_size
;
101 [size_is(reserved_field_size
)] uint8
*reserved_field
;
104 typedef [public, gensize
] struct {
105 [subcontext
(0xFFFFFC01)] CLAIMS_SET_CTR claims
;
108 typedef [public] struct {
109 [subcontext
(0xFFFFFC01)] CLAIMS_SET_METADATA_CTR claims
;
110 } CLAIMS_SET_METADATA_NDR
;
112 typedef [public] struct {
113 [value
(ndr_claims_compressed_size
(claims_set
,
114 r
->compression_format
,
115 ndr
->flags
))] uint32 claims_set_size
;
117 compression
(ndr_claims_compression_alg
(compression_format
),
119 uncompressed_claims_set_size
)
120 ] CLAIMS_SET_NDR
*claims_set
;
122 * The second argument to
123 * ndr_claims_actual_wire_compression_alg() in the
124 * value() below should be
125 * uncompressed_claims_set_size but the value()
126 * handling isn't recursive (enough) so we have to
127 * specify that manually otherwise the
128 * compression_format in the above includes the struct
129 * member, not the value()
131 * The caller should set compression_format to
132 * CLAIMS_COMPRESSION_FORMAT_XPRESS_HUFF and this will
133 * be reset to CLAIMS_COMPRESSION_FORMAT_NONE if the
134 * buffer is not large enough to compress.
136 * Otherwise setting CLAIMS_COMPRESSION_FORMAT_NONE
137 * disabled compression entirely.
139 [value
(ndr_claims_actual_wire_compression_alg
(r
->compression_format
,
140 ndr_size_CLAIMS_SET_NDR
(claims_set
,
141 ndr
->flags
)))] CLAIMS_COMPRESSION_FORMAT compression_format
;
142 [value
(ndr_size_CLAIMS_SET_NDR
(claims_set
,
143 ndr
->flags
))] uint32 uncompressed_claims_set_size
;
144 uint16 reserved_type
;
145 uint32 reserved_field_size
;
146 [size_is(reserved_field_size
)] uint8
*reserved_field
;
147 } CLAIMS_SET_METADATA
;