Skip to main content

Overview

Users are assigned to roles, and roles define permissions. A user’s effective permissions are the union of all permissions from all their roles (OR logic). Permissions are loaded from the database on every request — changes take effect immediately.

Default Roles

Permission Format

Components:

Permission Matching Rules

Scope hierarchy: :all automatically grants :own. A user with sinas.agents.read:all passes any check for sinas.agents.read:own. Wildcards can be used at any level: Namespaced resource permissions use slashes in the resource path:
Non-namespaced resource permissions use simple dot notation:

Custom Permissions

The permission system is not limited to sinas.*. You can define permissions with any service prefix for your own applications:
These work identically to built-in permissions — same wildcard matching, same scope hierarchy. This lets you use Sinas as the authorization backend for external applications.

Checking Permissions from External Services

Use the POST /auth/check-permissions endpoint to verify whether the current user (identified by their Bearer token or API key) has specific permissions:
Response:
  • logic: "AND" — User must have ALL listed permissions (default)
  • logic: "OR" — User must have AT LEAST ONE of the listed permissions
This makes Sinas usable as a centralized authorization service for any number of external applications.

Managing Roles

Agent Execution & Permissions

Agents define which tools are available (via enabled_* fields), but the user’s role permissions are checked at execution time. Both conditions must be met:
  1. Agent declares the tool — the resource is in the agent’s enabledFunctions, enabledQueries, enabledStores, enabledCollections, or enabledAgents
  2. User has the permission — checked when the tool is actually called
If the user lacks permission, the tool call returns an error that the LLM can explain to the user. Tools are still visible to the LLM regardless — the check happens at execution, not discovery. Connectors are the exception — they have no independent API and can only be accessed through an agent, so the agent’s enabledConnectors (with per-operation filtering) is the sole access control. Namespace wildcards make this manageable. Grant sinas.functions/sales/*.execute:own once on a role, and all functions in the sales/ namespace are accessible.