Authentication, Authorization & Roles Flow
See step by step how authentication, authorization and roles (fixed or custom) work for API and MCP access.
Authentication
Who are you?
Confirms that an identity (person, app or agent) is who it claims to be by validating a credential.
Roles
Which group do you belong to?
They group a set of permissions and are assigned to an already authenticated identity.
Authorization
What can you do?
Evaluates whether that identity's role has permission for the requested action and resource.
Authentication method
Role type
Step 1 of 6
Fixed roles vs. custom roles
System fixed roles
They come predefined by the platform, with a set of permissions that cannot be edited (e.g. Admin, Editor, Viewer).
Example
"Editor" can always create and modify content, in any account that uses it.
When to use it
Generic cases common to all customers, where no extra granularity is needed.
Main risk
Little flexibility: if the business needs a permission halfway between two roles, it doesn't exist.
Custom roles
The business defines them by combining specific permissions and grouping them into a tailored role.
Example
"Finance Auditor": read-only on financial reports, with no access to any other module.
When to use it
When different teams need very specific combinations of permissions.
Main risk
It requires more management: roles must be maintained and audited as the business changes.
API vs. MCP authentication
API authentication
An application or service identifies itself to the server with an API Key or a Bearer Token on every HTTP request.
Example
Una app interna consulta un endpoint enviando "Authorization: Bearer <token>".
When to use it
Integrations between systems, your own apps, or when the client is a known service.
Main risk
If the credential leaks, it works for anyone who has it until it is revoked.
MCP authentication
An AI agent connects to an MCP (Model Context Protocol) server; the user approves that connection and the server validates the associated token on each use.
Example
An AI assistant uses an MCP tool to read reports, acting on behalf of the person who authorized it.
When to use it
When an AI agent needs to act on behalf of a person on internal systems.
Main risk
The agent inherits the permissions of whoever authorized it: the scope of that authorization must be well limited.