Skip to content

[18][MIG] data_encryption #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
465b964
[12.0] Add data_encryption
florian-dacosta Apr 11, 2019
a1de62b
[UPD] Update data_encryption.pot
oca-travis Mar 27, 2020
684a96e
[UPD] README.rst
OCA-git-bot Mar 27, 2020
5ad6e41
[ADD] icon.png
OCA-git-bot Mar 27, 2020
26312c8
[REF] data_encryption: Black python code
ThomasBinsfeld Oct 2, 2020
9fb2ff0
[MIG] data_encryption: Migration to 13.0
ThomasBinsfeld Oct 2, 2020
2914b7c
[IMP] server_environment_data_encryption, data_encryption: black, iso…
mourad-ehm Oct 12, 2020
6701e36
[MIG] server_environment_data_encryption, data_encryption: Migration …
mourad-ehm Oct 12, 2020
33f2ea9
[UPD] Update data_encryption.pot
oca-travis Mar 5, 2021
98ef6d0
[UPD] README.rst
OCA-git-bot Mar 5, 2021
952774b
Added translation using Weblate (Catalan)
extrememicro Feb 16, 2022
866f2a1
[IMP] data_encryption: black, isort, prettier
florian-dacosta Oct 9, 2022
e5dd018
[16][MIG] Migration of data_encryption
florian-dacosta Oct 9, 2022
68114e4
FIX data_encryption: typo
bealdav Jul 28, 2022
f28289e
[UPD] Update data_encryption.pot
Oct 24, 2022
09dd202
[UPD] README.rst
OCA-git-bot Oct 24, 2022
c03b754
Added translation using Weblate (German)
marylla Nov 4, 2022
89dbcd7
Translated using Weblate (German)
marylla Nov 4, 2022
b00082d
[UPD] Update data_encryption.pot
Nov 25, 2022
cdc113f
Update translation files
weblate Nov 25, 2022
7987bc2
FIX data_encryption: readme typo
bealdav Mar 18, 2023
9d1af0b
[UPD] README.rst
OCA-git-bot Mar 18, 2023
8e73d85
data_encryption 16.0.1.0.1
OCA-git-bot Mar 18, 2023
af3662e
Added translation using Weblate (Spanish)
Ivorra78 Jul 25, 2023
4ee196c
Translated using Weblate (Spanish)
Ivorra78 Jul 25, 2023
c02744f
[UPD] README.rst
OCA-git-bot Sep 3, 2023
935f3a7
Update translation files
weblate Oct 9, 2023
76069eb
Added translation using Weblate (Italian)
mymage Jan 2, 2024
8a485ec
Translated using Weblate (Italian)
mymage Jan 3, 2024
d20d424
[IMP] data_encryption: pre-commit auto fixes
map-240221 Oct 23, 2024
cbec4cc
[MIG] data_encryption: Migration to 17.0
map-240221 Oct 23, 2024
aaa7300
[UPD] Update data_encryption.pot
Nov 12, 2024
1c636f9
[BOT] post-merge updates
OCA-git-bot Nov 12, 2024
c3bbc70
Update translation files
weblate Nov 12, 2024
e3f5325
[IMP] data_encryption: pre-commit auto fixes
florian-dacosta Mar 31, 2025
9073474
[MIG] Migrate data_encryption to 18
florian-dacosta Mar 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions data_encryption/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
===============
Encryption data
===============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:944425b96b37d35d105f21f5a507a4b36c390de014d97f62379963d72f3d96ad
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
:target: https://github.com/OCA/server-env/tree/18.0/data_encryption
:alt: OCA/server-env
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-env-18-0/server-env-18-0-data_encryption
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to encrypt and decrypt data. This module is not
usable by itself, it is a low level module which should work as a base
for others. An example is the module server_environment_data_encryption

**Table of contents**

.. contents::
:local:

Configuration
=============

To configure this module, you need to edit the main configuration file
of your instance, and add a directive called ``running_env``. Commonly
used values are 'dev', 'test', 'production':

::

[options]
running_env=dev

You also need to set the encryption key(s). The main idea is to have
different encryption keys for your different environment, to avoid the
possibility to retrieve crucial information from the production
environment in a developement environment, for instance. So, if your
running environment is 'dev':

::

[options]
encryption_key_dev=fyeMIx9XVPBBky5XZeLDxVc9dFKy7Uzas3AoyMarHPA=

In the configuration file of your production environment, you may want
to configure all your other environments encryption key. This way, from
production you can encrypt and decrypt data for all environments.

You can generate keys with python -c 'from cryptography.fernet import
Fernet; print(Fernet.generate_key())'.

Known issues / Roadmap
======================

For now the encryption is dependent on the environment. It has been
designed to store the same kind of data with different values depending
on the environement (dev, preprod, prod...). An improvement could be to
split this in 2 modules. But the environment stuff is not a big
constraint.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-env/issues/new?body=module:%20data_encryption%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Akretion

Contributors
------------

- Raphaël Reverdy <[email protected]>
- Florian da Costa <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-florian-dacosta| image:: https://github.com/florian-dacosta.png?size=40px
:target: https://github.com/florian-dacosta
:alt: florian-dacosta

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-florian-dacosta|

This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/18.0/data_encryption>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions data_encryption/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions data_encryption/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright <2019> Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Encryption data",
"summary": "Store accounts and credentials encrypted by environment",
"version": "18.0.1.0.0",
"development_status": "Production/Stable",
"maintainers": ["florian-dacosta"],
"category": "Tools",
"website": "https://github.com/OCA/server-env",
"author": "Akretion, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {"python": ["cryptography"]},
"depends": ["base"],
"data": ["security/ir.model.access.csv"],
}
129 changes: 129 additions & 0 deletions data_encryption/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * data_encryption
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"

#. module: data_encryption
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__environment
msgid "Concerned Odoo environment (prod, preprod...)"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_uid
msgid "Created by"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_date
msgid "Created on"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__display_name
msgid "Display Name"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__encrypted_data
msgid "Encrypted Data"
msgstr ""

#. module: data_encryption
#. odoo-python
#: code:addons/data_encryption/models/encrypted_data.py:0
#, python-format
msgid "Encrypted data can only be read with suspended security (sudo)"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__environment
msgid "Environment"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__id
msgid "ID"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_uid
msgid "Last Updated by"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_date
msgid "Last Updated on"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__name
msgid "Name"
msgstr ""

#. module: data_encryption
#. odoo-python
#: code:addons/data_encryption/models/encrypted_data.py:0
#, python-format
msgid ""
"No '%(key_name)s' entry found in config file. Use a key similar to: %(key)s"
msgstr ""

#. module: data_encryption
#. odoo-python
#: code:addons/data_encryption/models/encrypted_data.py:0
#, python-format
msgid ""
"No environment found, please check your running_env entry in your config "
"file."
msgstr ""

#. module: data_encryption
#. odoo-python
#: code:addons/data_encryption/models/encrypted_data.py:0
#, python-format
msgid ""
"Password has been encrypted with a different key. Unless you can recover the "
"previous key, this password is unreadable."
msgstr ""

#. module: data_encryption
#: model:ir.model,name:data_encryption.model_encrypted_data
msgid "Store any encrypted data by environment"
msgstr ""

#. module: data_encryption
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__name
msgid "Technical name"
msgstr ""

#. module: data_encryption
#. odoo-python
#: code:addons/data_encryption/models/encrypted_data.py:0
#, python-format
msgid "The data you are trying to read are not in a json format"
msgstr ""

#. module: data_encryption
#: model:ir.model.constraint,message:data_encryption.constraint_encrypted_data_name_environment_uniq
msgid ""
"You can not store multiple encrypted data for the same record and "
"environment"
msgstr ""

#. module: data_encryption
#. odoo-python
#: code:addons/data_encryption/models/encrypted_data.py:0
#, python-format
msgid "You can only encrypt data with suspended security (sudo)"
msgstr ""
Loading