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).
List of Supported Objects
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 |
services/adaptive-profiling | Grants READ/WRITE permission to the services/adaptive-profiling object | services/adaptive-profiling:read |
services/authentication | Grants READ/WRITE permission to the services/authentication object | services/authentication:read |
services/basic-security | Grants READ/WRITE permission to the services/basic-security object | services/basic-security:read |
services/caching | Grants READ/WRITE permission to the services/caching object | services/caching:read |
services/clickjacking | Grants READ/WRITE permission to the services/clickjacking object | services/clickjacking:read |
services/compression | Grants READ/WRITE permission to the services/compression object | services/compression:read |
services/comment-spam | Grants READ/WRITE permission to the services/comment-spam | services/comment-spam:read services/comment-spam:write |
services/exception-profiling | Grants READ/WRITE permission to the services/exception-profiling object | services/exception-profiling:read |
services/ftp-security | Grants READ/WRITE permission to the services/ftp-security object | services/ftp-security:read |
services/ip-reputation | Grants READ/WRITE permission to the services/ip-reputation object | services/ip-reputation:read |
services/referer-spam | Grants READ/WRITE permission to the services/referer-spam object | services/referer-spam:read services/referer-spam:write |
services/sensitive-parameter-names | Grants READ/WRITE permission to the services/sensitive-parameter-names object | services/sensitive-parameter-names:read |
services/session-tracking | Grants READ/WRITE permission to the services/session-tracking object | services/session-tracking:read |
services/slow-client-attack | Grants READ/WRITE permission to the services/slow-client-attack object | services/slow-client-attack:read |
services/ssl-ocsp | Grants READ/WRITE permission to the services/ssl-ocsp object | services/ssl-ocsp:read |
services/url-encryption | Grants READ/WRITE permission to the services/url-encryption object | services/url-encryption:read |
services/website-profile | Grants READ/WRITE permission to the services/website-profile object | services/website-profile:read |
services | Grants READ/WRITE permission to the services object | services:read |
session-identifiers | Grants READ/WRITE permission to the session-identifiers object | session-identifiers:read |
source-nats | Grants READ/WRITE permission to the source-nats object | source-nats:read |
static-routes | Grants READ/WRITE permission to the static-routes object | static-routes:read |
system/azure-config | Grants READ/WRITE permission to the system/azure-config object | system/azure-config:read |
syslog-servers | Grants READ/WRITE permission to the syslog-servers object | syslog-servers:read |
system/advanced-settings | Grants READ/WRITE permission to the system/advanced-settings object | system/advanced-settings:read |
system/appearance | Grants READ/WRITE permission to the system/appearance object | system/appearance:read |
system/cookies-and-parameters | Grants READ/WRITE permission to the system/cookies-and-parameters object | system/cookies-and-parameters:read |
system/custom-headers | Grants READ/WRITE permission to the system/custom-headers object | system/custom-headers:read |
system/dns | Grants READ/WRITE permission to the system/dns object | system/dns:read |
system/email-notifications | Grants READ/WRITE permission to the system/email-notifications object | system/email-notifications:read |
system/encryption-key | Grants READ/WRITE permission to the system/encryption-key object | system/encryption-key:read |
system/energize-updates | Grants READ/WRITE permission to the system/energize-updates object | system/energize-updates:read |
system/exception- heuristics | Grants READ/WRITE permission to the system/exception- heuristics object | system/exception- heuristics:read |
system/export-log-filters | Grants READ/WRITE permission to the system/export-log-filters object | system/export-log-filters:read |
| Grants READ/WRITE permission to the attack patterns object | system/export-log-settings:read |
system/export-log-settings | Grants READ/WRITE permission to the system/export-log-settings object | system/ftp-access-logs:read |
system/gdpr-compliance | Grants READ/WRITE permission to the system/gdpr-compliance object | system/gdpr-compliance:read |
system/lan-configuration | Grants READ/WRITE permission to the system/lan-configuration object | system/lan-configuration:read |
system/location | Grants READ/WRITE permission to the system/location object | system/location:read |
system/logs-format | Grants READ/WRITE permission to the system/logs-format object | system/logs-format:read |
system/management-configuration | Grants READ/WRITE permission to the system/management-configuration object | system/management-configuration:read |
system/network-configuration | Grants READ/WRITE permission to the system/network-configuration object | system/network-configuration:read |
system/network-hsm | Grants READ/WRITE permission to the system/network-hsm object | system/network-hsm:read |
system/ng-firewall | Grants READ/WRITE permission to the system/ng-firewall object | system/ng-firewall:read |
system/pattern-mode | Grants READ/WRITE permission to the system/pattern-mode object | system/pattern-mode:read |
system/proxy-server | Grants READ/WRITE permission to the system/proxy-server object | system/proxy-server:read |
system/secure-administration | Grants READ/WRITE permission to the system/secure-administration object | system/secure-administration:read system/secure-administration:write |
system/snmp | Grants READ/WRITE permission to the system/snmp object | system/snmp:read |
system/syslog-settings | Grants READ/WRITE permission to the system/syslog-settings object | system/syslog-settings:read |
system/wan-configuration | Grants READ/WRITE permission to the system/wan-configuration object | system/wan-configuration:read |
system/web-interface | Grants READ/WRITE permission to the system/web-interface object | system/web-interface:read |
system | Grants READ/WRITE permission to the system object | system:read |
trap-receivers | Grants READ/WRITE permission to the trap-receivers object | trap-receivers:read |
trusted-ca-certificate | Grants READ/WRITE permission to the trusted-ca-certificate object | trusted-ca-certificate:read |
trusted-host-groups | Grants READ/WRITE permission to the trusted-host-groups object | trusted-host-groups:read |
trusted-hosts | Grants READ/WRITE permission to the trusted-hosts object | trusted-hosts:read |
trusted-server-certificate | Grants READ/WRITE permission to the trusted-server-certificate object | trusted-server-certificate:read |
uploaded-certificate | Grants READ/WRITE permission to the uploaded-certificate object | uploaded-certificate:read |
url-acls | Grants READ/WRITE permission to the url-acls object | url-acls:read |
url-encryption-rules | Grants READ/WRITE permission to the url-encryption-rules object | url-encryption-rules:read |
url-optimizers | Grants READ/WRITE permission to the url-optimizers object | url-optimizers:read |
url-policies | Grants READ/WRITE permission to the url-policies object | url-policies:read |
url-profiles | Grants READ/WRITE permission to the url-profiles object | url-profiles:read |
url-translations | Grants READ/WRITE permission to the url-translations object | url-translations:read |
virtual-interfaces | Grants READ/WRITE permission to the virtual-interfaces object | virtual-interfaces:read |
vlans | Grants READ/WRITE permission to the vlans object | vlans:read |
vsites | Grants READ/WRITE permission to the vsites object | vsites:read |
web-scraping-policies | Grants READ/WRITE permission to the web-scraping-policies object | web-scraping-policies:read |
whitelisted-bots | Grants READ/WRITE permission to the whitelisted-bots object | whitelisted-bots:read |