Skip to content

Commit 52ffdc9

Browse files
committed
Merge PR #224 into 18.0
Signed-off-by rvalyi
2 parents 894c985 + 9073474 commit 52ffdc9

22 files changed

Lines changed: 1601 additions & 0 deletions

data_encryption/README.rst

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
===============
2+
Encryption data
3+
===============
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:944425b96b37d35d105f21f5a507a4b36c390de014d97f62379963d72f3d96ad
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Production/Stable
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github
20+
:target: https://github.com/OCA/server-env/tree/18.0/data_encryption
21+
:alt: OCA/server-env
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/server-env-18-0/server-env-18-0-data_encryption
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-env&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows to encrypt and decrypt data. This module is not
32+
usable by itself, it is a low level module which should work as a base
33+
for others. An example is the module server_environment_data_encryption
34+
35+
**Table of contents**
36+
37+
.. contents::
38+
:local:
39+
40+
Configuration
41+
=============
42+
43+
To configure this module, you need to edit the main configuration file
44+
of your instance, and add a directive called ``running_env``. Commonly
45+
used values are 'dev', 'test', 'production':
46+
47+
::
48+
49+
[options]
50+
running_env=dev
51+
52+
You also need to set the encryption key(s). The main idea is to have
53+
different encryption keys for your different environment, to avoid the
54+
possibility to retrieve crucial information from the production
55+
environment in a developement environment, for instance. So, if your
56+
running environment is 'dev':
57+
58+
::
59+
60+
[options]
61+
encryption_key_dev=fyeMIx9XVPBBky5XZeLDxVc9dFKy7Uzas3AoyMarHPA=
62+
63+
In the configuration file of your production environment, you may want
64+
to configure all your other environments encryption key. This way, from
65+
production you can encrypt and decrypt data for all environments.
66+
67+
You can generate keys with python -c 'from cryptography.fernet import
68+
Fernet; print(Fernet.generate_key())'.
69+
70+
Known issues / Roadmap
71+
======================
72+
73+
For now the encryption is dependent on the environment. It has been
74+
designed to store the same kind of data with different values depending
75+
on the environement (dev, preprod, prod...). An improvement could be to
76+
split this in 2 modules. But the environment stuff is not a big
77+
constraint.
78+
79+
Bug Tracker
80+
===========
81+
82+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-env/issues>`_.
83+
In case of trouble, please check there if your issue has already been reported.
84+
If you spotted it first, help us to smash it by providing a detailed and welcomed
85+
`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**>`_.
86+
87+
Do not contact contributors directly about support or help with technical issues.
88+
89+
Credits
90+
=======
91+
92+
Authors
93+
-------
94+
95+
* Akretion
96+
97+
Contributors
98+
------------
99+
100+
- Raphaël Reverdy <raphael.reverdy@akretion.com>
101+
- Florian da Costa <florian.dacosta@akretion.com>
102+
103+
Maintainers
104+
-----------
105+
106+
This module is maintained by the OCA.
107+
108+
.. image:: https://odoo-community.org/logo.png
109+
:alt: Odoo Community Association
110+
:target: https://odoo-community.org
111+
112+
OCA, or the Odoo Community Association, is a nonprofit organization whose
113+
mission is to support the collaborative development of Odoo features and
114+
promote its widespread use.
115+
116+
.. |maintainer-florian-dacosta| image:: https://github.com/florian-dacosta.png?size=40px
117+
:target: https://github.com/florian-dacosta
118+
:alt: florian-dacosta
119+
120+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
121+
122+
|maintainer-florian-dacosta|
123+
124+
This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/18.0/data_encryption>`_ project on GitHub.
125+
126+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

data_encryption/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

data_encryption/__manifest__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright <2019> Akretion
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Encryption data",
5+
"summary": "Store accounts and credentials encrypted by environment",
6+
"version": "18.0.1.0.0",
7+
"development_status": "Production/Stable",
8+
"maintainers": ["florian-dacosta"],
9+
"category": "Tools",
10+
"website": "https://github.com/OCA/server-env",
11+
"author": "Akretion, Odoo Community Association (OCA)",
12+
"license": "AGPL-3",
13+
"application": False,
14+
"installable": True,
15+
"external_dependencies": {"python": ["cryptography"]},
16+
"depends": ["base"],
17+
"data": ["security/ir.model.access.csv"],
18+
}

data_encryption/i18n/ca.po

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * data_encryption
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 14.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: Automatically generated\n"
10+
"Language-Team: none\n"
11+
"Language: ca\n"
12+
"MIME-Version: 1.0\n"
13+
"Content-Type: text/plain; charset=UTF-8\n"
14+
"Content-Transfer-Encoding: \n"
15+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
16+
17+
#. module: data_encryption
18+
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__environment
19+
msgid "Concerned Odoo environment (prod, preprod...)"
20+
msgstr ""
21+
22+
#. module: data_encryption
23+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_uid
24+
msgid "Created by"
25+
msgstr ""
26+
27+
#. module: data_encryption
28+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__create_date
29+
msgid "Created on"
30+
msgstr ""
31+
32+
#. module: data_encryption
33+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__display_name
34+
msgid "Display Name"
35+
msgstr ""
36+
37+
#. module: data_encryption
38+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__encrypted_data
39+
msgid "Encrypted Data"
40+
msgstr ""
41+
42+
#. module: data_encryption
43+
#. odoo-python
44+
#: code:addons/data_encryption/models/encrypted_data.py:0
45+
#, python-format
46+
msgid "Encrypted data can only be read with suspended security (sudo)"
47+
msgstr ""
48+
49+
#. module: data_encryption
50+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__environment
51+
msgid "Environment"
52+
msgstr ""
53+
54+
#. module: data_encryption
55+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__id
56+
msgid "ID"
57+
msgstr ""
58+
59+
#. module: data_encryption
60+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_uid
61+
msgid "Last Updated by"
62+
msgstr ""
63+
64+
#. module: data_encryption
65+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__write_date
66+
msgid "Last Updated on"
67+
msgstr ""
68+
69+
#. module: data_encryption
70+
#: model:ir.model.fields,field_description:data_encryption.field_encrypted_data__name
71+
msgid "Name"
72+
msgstr ""
73+
74+
#. module: data_encryption
75+
#. odoo-python
76+
#: code:addons/data_encryption/models/encrypted_data.py:0
77+
#, python-format
78+
msgid ""
79+
"No '%(key_name)s' entry found in config file. Use a key similar to: %(key)s"
80+
msgstr ""
81+
82+
#. module: data_encryption
83+
#. odoo-python
84+
#: code:addons/data_encryption/models/encrypted_data.py:0
85+
#, python-format
86+
msgid ""
87+
"No environment found, please check your running_env entry in your config "
88+
"file."
89+
msgstr ""
90+
91+
#. module: data_encryption
92+
#. odoo-python
93+
#: code:addons/data_encryption/models/encrypted_data.py:0
94+
#, python-format
95+
msgid ""
96+
"Password has been encrypted with a different key. Unless you can recover the "
97+
"previous key, this password is unreadable."
98+
msgstr ""
99+
100+
#. module: data_encryption
101+
#: model:ir.model,name:data_encryption.model_encrypted_data
102+
msgid "Store any encrypted data by environment"
103+
msgstr ""
104+
105+
#. module: data_encryption
106+
#: model:ir.model.fields,help:data_encryption.field_encrypted_data__name
107+
msgid "Technical name"
108+
msgstr ""
109+
110+
#. module: data_encryption
111+
#. odoo-python
112+
#: code:addons/data_encryption/models/encrypted_data.py:0
113+
#, python-format
114+
msgid "The data you are trying to read are not in a json format"
115+
msgstr ""
116+
117+
#. module: data_encryption
118+
#: model:ir.model.constraint,message:data_encryption.constraint_encrypted_data_name_environment_uniq
119+
msgid ""
120+
"You can not store multiple encrypted data for the same record and "
121+
"environment"
122+
msgstr ""
123+
124+
#. module: data_encryption
125+
#. odoo-python
126+
#: code:addons/data_encryption/models/encrypted_data.py:0
127+
#, python-format
128+
msgid "You can only encrypt data with suspended security (sudo)"
129+
msgstr ""

0 commit comments

Comments
 (0)