Resources | oam | localAuth | rule-list | rule

rule

One access control rule. Rules are processed in user-defined order until a match is found. A rule matches if 'module-name', 'rule-type', and 'access-operations' match the request. If a rule matches, the 'action' leaf determines if access is granted or not.

Configuration

ParameterPresenceTypeDefaultDescription
nameMstringArbitrary name assigned to the rule.
module-nameOunion*Name of the module associated with this rule. This leaf matches if it has the value '*' or if the object being accessed is defined in the module with the specified module name.
access-operationsOunion*Access operations associated with this rule. This leaf matches if it has the value '*' or if the bit corresponding to the requested operation is set.
actionMenumerationThe access control action associated with the rule. If a rule is determined to match a particular request, then this object is used to determine whether to permit or deny the request.
commentOstringA textual description of the access rule.
contextOunion*This leaf matches if it has the value '*' or if its value identifies the agent that is requesting access, e.g. 'netconf' for NETCONF, 'cli' for CLI, or 'webui' for Web UI.
RESTCONF API: GET Example

curl -kisu 'admin:secret' -X GET https://{SBX-SERVER}/restconf/data/sonusOrca:oam/localAuth/rule-list={name}/rule={name}

RESTCONF API: POST Example

curl -kisu 'admin:secret' -X POST -H 'Content-Type: application/yang-data+xml' https://{SBX-SERVER}/restconf/data/sonusOrca:oam/localAuth/rule-list={name} --data '
<rule>
     <name>{name}</name>
     <action>{action}</action>
</rule>
'

RESTCONF API: DELETE Example

curl -kisu 'admin:secret' -X DELETE https://{SBX-SERVER}/restconf/data/sonusOrca:oam/localAuth/rule-list={name}/rule={name}

  • No labels