]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
claims.idl: add some helper structs for claims transformation [MS-CTA]
authorStefan Metzmacher <metze@samba.org>
Mon, 3 Feb 2025 12:56:54 +0000 (13:56 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 14 Feb 2025 10:58:40 +0000 (10:58 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
librpc/idl/claims.idl
librpc/ndr/ndr_claims.c

index 618a620ef87f23280b350517611745c2162e9a2f..c81d4718ce0976e3e27db5f50804e2114054bb23 100644 (file)
@@ -146,4 +146,58 @@ interface claims
                uint32 reserved_field_size;
                [size_is(reserved_field_size)] uint8 *reserved_field;
        } CLAIMS_SET_METADATA;
+
+       typedef [nopush,nopull] enum {
+               CLAIMS_TF_CONDITION_OPERATOR_INVALID = 0,
+               CLAIMS_TF_CONDITION_OPERATOR_EQ = 1,
+               CLAIMS_TF_CONDITION_OPERATOR_NEQ = 2,
+               CLAIMS_TF_CONDITION_OPERATOR_REGEXP_MATCH = 3,
+               CLAIMS_TF_CONDITION_OPERATOR_REGEXP_NOT_MATCH = 4
+       } claims_tf_condition_operator;
+
+       typedef [nopush,nopull] enum {
+               CLAIMS_TF_PROPERTY_INVALID = 0,
+               CLAIMS_TF_PROPERTY_TYPE = 1,
+               CLAIMS_TF_PROPERTY_VALUE = 2,
+               CLAIMS_TF_PROPERTY_VALUE_TYPE = 3
+       } claims_tf_property_enum;
+
+       typedef [nopush,nopull] struct {
+               claims_tf_property_enum property;
+               claims_tf_condition_operator operator;
+               [ref,string, charset(UTF8)] char *string;
+       } claims_tf_condition;
+
+       typedef [nopush,nopull] struct {
+               [unique, string, charset(UTF8)] char *opt_identifier;
+               uint32 num_conditions;
+               claims_tf_condition conditions[num_conditions];
+       } claims_tf_condition_set;
+
+       typedef [nopush,nopull] struct claims_tf_property_ref {
+               [unique, string, charset(UTF8)] char *identifier;
+               claims_tf_property_enum property;
+       } claims_tf_property_ref;
+
+       typedef [nopush,nopull] struct claims_tf_property {
+               claims_tf_property_ref ref;
+               [unique, string, charset(UTF8)] char *string;
+       } claims_tf_property;
+
+       typedef [nopush,nopull] struct {
+               claims_tf_property type;
+               claims_tf_property value;
+               claims_tf_property value_type;
+       } claims_tf_rule_action;
+
+       typedef [nopush,nopull] struct claims_tf_rule {
+               uint32 num_condition_sets;
+               claims_tf_condition_set condition_sets[num_condition_sets];
+               claims_tf_rule_action action;
+       } claims_tf_rule;
+
+       typedef [public,nopush,nopull] struct {
+               uint32 num_rules;
+               claims_tf_rule rules[num_rules];
+       } claims_tf_rule_set;
 }
index 961262692132aaf7d9329c5e4ae8d4a24af3a357..bb77cf38a5b0c398c2427280b09ecbc96374a8f0 100644 (file)
@@ -88,3 +88,15 @@ size_t ndr_claims_compressed_size(struct CLAIMS_SET_NDR *claims_set,
                return 0;
        }
 }
+
+_PUBLIC_ enum ndr_err_code ndr_push_claims_tf_rule_set(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct claims_tf_rule_set *r)
+{
+       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER,
+                             "ndr_push_claims_tf_rule_set() not implemented");
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_claims_tf_rule_set(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct claims_tf_rule_set *r)
+{
+       return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER,
+                             "ndr_pull_claims_tf_rule_set() not implemented");
+}