[18.0][ADD] certificate_data_encryption: add module - #294
Draft
rvalyi wants to merge 1 commit into
Draft
Conversation
rvalyi
force-pushed
the
18.0-add-certificate_data_encryption
branch
from
September 3, 2026 16:23
6386eec to
8942969
Compare
rvalyi
force-pushed
the
18.0-add-certificate_data_encryption
branch
from
September 3, 2026 16:25
8942969 to
4d0da6a
Compare
rvalyi
marked this pull request as draft
September 3, 2026 16:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
assisted by glm-5.3
This module allows to store the passwords of the certificates and private keys managed by the core
certificatemodule in an encrypted and per environment way (dev, staging, production), instead of clear text in the database.It connects the core
certificatemodule with the OCA server-env encryption mechanism (server_environment_data_encryptionanddata_encryption): the passwords become environment managed fields (server.env.mixin) whose values are stored encrypted in theencrypted.datatable using a Fernet key per environment.Covered fields:
certificate.certificate.pkcs12_passwordcertificate.key.passwordFollow the configuration of the
server_environmentandserver_environment_data_encryptionmodules:define
running_envin the Odoo configuration file;define one Fernet key per environment in the
[options]section, e.g.encryption_key_prod = ZZZ;generate the keys with:
python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key())'.The passwords are no longer stored in the
certificate.certificateandcertificate.keytables: they are set/changed from the forms (the screen shows which environment is being edited) and are stored encrypted in theencrypted.datatable, per environment.If no encryption key is configured for the current environment, the module has no effect (default behavior of
server_environment_data_encryption).