Administration

Security & permissions

Aidoo's security architecture: OAuth & API key authentication, role-based access control, credential encryption and logging.

7 min readUpdated October 1, 2026

Security architecture

Aidoo applies a defense-in-depth security approach. Every MCP request flows through the Express backend, which handles authentication, access control, encryption and logging before reaching Odoo.

AI assistantMCP serverAidoo backendXML-RPCOdooAuthentication (JWT / API key)Permission controlLoggingCredential encryption

Authentication

Aidoo offers three authentication methods depending on the usage context.

For clients that support OAuth (Claude.ai, ChatGPT, Claude Desktop, Claude Code), authentication is handled through a standard OAuth 2.1 flow:

  • No API key to handle on the user side, so no secret to leak
  • The connection renews automatically: a connector in regular use never needs reconnecting
  • Authorization is scoped to a company: the user explicitly picks which Aidoo organization they authorize
  • Permissions are chosen on the consent screen, with an optional separate set for staging
  • Revocation is immediate from the API keys page of the dashboard

This is the default recommended method for most users. See the Connecting with Claude and Connecting with ChatGPT guides.

API keys (IDEs without OAuth)

For IDEs that don't support OAuth (Cursor, Windsurf, etc.), API keys authenticate programmatic requests. Every key:

  • Is hashed with SHA-256 before storage (the plaintext key is never kept)
  • Carries an aid_live_ prefix for quick identification
  • Is tied to a user and a company, with one active key per member and per workspace
  • Can be revoked instantly from the dashboard

See the API keys and Local clients guides for full management details.

JWT (dashboard sessions)

Web dashboard sessions use JWT tokens:

  • Access token: 15-minute lifetime
  • Refresh token: 30-day lifetime, sent via a secure httpOnly cookie
  • Renewal is automatic and transparent to the user

Two-factor authentication (TOTP)

Each user can protect their account with a temporary code generated by an authenticator app (Google Authenticator, Microsoft Authenticator, 1Password, etc.). The option is opt-in and set account by account.

  1. Open Settings, Two-factor authentication section, then click Enable
  2. If your account has a password, enter it to confirm your identity
  3. Scan the QR code with your app (or type the displayed key)
  4. Enter the 6-digit code to confirm activation
  5. Keep the 8 recovery codes shown: each one works only once and they won't be displayed again

The code is then asked at every new sign-in to the dashboard, with a password as well as with Google. You have 5 minutes and 5 attempts; beyond that, the sign-in has to start over. If you lose your phone, click "Use a recovery code".

What enabling it doesn't change:

  • sessions already open stay valid: nobody is signed out;
  • the API keys and OAuth connections of your assistants (Claude, ChatGPT, IDEs) keep working without a code;
  • the chat embedded in Odoo and the agents are not affected.

Disabling the option or generating new recovery codes ("New recovery codes" button, which invalidates the old ones) requires a code from the app, plus the password for accounts that have one.

Roles and access control

Aidoo uses a three-tier role system, applied per company. The same user can have different roles depending on the company.

RoleScope
OwnerFull control: company management, members, API keys, billing and Odoo connection
AdminAdministration: management of members and their API keys, AI credit limits, access to all logs, Odoo configuration
MemberLimited access: viewing and revoking their own API keys, viewing of their own logs

By default, a member chooses the permissions of their own connector. The Read-only members option in Settings limits them to read access (see API keys).

The Owner role is unique per workspace and can be handed over to another member from the Team page, after email confirmation (see Billing and workspace management).

Concrete examples

ActionOwnerAdminMember
Connect one's assistant through OAuthYesYesYes
Generate or edit a member's API keyYesYesNo
Revoke another member's keyYesYesNo
View all logsYesYesNo
Edit the Odoo connection, block models and fieldsYesYesNo
Invite or remove a memberYesYesNo
Set a member's monthly AI credit limitYesYesNo
Update hints through the assistant (default)YesYesNo
Manage billingYesNoNo
Transfer ownership, delete the workspaceYesNoNo

The per-member AI credit limit is set from the Team page, see Credits and consumption.

Multi-tenant isolation

Every request is scoped to a company. A user can only access resources from companies they belong to.

Blocking models and fields

Independently of key permissions, owners and admins can close off whole parts of the database from the Odoo Configuration page:

  • Block this model: no request is possible on the model any more, whatever the tool;
  • Block this field: the field is removed from reads and ignored in writes.

These blocks apply to every key, including those of agents and of the chat embedded in Odoo. The page's "Blocked" filter lists what is closed, and "Unblock all" reopens the models in one go.

Encryption of Odoo credentials

The Odoo connection credentials (URL, database, password) are encrypted at rest in the database.

Algorithm

  • AES-256-GCM (Galois/Counter Mode): authenticated encryption that guarantees both confidentiality and integrity of the data
  • Initialization vector (IV): 16 random bytes generated for each encryption operation
  • Authentication tag: 16 bytes to detect any tampering with the encrypted data

How it works

  1. When an Odoo connection is saved, sensitive credentials are encrypted on the server side
  2. The result is stored in the format IV:TAG:CIPHERTEXT (hexadecimal)
  3. On each request to Odoo, credentials are decrypted in memory for the duration of the call
  4. The encryption key is a server environment variable, never exposed to the client

Odoo credentials never travel in plaintext between the browser and the MCP server. Only the backend has the decryption key.

Request logging

Every MCP call is recorded with a level of detail that enables full auditing.

Recorded data

FieldDescription
MCP toolName of the tool called (query, read, create, etc.)
ParametersRequest input data
ResultOutput data (success) or error message
Statussuccess, error or timeout
DurationExecution time in milliseconds
UserUser identity and API key used
SessionSession identifier to group related calls

Data retention

The retention period is set per workspace in Settings, Odoo and logs tab, Request logs section: 7, 14, 30, 90, 180 or 365 days (14 days by default). Beyond that, logs are deleted automatically, and shortening the period immediately deletes older logs.

The same section lets you turn detailed collection off entirely, or only for some tools ("Advanced settings"). Statistics and quotas stay active in every case. These settings are reserved for owners and admins.

Filtering and viewing

From the Logs page in the dashboard, you can filter by:

  • MCP tool used
  • Request status (success, error, timeout)
  • Environment (production or staging)
  • Date range

Owners and admins see all the company's logs. Members only see their own requests.

Next step