I would like to restrict the access of a list element if one of its non-key parameter has a specific value. Is this possible with NACM rules?
I tried with the following aaa config and it wasn’t worked for me.
Example aaa config part:
<rule>
<name>deny-list-elem</name>
<path>/list/list-elem[non-key-param='restricted']</path>
<access-operations>create read update delete</access-operations>
<action>deny</action>
</rule>
<rule>
<name>list-elem</name>
<path>/list/list-elem/path>
<access-operations>create read update delete</access-operations>
<action>permit</action>
</rule>
Corresponding YANG part:
container list {
list list-elem {
key key-param;
leaf key-param {
type string;
}
leaf non-key-param {
type enumeration {
enum allowed;
enum restricted;
}
}
}
}