This reference covers the APIs for managing role-based access control in Eden-MDBS.
Eden-MDBS uses a hierarchical permission system with five access levels:
| Level | Description |
|---|---|
SuperAdmin | Full control, can modify state data and manage admins |
Admin | Can add/remove Writers and Readers |
Write | Write access to the resource |
Read | Read-only access to the resource |
None | No access |
Get the endpoints accessible by the authenticated user.
GET /api/v1/iam/rbac/endpoints/subjects
Authorization: Bearer <token>curl http://{host}:8000/api/v1/iam/rbac/endpoints/subjects \
-H "Authorization: Bearer $TOKEN"{
"status": "success",
"data": "Admin"
}Grant a subject access to an endpoint.
POST /api/v1/iam/rbac/endpoints/subjects
Content-Type: application/json
Authorization: Bearer <token>| Field | Type | Required | Description |
|---|---|---|---|
subject | string | Yes | User or role identifier |
entity | string | Yes | Endpoint identifier |
access | string | Yes | Access level (Read/Write/Admin) |
curl http://{host}:8000/api/v1/iam/rbac/endpoints/subjects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"subject": "developer@company.com",
"entity": "production_db",
"access": "Read"
}'Get endpoint permissions for a specific subject.
GET /api/v1/iam/rbac/endpoints/subjects/{subject}
Authorization: Bearer <token>curl http://{host}:8000/api/v1/iam/rbac/endpoints/subjects/developer@company.com \
-H "Authorization: Bearer $TOKEN"{
"status": "success",
"data": "Write"
}Remove a subject's endpoint permissions.
DELETE /api/v1/iam/rbac/endpoints/subjects/{subject}
Authorization: Bearer <token>Get all subjects with access to a specific endpoint.
GET /api/v1/iam/rbac/endpoints/{endpoint}
Authorization: Bearer <token>curl http://{host}:8000/api/v1/iam/rbac/endpoints/production_db \
-H "Authorization: Bearer $TOKEN"{
"status": "success",
"data": {
"users": {
"admin@company.com": "SuperAdmin",
"developer@company.com": "Write"
},
"roles": {
"developers": "Read"
}
}
}Remove all permissions for an endpoint.
DELETE /api/v1/iam/rbac/endpoints/{endpoint}
Authorization: Bearer <token>Get the organization-level permission structure.
GET /api/v1/iam/rbac/organizations
Authorization: Bearer <token>Grant a subject access at the organization level.
POST /api/v1/iam/rbac/organizations/subjects
Content-Type: application/json
Authorization: Bearer <token>| Field | Type | Required | Description |
|---|---|---|---|
subject | string | Yes | User or role identifier |
access | string | Yes | Access level |
curl http://{host}:8000/api/v1/iam/rbac/organizations/subjects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"subject": "ops_team",
"access": "Admin"
}'GET /api/v1/iam/rbac/organizations/subjects/{subject}
Authorization: Bearer <token>DELETE /api/v1/iam/rbac/organizations/subjects/{subject}
Authorization: Bearer <token>Remove all permissions at the organization level.
DELETE /api/v1/iam/rbac/organizations
Authorization: Bearer <token>Grant a subject access to templates.
POST /api/v1/iam/rbac/templates/subjects
Content-Type: application/json
Authorization: Bearer <token>curl http://{host}:8000/api/v1/iam/rbac/templates/subjects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"subject": "api_user",
"entity": "get_user_template",
"access": "Read"
}'GET /api/v1/iam/rbac/templates/subjects/{subject}
Authorization: Bearer <token>DELETE /api/v1/iam/rbac/templates/subjects/{subject}
Authorization: Bearer <token>Get all subjects with access to a specific template.
GET /api/v1/iam/rbac/templates/{template}
Authorization: Bearer <token>DELETE /api/v1/iam/rbac/templates/{template}
Authorization: Bearer <token>Grant a subject access to workflows.
POST /api/v1/iam/rbac/workflows/subjects
Content-Type: application/json
Authorization: Bearer <token>curl http://{host}:8000/api/v1/iam/rbac/workflows/subjects \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{
"subject": "automation_user",
"entity": "data_sync_workflow",
"access": "Write"
}'POST /api/v1/iam/rbac/workflows/subjects/{subject}
Authorization: Bearer <token>DELETE /api/v1/iam/rbac/workflows/subjects/{subject}
Authorization: Bearer <token>Get all subjects with access to a specific workflow.
GET /api/v1/iam/rbac/workflows/{workflow}
Authorization: Bearer <token>Get all permissions (across all resource types) for a specific subject.
GET /api/v1/iam/rbac/subjects/{subject}
Authorization: Bearer <token>curl http://{host}:8000/api/v1/iam/rbac/subjects/developer@company.com \
-H "Authorization: Bearer $TOKEN"{
"status": "success",
"data": {
"endpoints": {
"production_db": "Read",
"staging_db": "Write"
},
"templates": {
"get_user": "Read"
},
"workflows": {},
"organizations": {
"my_company": "Read"
}
}
}Remove all permissions for a subject across all resource types.
DELETE /api/v1/iam/rbac/subjects/{subject}
Authorization: Bearer <token>Get all endpoints a subject has access to.
GET /api/v1/iam/rbac/subjects/{subject}/endpoints
Authorization: Bearer <token>Get all organizations a subject has access to.
GET /api/v1/iam/rbac/subjects/{subject}/organizations
Authorization: Bearer <token>Get all templates a subject has access to.
GET /api/v1/iam/rbac/subjects/{subject}/templates
Authorization: Bearer <token>Get all workflows a subject has access to.
GET /api/v1/iam/rbac/subjects/{subject}/workflows
Authorization: Bearer <token>| Operation | Required Access |
|---|---|
| View own permissions | Any |
| View other user permissions | Admin |
| Grant Read access | Admin |
| Grant Write access | Admin |
| Grant Admin access | SuperAdmin |
| Revoke permissions | Admin |
{
"error": "Forbidden",
"message": "Insufficient permissions to perform this action"
}{
"error": "Not Found",
"message": "Subject does not exist"
}{
"error": "Bad Request",
"message": "Invalid access level. Must be one of: SuperAdmin, Admin, Write, Read, None"
}