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
For editing a sub-resource the user role needs the following:
A WRITE permission on that sub-resource and at least a READ permission on its object.
Any custom role should have at least a READ permission on the service the role wants in order to view access or firewall logs.
If a user is creating/adding/editing a new object from the UI, the user role needs to have the following:
A WRITE access directly on that object.
Accessibility (either READ/WRITE) to its parent object.
A WRITE permission on that tab/screen that the role is creating the object from.
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).
The predefined/factory shipped roles other than "Admin" do not have API Privilege.
List of Supported Objects
The following table provides a list of objects supported in the Barracuda REST APIs and their syntax that should be used in the JSON when granting READ/WRITE permissions.
Object | Description | Syntax used |
|---|---|---|
_ALL_ | Grants READ/WRITE permission to all objects | _ALL_:read |
access-rules | Grants READ/WRITE permission to the access-rules Object | access-rules:read |
access-policies | Grants READ/WRITE permission to the access-policies object | access-policies:read |
adaptive-profiling-rules | Grants READ/WRITE permission to the adaptive-profiling-rules object | adaptive-profiling-rules:read |
admin-ip-range | Grants READ/WRITE permission to the admin-ip-range object | admin-ip-range:read |
allow-deny-clients | Grants READ/WRITE permission to the allow-deny-clients object | allow-deny-clients:read |
attack-patterns | Grants READ/WRITE permission to the attack -patterns object | attack-patterns:read |
attack-types | Grants READ/WRITE permission to the attack- types object | attack-types:read |
authorization-policies | Grants READ/WRITE permission to the authorization-policies object | authorization-policies:read |
auto-system-acls | Grants READ/WRITE permission to the auto-system-acls object | auto-system-acls:read auto-system-acls:write |
backup | Grants READ/WRITE permission to the backup object | backup:read |
bonds | Grants READ/WRITE permission to the bonds patterns object | bonds:read bonds:write |
client-certificate-crl | Grants READ/WRITE permission to the client- certificate-crls object | client-certificate-crls:read client-certificate-crls:write |
cluster/nodes | Grants READ/WRITE permission to the cluster/nodes object | cluster/nodes:read cluster/nodes:write |
Cluster | Grants READ/WRITE permission to the cluster object | cluster:read cluster:write |
Created-certificates | Grants READ/WRITE permission to created-certificate object | created-certificate:read |
Credential servers | Grants READ/WRITE permission to the credential-servers object | credential-servers:read |
custom --parameter classes | Grants READ/WRITE permission to the custom-parameter-classes object | custom-parameter-classes:read |
ddos-policies | Grants READ/WRITE permission to the ddos-policies object | ddos-policies:read |
destination-nats | Grants READ/WRITE permission to the destination-nats object | destination-nats:read |
geo-pools | Grants READ/WRITE permission to the geo-pools object | geo-pools:read |
geoip-allowed-networks | Grants READ/WRITE permission to the geoip-allowed-networks object | geoip-allowed-networks:read |
geoip-blocked-networks | Grants READ/WRITE permission to the geoip-blocked-networks object | geoip-blocked-networks:read |
global-acls | Grants READ/WRITE permission to the global-acls object | global-acls:read |
header-acls | Grants READ/WRITE permission to the header-acls object | header-acls:read |
http-request-rewrite-rules | Grants READ/WRITE permission to the http-request-rewrite-rules object | http-request-rewrite-rules:read |
http-response-rewrite-rules | Grants READ/WRITE permission to the http-response-rewrite-rules object | http-response-rewrite-rules:read |
identity-theft-patterns | Grants READ/WRITE permission to the identity-theft-patterns object | identity-theft-patterns:read |
identity-types | Grants READ/WRITE permission to the identity-types object | identity-types:read |
input-patterns | Grants READ/WRITE permission to the input-patterns object | input-patterns:read |
input-types | Grants READ/WRITE permission to the input-types object | input-types:read |
interface-routes | Grants READ/WRITE permission to the interface-routes object | interface-routes:read |
| Grants READ/WRITE permission to the attack patterns object | internal-attack-patterns:read
|
json-profiles | Grants READ/WRITE permission to the json-profiles object | json-profiles:read |
json-security-policies | Grants READ/WRITE permission to the json-security-policies object | json-security-policies:read |
kerberos-services | Grants READ/WRITE permission to the kerberos-services object | kerberos-services:read |
ldap-services | Grants READ/WRITE permission to the ldap-services object | ldap-services:read |
local-groups | Grants READ/WRITE permission to the local-groups object | local-groups:read |
local-hosts | Grants READ/WRITE permission to the local-hosts object | local-hosts:read |
local-users | Grants READ/WRITE permission to the local-users object | local-users:read |
module-log-levels | Grants READ/WRITE permission to module-log-levels object | module-log-levels:read |
network-acls | Grants READ/WRITE permission to the network-acls object | network-acls:read |
network-interfaces | Grants READ/WRITE permission to the network-interface object | network-interfaces:read |
nodes | Grants READ/WRITE permission to the nodes object | nodes:read |
ntp-servers | Grants READ/WRITE permission to the ntp-servers object | ntp-servers:read |
parameter-optimizers | Grants READ/WRITE permission to the parameter-optimizers object | parameter-optimizers:read |
parameter-profiles | Grants READ/WRITE permission to the parameter-profiles object | parameter-profiles:read |
preferred-clients | Grants READ/WRITE permission to preferred-clients object | preferred-clients:read |
protected-data-types | Grants READ/WRITE permission to the protected-data-types object | protected-data-types:read |
radius-services | Grants READ/WRITE permission to the radius-services object | radius-services:read |
rate-control-pools | Grants READ/WRITE permission to rate-control-pools object | rate-control-pools:read |
reports | Grants READ/WRITE permission to the reports object | reports:read |
response-body-rewrite-rules | Grants READ/WRITE permission to the response-body-rewrite-rules object | response-body-rewrite-rules:read |
response-pages | Grants READ/WRITE permission to the response-pages object | response-pages:read |
rsa-securid-services | Grants READ/WRITE permission to the rsa-securid-services object | rsa-securid-services:read |
saml-services | Grants READ/WRITE permission to the saml-services object | saml-services:read |
secure-browsing-policies | Grants READ/WRITE permission to the secure-browsing-policies object | secure-browsing-policies:read |
security-policies/cloaking | Grants READ/WRITE permission to the security-policies/cloaking object | security-policies/cloaking:read |
security-policies/cookie-security | Grants READ/WRITE permission to the security-policies/cookie-security object | security-policies/cookie-security:read |
security-policies/parameter-protection | Grants READ/WRITE permission to the security-policies/parameter-protection object | security-policies/parameter-protection:read |
security-policies/request-limits | Grants READ/WRITE permission to the security-policies/request-limits object | security-policies/request-limits:read |
security-policies/url-normalization | Grants READ/WRITE permission to the security-policies/url-normalization object | security-policies/url-normalization:read |
security-policies/url-protection | Grants READ/WRITE permission to the security-policies/url-protection object | security-policies/url-protection:read |
security-policies | Grants READ/WRITE permission to the security-policies object | security-policies:read |
service-groups | Grants READ/WRITE permission to the service-groups object | service-groups:read service-groups:write |
Contact Us
Barracuda Campus
Barracuda Support