Skip to content

RBAC Certificate Management Role

Create a custom RBAC role that restricts a user to only managing SSL/TLS certificates and certificate chains across all namespaces. This guide uses JSON payloads and curl commands for the complete workflow.

F5 XC RBAC uses a layered model:

  1. API Group Elements — individual API path + method combinations
  2. API Groups — collections of API group elements
  3. Roles — reference one or more API groups
  4. User Assignment — bind a role to a user
  • API token with admin privileges (to create RBAC objects)
  • Access to the system namespace

Set environment variables used throughout this guide:

Terminal window
export F5XC_API_URL="https://<tenant>.console.ves.volterra.io"
export F5XC_API_TOKEN="<your-api-token>"

Each element defines an HTTP method and path regex. Create one element per API operation you want to allow.

Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/api_group_elements" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-create",
"namespace": "system"
},
"spec": {
"methods": ["POST"],
"path_regex": "^/api/config/namespaces/[^/]+/certificates$"
}
}'
Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/api_group_elements" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-replace",
"namespace": "system"
},
"spec": {
"methods": ["PUT"],
"path_regex": "^/api/config/namespaces/[^/]+/certificates/[^/]+$"
}
}'
Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/api_group_elements" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-chain-create",
"namespace": "system"
},
"spec": {
"methods": ["POST"],
"path_regex": "^/api/config/namespaces/[^/]+/certificate_chains$"
}
}'
Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/api_group_elements" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-chain-replace",
"namespace": "system"
},
"spec": {
"methods": ["PUT"],
"path_regex": "^/api/config/namespaces/[^/]+/certificate_chains/[^/]+$"
}
}'

Allows the user to view certificates in the console UI:

Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/api_group_elements" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-list",
"namespace": "system"
},
"spec": {
"methods": ["GET"],
"path_regex": "^/api/config/namespaces/[^/]+/certificates(/[^/]+)?$"
}
}'
Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/api_group_elements" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-chain-list",
"namespace": "system"
},
"spec": {
"methods": ["GET"],
"path_regex": "^/api/config/namespaces/[^/]+/certificate_chains(/[^/]+)?$"
}
}'

Use the MCP server to list API group elements:

Tool: f5xc-api-api-api-group-element-list
Input: { "namespace": "system" }

Or with curl:

Terminal window
curl -s "${F5XC_API_URL}/api/web/namespaces/system/api_group_elements" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" | jq '.items[] | select(.name | startswith("example-"))'

Group the elements into a single API group:

Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/api_groups" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-management-group",
"namespace": "system"
},
"spec": {
"elements": [
{
"name": "example-cert-create",
"namespace": "system",
"kind": "api_group_element"
},
{
"name": "example-cert-replace",
"namespace": "system",
"kind": "api_group_element"
},
{
"name": "example-cert-chain-create",
"namespace": "system",
"kind": "api_group_element"
},
{
"name": "example-cert-chain-replace",
"namespace": "system",
"kind": "api_group_element"
},
{
"name": "example-cert-list",
"namespace": "system",
"kind": "api_group_element"
},
{
"name": "example-cert-chain-list",
"namespace": "system",
"kind": "api_group_element"
}
]
}
}'
Tool: f5xc-api-api-api-group-get
Input: { "namespace": "system", "name": "example-cert-management-group" }

Create a role that references the API group. This step can use the MCP server:

Tool: f5xc-api-tenantandidentity-role-create
Input: {
"namespace": "system",
"name": "example-cert-uploader",
"body": {
"metadata": {
"name": "example-cert-uploader",
"namespace": "system"
},
"spec": {
"api_groups": [
{
"name": "example-cert-management-group",
"namespace": "system",
"kind": "api_group"
}
]
}
}
}

Or with curl:

Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/roles" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"name": "example-cert-uploader",
"namespace": "system"
},
"spec": {
"api_groups": [
{
"name": "example-cert-management-group",
"namespace": "system",
"kind": "api_group"
}
]
}
}'

Bind the role to a user. This step can also use the MCP server:

Tool: f5xc-api-tenantandidentity-role-user-create
Input: {
"namespace": "system",
"body": {
"namespace": "system",
"user": "user@example.com",
"role": "example-cert-uploader"
}
}

Or with curl:

Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/users/roles" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"namespace": "system",
"user": "user@example.com",
"role": "example-cert-uploader"
}'

Test that the role grants the expected permissions using the evaluate API access endpoint:

Tool: f5xc-api-tenantandidentity-evaluate-api-acces-create
Input: {
"namespace": "system",
"body": {
"namespace": "system",
"user": "user@example.com",
"method": "POST",
"path": "/api/config/namespaces/production/certificates"
}
}

Or with curl:

Terminal window
curl -s -X POST \
"${F5XC_API_URL}/api/web/namespaces/system/evaluate/api_access" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"namespace": "system",
"user": "user@example.com",
"method": "POST",
"path": "/api/config/namespaces/production/certificates"
}'

Verify that access is allowed for certificate paths and denied for unrelated paths (e.g., /api/config/namespaces/production/http_loadbalancers).

ElementMethodsPath Regex
example-cert-createPOST^/api/config/namespaces/[^/]+/certificates$
example-cert-replacePUT^/api/config/namespaces/[^/]+/certificates/[^/]+$
example-cert-chain-createPOST^/api/config/namespaces/[^/]+/certificate_chains$
example-cert-chain-replacePUT^/api/config/namespaces/[^/]+/certificate_chains/[^/]+$
example-cert-listGET^/api/config/namespaces/[^/]+/certificates(/[^/]+)?$
example-cert-chain-listGET^/api/config/namespaces/[^/]+/certificate_chains(/[^/]+)?$

The [^/]+ pattern matches any namespace name. To restrict to a specific namespace, replace it with the namespace name (e.g., production).

Delete objects in reverse order of creation:

Terminal window
# Remove role assignment
curl -s -X DELETE \
"${F5XC_API_URL}/api/web/namespaces/system/users/roles" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{ "namespace": "system", "user": "user@example.com", "role": "example-cert-uploader" }'
# Delete role
curl -s -X DELETE \
"${F5XC_API_URL}/api/web/namespaces/system/roles/example-cert-uploader" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}"
# Delete API group
curl -s -X DELETE \
"${F5XC_API_URL}/api/web/namespaces/system/api_groups/example-cert-management-group" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}"
# Delete API group elements
for name in example-cert-create example-cert-replace \
example-cert-chain-create example-cert-chain-replace \
example-cert-list example-cert-chain-list; do
curl -s -X DELETE \
"${F5XC_API_URL}/api/web/namespaces/system/api_group_elements/${name}" \
-H "Authorization: APIToken ${F5XC_API_TOKEN}"
done
StepOperationMCP Tool Available
1Create API group elementsNo — use curl
2Create API groupNo — use curl
3Create roleYes — f5xc-api-tenantandidentity-role-create
4Assign role to userYes — f5xc-api-tenantandidentity-role-user-create
5Verify accessYes — f5xc-api-tenantandidentity-evaluate-api-acces-create
List/get API group elementsYes — f5xc-api-api-api-group-element-list/get
List/get API groupsYes — f5xc-api-api-api-group-list/get

Once the upstream spec adds CRUD for API group elements and API groups (f5xc-api-fixed#110), the MCP server will support the full RBAC workflow natively.