Eden-MDBS provides fine-grained access control for resources like endpoints, templates, workflows, and organizations. RBAC allows you to control who can access what resources and what operations they can perform.
Eden uses a four-tier hierarchical access level system:
| Level | Description |
|---|---|
| Read | View and query resources |
| Write | Read permissions plus modify data |
| Admin | Write permissions plus manage users and configurations |
| SuperAdmin | Full control including other admin management |
Each level includes all permissions from lower levels. For example, Write includes Read permissions.
RBAC applies to these resource types:
| Resource | Description |
|---|---|
| Organizations | Top-level access control for the entire organization |
| Endpoints | Database and service connections |
| Templates | Reusable query templates |
| Workflows | Automated multi-step operations |
View all subjects and their access levels for an endpoint:
curl http://{host}:8000/api/v1/iam/control/endpoints/my_database \
-H "Authorization: Bearer $TOKEN"Response:
{
"status": "success",
"data": {
"users": {
"user1@company.com": "Read",
"user2@company.com": "Write",
"admin@company.com": "Admin"
}
}
}Set the exact control-plane grant for one subject:
curl http://{host}:8000/api/v1/iam/control/endpoints/my_database/subjects/john@company.com \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT \
-d '{"perms":"R"}'Check a user's access level for an endpoint:
curl http://{host}:8000/api/v1/iam/control/endpoints/my_database/subjects/john@company.com \
-H "Authorization: Bearer $TOKEN"Response:
{
"status": "success",
"data": "Read"
}Users can check their resolved control-plane and data-plane access without Admin access:
curl http://{host}:8000/api/v1/iam/access/endpoints/my_database \
-H "Authorization: Bearer $TOKEN"Response:
{
"status": "success",
"data_plane": {
"mode": "shared_rbac",
"shared_perms": "r",
"els_assignment": null
}
}Revoke a user's access:
curl http://{host}:8000/api/v1/iam/control/endpoints/my_database/subjects/john@company.com \
-H "Authorization: Bearer $TOKEN" \
-X DELETEResponse:
{
"status": "success",
"data": "Read"
}The response shows the access level that was removed.
Remove all permissions for an endpoint (SuperAdmin only):
curl http://{host}:8000/api/v1/iam/control/endpoints/my_database \
-H "Authorization: Bearer $TOKEN" \
-X DELETEcurl http://{host}:8000/api/v1/iam/control/organizations \
-H "Authorization: Bearer $TOKEN"Response:
{
"status": "success",
"data": {
"users": {
"admin@company.com": "SuperAdmin",
"manager@company.com": "Admin",
"developer@company.com": "Write",
"viewer@company.com": "Read"
}
}
}curl http://{host}:8000/api/v1/iam/control/organizations/subjects/newadmin@company.com \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT \
-d '{"perms":"RCPGA"}'View all resources a user has access to:
curl http://{host}:8000/api/v1/iam/control/subjects/john@company.com \
-H "Authorization: Bearer $TOKEN"Response:
{
"status": "success",
"data": {
"organizations": {
"550e8400-e29b-41d4-a716-446655440000": "Admin"
},
"endpoints": {
"550e8400-e29b-41d4-a716-446655440001": "Write",
"550e8400-e29b-41d4-a716-446655440002": "Read"
},
"templates": {
"550e8400-e29b-41d4-a716-446655440003": "Admin"
},
"workflows": {}
}
}curl http://{host}:8000/api/v1/iam/control/organizations/subjects/john@company.com \
-H "Authorization: Bearer $TOKEN" \
-X DELETETo manage RBAC permissions, you need sufficient access:
| Operation | Required Access |
|---|---|
| View RBAC Info | Admin |
| Add Subjects | Equal to or higher than the level being granted |
| Remove Subjects | Equal to or higher than the level being removed |
| Delete All Permissions | SuperAdmin |
When setting a control-plane or data-plane grant, use this format:
{
"perms": "PERMS1"
}Single User:
{
"perms": "R"
}Endpoint Data-Plane Grant:
{
"perms": "rw"
}Use one PUT request per subject and use DELETE to revoke the exact grant.
Mixed Subject Identifiers:
{
"perms": "RCA"
}Organization-level permissions provide base access, while resource-specific permissions can override them:
A user with organization-level Write access:
{
"error": "Forbidden",
"message": "Insufficient access level to grant Admin permissions"
}{
"error": "Not Found",
"message": "User john@company.com not found in organization"
}{
"error": "Not Found",
"message": "Endpoint my_database not found"
}{
"error": "Bad Request",
"message": "Invalid access level: InvalidLevel"
}