If role-based access control (RBAC) is enabled in the Arango Contextual Data Platform, the File Manager checks a permission for every request, except for the health check. The permission is an action on a resource, and which resource depends on the kind of file:

  • RAG input files belong to a database. They are checked on the database in the request path, for example, ai:filemanager.file.read on ai:database:sales for GET /_db/sales/rag-input.
  • Packages of the Container Manager (/global/byoc/...) are not bound to a database. They are checked on the Container Manager shared service, ai:service:arango-user-defined, the same resource that the Arango Control Plane checks when you deploy a Container Manager service. A scope that covers the Container Manager thus lets you both manage its packages and deploy services from them.

To use the File Manager, you thus need:

  • A predefined role that grants the action, which is ai-user for listing and downloading files and packages, and ai-developer for everything else.
  • A scope for the role assignment that covers the database of the RAG input files, or the Container Manager shared service for packages. A scope that only covers databases grants nothing for packages, and vice versa.

Actions

ActionAllowsResourcePredefined roles
ai:filemanager.file.readList, browse, and download input files and their versionsai:database:<database>, the database in the request pathai-user, ai-developer
ai:filemanager.file.manageUpload and delete input filesai:database:<database>, the database in the request pathai-developer
ai:filemanager.file.lockLock and unlock input files for deletionai:database:<database>, the database in the request pathai-developer
ai:filemanager.package.readList, get, and download Container Manager packagesai:service:arango-user-definedai-user, ai-developer
ai:filemanager.package.manageUpload and delete Container Manager packagesai:service:arango-user-definedai-developer

Locking and unlocking files is a separate action from uploading and deleting them. Files that are part of a built corpus are locked so that they cannot be deleted, and someone who may delete files should not be able to unlock such a file first. Both ai:filemanager.file.manage and ai:filemanager.file.lock are granted by the ai-developer role, but you can limit the actions in the scope of a role assignment with the HTTP API.

Uploading and deleting packages is a separate action from reading them, because a package becomes a running container.

Permissions per endpoint

EndpointActionPredefined roles
GET /healthNone, any authenticated user–
POST /global/byoc/ai:filemanager.package.manageai-developer
GET /global/byoc/ai:filemanager.package.readai-user, ai-developer
GET /global/byoc/{name}ai:filemanager.package.readai-user, ai-developer
GET /global/byoc/{name}/{version}ai:filemanager.package.readai-user, ai-developer
GET /global/byoc/{name}/{version}/downloadai:filemanager.package.readai-user, ai-developer
DELETE /global/byoc/{name}/{version}ai:filemanager.package.manageai-developer
POST /_db/{database}/rag-inputai:filemanager.file.manageai-developer
POST /_db/{database}/rag-input/batchai:filemanager.file.manageai-developer
GET /_db/{database}/rag-inputai:filemanager.file.readai-user, ai-developer
GET /_db/{database}/rag-input/versionsai:filemanager.file.readai-user, ai-developer
GET /_db/{database}/rag-input/scopesai:filemanager.file.readai-user, ai-developer
GET /_db/{database}/rag-input/{id}ai:filemanager.file.readai-user, ai-developer
GET /_db/{database}/rag-input/{id}/downloadai:filemanager.file.readai-user, ai-developer
PATCH /_db/{database}/rag-input/{id}ai:filemanager.file.lockai-developer
POST /_db/{database}/rag-input/safe-to-deleteai:filemanager.file.lockai-developer
POST /_db/{database}/rag-input/safe-to-delete-scopeai:filemanager.file.lockai-developer
DELETE /_db/{database}/rag-input/{id}ai:filemanager.file.manageai-developer
POST /_db/{database}/rag-input/deleteai:filemanager.file.manageai-developer
POST /_db/{database}/rag-input/delete-scopeai:filemanager.file.manageai-developer

The permission is checked before the request body is read, so a denied request fails with 403 regardless of what the body contains.

Errors

HTTP statusCause
400The database name in the path of a RAG input endpoint is empty or contains :
401No Authorization: Bearer <token> header, or the token is invalid or expired
403You lack the action on the resource
503The authentication or authorization service of the platform cannot be reached. The request is not carried out, and you can retry it

Example

Alice holds the ai-user role and Bob the ai-developer role, both with a scope of the sales database (ai:database:sales). Carol holds the ai-developer role with a scope of the Container Manager shared service (ai:service:arango-user-defined).

RequestAliceBobCarol
GET /_db/sales/rag-inputAllowedAllowed403, her scope doesn’t cover the database
POST /_db/sales/rag-input403, her role doesn’t grant the actionAllowed403
POST /_db/sales/rag-input/safe-to-delete403Allowed403
GET /global/byoc/403, her scope doesn’t cover the Container Manager403Allowed
POST /global/byoc/403403Allowed