smbd: add flag NOTIFY_ACTION_DIRLEASE_BREAK for notify_fname()
[samba4-gss.git] / librpc / idl / claims.idl
blob618a620ef87f23280b350517611745c2162e9a2f
1 /*
2 claims
4 claim: An assertion about a security principal
6 From MS-ADTS:
8 For ease of implementation, the full IDL for the data types used for
9 claims is provided
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"),
20 version(1.0),
21 pointer_default(unique),
22 helpstring("Active Directory Claims"),
23 helper("../librpc/ndr/ndr_claims.h")
25 interface claims
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;
33 typedef enum {
34 CLAIM_TYPE_INT64 = 1,
35 CLAIM_TYPE_UINT64 = 2,
36 CLAIM_TYPE_STRING = 3,
37 CLAIM_TYPE_BOOLEAN = 6
38 } CLAIM_TYPE;
40 typedef enum {
41 CLAIMS_SOURCE_TYPE_AD = 1,
42 CLAIMS_SOURCE_TYPE_CERTIFICATE = 2
43 } CLAIMS_SOURCE_TYPE;
45 typedef enum {
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;
52 typedef struct {
53 [range(0, 10*1024*1024)] uint32 value_count;
54 [size_is(value_count)] int64 *values;
55 } CLAIM_INT64;
57 typedef struct {
58 [range(0, 10*1024*1024)] uint32 value_count;
59 [size_is(value_count)] hyper *values;
60 } CLAIM_UINT64;
62 typedef struct {
63 [range(0, 10*1024*1024)] uint32 value_count;
64 [size_is(value_count), string, charset(UTF16)] wchar_t **values;
65 } CLAIM_STRING;
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;
72 [default];
73 } CLAIM_ENTRY_VALUES;
75 typedef struct {
76 CLAIM_ID id;
77 CLAIM_TYPE type;
78 [switch_is(type)] CLAIM_ENTRY_VALUES values;
79 } CLAIM_ENTRY;
81 typedef struct {
82 CLAIMS_SOURCE_TYPE claims_source_type;
83 uint32 claims_count;
84 [size_is(claims_count)] CLAIM_ENTRY *claim_entries;
85 } CLAIMS_ARRAY;
87 typedef struct {
88 CLAIMS_SET_METADATA *metadata;
89 } CLAIMS_SET_METADATA_CTR;
91 typedef struct {
92 CLAIMS_SET *claims;
93 } CLAIMS_SET_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;
103 } CLAIMS_SET;
105 typedef [public, gensize] struct {
106 [subcontext(0xFFFFFC01)] CLAIMS_SET_CTR claims;
107 } CLAIMS_SET_NDR;
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;
117 [subcontext(4),
118 compression(ndr_claims_compression_alg(compression_format),
119 claims_set_size,
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;