Hello,
I need some more input. I’m creating NACM rules so that a group has access to inner-list{1-1} and inner-list{1-2} and NO access to any other element in inner-list (not even read access.
NACM rules for the same is as below to allow access to 1-1, 1-2
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}/0
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}/0/508857660 = 1323346008,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}/action = permit,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}/path = /access-list[id='1']/inner-list[in-id=1-1'],
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}/'module-name' = test_m,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}/'access-operations' = create
read update delete exec,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule}/tacm:context = *,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}/0
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}/0/508857660 = 1323346008,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}/action = permit,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}/path = /access-list[id='1']/inner-[in_id='1-2'],
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}/'module-name' = test_m,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}/'access-operations' = create read update delete exec,
/nacm:nacm/'rule-list'{test_role}/rule{test_rule-6541230789-1}/tacm:context = *,
Below rule to disable access to all other list elements.
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}/0
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}/0/508857660 = 1323346008,
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}/action = deny,
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}/path = /access-list/,
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}/'module-name' = test_m,
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}/'access-operations' = create read update delete exec,
/nacm:nacm/'rule-list'{test_role}/rule{deny_all_ports}/tacm:context = *,
This is working fine.
I’ve another data model that is path ref to above inner-list.
list test {
key "name";
uses test-params;
}
grouping test-params{
leaf name {
type string;
mandatory true;
}
leaf-list testlist{
type leafref {
path "/access-list/inner-list/in-id";
}
}
}
same group has access to list test also.
My expectation here is that since this group has access to only in-id 1-1 and 1-2, so, for /test/newlist also, it will have access to in-id as 1-1 & 1-2.
But I see that /test/newlist has access to all the possible in-id values (not just 1-1, 1-2).
Am I missing some rule? I was assuming that since this group can only read 1-1 and 1-2 directly, so, same read permission should work for any other data model this group may have using inner-list indirectly (using path ref.
Thanks,
Manish