OdooWiki OCA HUB

Auth API key server environment

auth_api_key_server_env folder_open OCA/server-auth open_in_new
Uncategorised License: LGPL-3

Configure api keys via server env.

This can be very useful to avoid mixing your keys between your various environments when restoring databases. All you have to do is to add a new section to your configuration file according to the following convention:

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets you store API keys in the server configuration file instead of the database, so each environment (test, production) uses its own keys and they are not mixed when restoring a database.

This module connects the API key feature with the server environment feature. It changes the auth.api.key model so that the key value can be read from the Odoo configuration file rather than being typed and saved in the database.

  • Each API key record looks for its value in a section of the configuration file. The section name is built from the key's technical name, using the prefix api_key_ followed by that name.
  • The field taken from the configuration file is the key itself (key).
  • Because the values come from the configuration file, restoring a database in another environment does not carry the keys of the original environment with it.

No new menus, screens, buttons or reports are added by this module. It works behind the scenes on the existing API key records. The module depends on auth_api_key and server_environment, and it extends the auth.api.key model with the server environment behaviour. No automatic checks, emails or scheduled jobs are defined in the code shown.

Models and fields (1)
  • auth.api.key · new model

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 5 confirmed, 4 with no information of 9 versions.

Sources · Odoo 15.0

Confirmed on 2026-11-03 in branch 15.0 of OCA/server-auth.

terminal Installation and usage

No verified information

Installation instructions, the distribution package, dependencies and configuration steps are not shown because they have not yet been verified in the module documentation for any version.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.