Skip to content
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

[17.0][MIG] data_encryption: Migration to 17.0 #198

Open
wants to merge 31 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
83853d8
[12.0] Add data_encryption
florian-dacosta Apr 11, 2019
e5f9636
[UPD] Update data_encryption.pot
oca-travis Mar 27, 2020
949b5f8
[UPD] README.rst
OCA-git-bot Mar 27, 2020
7bc34e4
[ADD] icon.png
OCA-git-bot Mar 27, 2020
091aede
[REF] data_encryption: Black python code
ThomasBinsfeld Oct 2, 2020
135416f
[MIG] data_encryption: Migration to 13.0
ThomasBinsfeld Oct 2, 2020
477de0a
[IMP] server_environment_data_encryption, data_encryption: black, iso…
mourad-ehm Oct 12, 2020
674c5c7
[MIG] server_environment_data_encryption, data_encryption: Migration …
mourad-ehm Oct 12, 2020
b11e59d
[UPD] Update data_encryption.pot
oca-travis Mar 5, 2021
ebeff6d
[UPD] README.rst
OCA-git-bot Mar 5, 2021
2fb0f9c
Added translation using Weblate (Catalan)
extrememicro Feb 16, 2022
d2e51c7
[IMP] data_encryption: black, isort, prettier
florian-dacosta Oct 9, 2022
ba42bc7
[16][MIG] Migration of data_encryption
florian-dacosta Oct 9, 2022
9b26a30
FIX data_encryption: typo
bealdav Jul 28, 2022
fbfb1c6
[UPD] Update data_encryption.pot
Oct 24, 2022
61fe898
[UPD] README.rst
OCA-git-bot Oct 24, 2022
c9d5284
Added translation using Weblate (German)
marylla Nov 4, 2022
f691b18
Translated using Weblate (German)
marylla Nov 4, 2022
72fb513
[UPD] Update data_encryption.pot
Nov 25, 2022
5b878ec
Update translation files
weblate Nov 25, 2022
a182fc0
FIX data_encryption: readme typo
bealdav Mar 18, 2023
cde2bcd
[UPD] README.rst
OCA-git-bot Mar 18, 2023
ac8e201
data_encryption 16.0.1.0.1
OCA-git-bot Mar 18, 2023
56a0977
Added translation using Weblate (Spanish)
Ivorra78 Jul 25, 2023
87e347e
Translated using Weblate (Spanish)
Ivorra78 Jul 25, 2023
3908ab7
[UPD] README.rst
OCA-git-bot Sep 3, 2023
e19df1b
Update translation files
weblate Oct 9, 2023
bfd8d7a
Added translation using Weblate (Italian)
mymage Jan 2, 2024
8db9f51
Translated using Weblate (Italian)
mymage Jan 3, 2024
bf096c5
[IMP] data_encryption: pre-commit auto fixes
map-240221 Aug 19, 2024
ca473d0
[MIG] data_encryption: Migration to 17.0
map-240221 Aug 19, 2024
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
123 changes: 123 additions & 0 deletions data_encryption/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
===============
Encryption data
===============

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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/17.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-17-0/server-env-17-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=17.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

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**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:%2017.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.

This module is part of the `OCA/server-env <https://github.com/OCA/server-env/tree/17.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
17 changes: 17 additions & 0 deletions data_encryption/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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": "17.0.1.0.0",
"development_status": "Alpha",
"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"],
}
134 changes: 134 additions & 0 deletions data_encryption/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# 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____last_update
msgid "Last Modified on"
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
Loading