How identity works
Anar does not keep a central user directory. Your identity provider stays the source of truth for your users.
The Gateway can check tokens that your identity provider issues. It uses OpenID Connect discovery or a JSON Web Key Set address to check each token. When a token is valid, the Gateway reads the user and the role from the token claims.
Applications that call models through the Gateway can use a virtual key in place of a user token. Read Access control.
Console sign-in
Anar agrees the console sign-in method with you during deployment. Single sign-on to the consoles through your identity provider is on the roadmap.
Tokens
Each product API accepts a bearer token in the Authorization header.
Authorization: Bearer <token>
The token carries the user, the role and, where it applies, the tenant. A product refuses a missing, expired or changed token with 401. It refuses a valid token with the wrong role with 403.
Roles in the products
Most products use the same role names.
| Role | What the role can do |
|---|---|
admin | Everything. Only an admin can delete shared items, change configuration and approve high-impact actions. |
manager | Create and change items. In Chat, a manager can manage knowledge bases and documents. |
user | Use the product: ask questions, upload files, run tasks. |
viewer | Read only. A token without a role is treated as viewer. |
Some products add roles for their own tasks. For example, Agents lets officer roles approve, pause and stop runs. Each product page lists the actions that need a role.
Roles in the Gateway
The Gateway has its own roles. They control access to models and to the Gateway configuration.
| Role | Permissions |
|---|---|
admin | Call models, read configuration and logs, change configuration, manage keys and budgets |
developer | Call models, read configuration and logs |
viewer | Read configuration and logs |
auditor | Read logs |
Your administrator can add custom roles in the Gateway configuration. The Gateway refuses each administration request that the role does not allow.
Tenants
Chat keeps the data of each tenant apart. A user sees only the conversations, knowledge bases and documents of their own tenant. The tenant comes from the token.
Chat self-registration is off by default. When it is on, a new user selects their own role and tenant.