Role-Based Access for the Barracuda WAF REST APIs

Role-Based Access for the Barracuda WAF REST APIs

API Privilege

The API Privilege section allows users to access the Barracuda REST APIs. By default the value is set to No. Set the value to Yes if you want permissions to use REST APIs. Using the "administrator-roles" API, you can grant READ/WRITE permissions for specific object(s) that this role may need access to. You can refer to the table List of Supported Objects to know the list of objects supported in the Barracuda REST APIs and their syntax that should be used in the JSON when granting READ/WRITE permissions.

Create a Role and Grant Permission

The example JSON below describes how to create a new role and grant the required permissions to objects the role is accessing.

 [POST] http:///<WAF-IP/WAF-Domain>:8000/restapi/v3/administrator-roles (Authorization) => Basic Auth a) username => {{token}} [ensure that the token ends with a colon ':'] (Body) => raw JSON(application/json) Inputs - ------ { "name": "sample_role", "services": [ "_ALL:read" ], "security-policies": [ "_ALL_:read" ], "service-groups": [ "_ALL_:read" ], "vsites": [ "_ALL_:read" ], "operations": [ "certificate-management" ], "objects":[ "services:read", "security-policies:read", "url-profiles:read" ] }

URL: /v3/administrator-roles

Method: POST

Description: Creates a new role and grants READ/WRITE permissions to the object the role is accessing

Parameter Name

Data Type

Mandatory

Description

Input Parameters:

 

 

 

name

Alphanumeric

Yes

A name for the role.

services

Alphanumeric

Conditional

Grants permission to all the services configured in the Barracuda Web Application Firewall.

"_ALL: read" will grant READ permission to all the services created in Barracuda WAF.

security-policies

Alphanumeric

Conditional

Grants permission to all the security policies configured in the Barracuda Web Application Firewall.

"_ALL: read" will grant READ permission to all the security policies created in Barracuda WAF.

service-groups

Alphanumeric

Conditional

Grants permission to all the service groups configured in the Barracuda Web Application Firewall.

"_ALL_:read" will grant READ permission to all the service groups created in Barracuda WAF.

Vsites

Alphanumeric

Conditional

Grants permission to all the Vsites configured in the Barracuda Web Application Firewall.

"_ALL_:read" will grant READ permission to all the Vsites created in Barracuda WAF.

operations

Alphanumeric

Conditional

Grants permission to all the operations configured in the Barracuda Web Application Firewall.

"_ALL_:read" will grant READ permission to all the operations created in Barracuda WAF.

objects

Alphanumeric

Conditional

Grants permission to the generic objects specified.

"services:read" will grant READ permission to the (generic) services object.

RBA differences in UI vs API

  1. For editing a sub-resource the user role needs the following:

    1. A WRITE permission on that sub-resource and at least a READ permission on its object.

  2. Any custom role should have at least a READ permission on the service the role wants in order to view access or firewall logs.

  3. If a user is creating/adding/editing a new object from the UI, the user role needs to have the following:

    1. A WRITE access directly on that object. 

    2. Accessibility (either READ/WRITE) to its parent object.

    3. A WRITE permission on that tab/screen that the role is creating the object from.

  4. Granting permissions to an object from the Administrator-Roles API will automatically grant the same permission for the dependent screen(s) of that object and vice-versa (when done from the UI).


We value your feedback.
If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
For general product inquiries or technical support, please contact the global Barracuda Support team.