Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1e7acdc
Add vault and vault_share module
fkantelberg Mar 12, 2021
ebc1aac
FIX vault: - Wrong field name
Sep 30, 2021
3e2688c
General fixes and improvements of the vault - Send wizard couldn't se…
fkantelberg Oct 27, 2021
19e4be7
Prevent locking out the user from the private key when the login was …
fkantelberg Apr 14, 2022
a79e99c
vault: complete_name not computed when created from other entry
Aug 31, 2022
d1e4204
vault: Show just name instad of full path in searchpanel
Jun 6, 2022
d33da4a
Fix locking secrets because on re-encryption after removal of users t…
fkantelberg Sep 4, 2022
c9203fd
Allow an user to invalidate the current key if the password is lost -…
fkantelberg Sep 8, 2022
9359f0b
Module vault and vault_share
fkantelberg Nov 29, 2022
b92b3ff
vault: vault readonly when it's defined
Mar 20, 2023
18189f2
Added translation using Weblate (Dutch)
May 5, 2023
8a2906e
vault: Error thrown when the key version is lower than 1
Jun 14, 2023
7dcdfd9
vault, vault_share: Error on test
Jun 22, 2023
edf8129
vault: Error thrown when attempting to remove a right from a vault wi…
Jun 26, 2023
a57e582
vault: Vault re-encryption in a single transaction. Add copy support …
fkantelberg Jul 14, 2023
34ee73e
vault: Add reload when finish the reencriptation to display updated data
Aug 2, 2023
417c811
Translated using Weblate (Spanish)
Aug 2, 2023
e0a7886
vault: Add new groups to allow importing/exporting secrets
Oct 2, 2023
007e16f
Translated using Weblate (Spanish)
Ivorra78 Oct 31, 2023
0fe7252
[MIG][16.0] vault: Migration and restructuring for 16.0
fkantelberg Jan 18, 2024
2aa7ad8
[FIX] vault: Exception when clicking away the first password dialog a…
fkantelberg Feb 14, 2024
0e44233
[FIX] vault: Check against the key of vault.right
fkantelberg Feb 17, 2024
1c572e6
[IMP] vault: Improve handling if no secure browser context is provide…
fkantelberg Feb 19, 2024
fbbc343
Added translation using Weblate (Italian)
mymage Feb 26, 2024
250d022
[IMP] vault: Resize icon
fkantelberg Feb 29, 2024
aedb268
Translated using Weblate (Italian)
mymage Mar 8, 2024
530db19
Translated using Weblate (Spanish)
Apr 16, 2024
a41ba67
[FIX] vault: Secret generator is not saving new value
Jun 10, 2024
a28d533
[FIX] vault: Stop propagation when clicking "enter"
Jun 11, 2024
8e16339
[IMP] vault: Update value when input is decrypted
Jul 24, 2024
b9bafba
[IMP] vault: pre-commit auto fixes
Nov 25, 2025
354c9b3
[MIG] vault: Migration to 18.0
Dec 11, 2025
5cb9fc4
[IMP] vault: Add kanban view for vault fields
Jan 14, 2026
f9b54c9
[IMP] vault: Add kanban view for vault fields
Jan 15, 2026
c071aeb
[FIX] vault: Error when user clicks on reencrypt
Feb 25, 2026
1a31beb
[FIX] vault: Error when reencrypt is pressed
Apr 23, 2026
5284aae
Translated using Weblate (Italian)
mymage Apr 30, 2026
7fccdc8
[FIX] vault: Error when cancel the key popup
Feb 2, 2026
cf648b6
[IMP] vault: Don't require keys on service load to avoid annoying not…
Feb 3, 2026
658f17b
[FIX] vault: Error when try to download file
Feb 16, 2026
affce8c
[FIX] vault: generate keys on first usage instead of failing
jans23 Jul 22, 2026
c5106f6
[FIX] vault: remove 'New' button from user search dialog when sharing
jans23 Jul 28, 2026
fd694ff
[FIX] vault: field names
jans23 Aug 1, 2026
49c7d45
[FIX] vault: mark inbox route as website to fix KeyError: 'website'
jans23 Aug 22, 2026
5e610fa
[FIX] vault: avoid singleton error on batched vault.right create
jans23 Aug 22, 2026
dd358d2
[IMP] vault: filter entries with/without content, content shown by de…
cvinh Aug 26, 2026
1cf50da
Translated using Weblate (Italian)
mymage Sep 16, 2026
5bd56bc
[IMP] vault: pre-commit auto fixes
Oct 29, 2026
e186960
[MIG] vault: Migration to 20.0
Oct 29, 2026
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
122 changes: 122 additions & 0 deletions vault/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====
Vault
=====

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-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--auth-lightgray.png?logo=github
:target: https://github.com/OCA/server-auth/tree/20.0/vault
:alt: OCA/server-auth
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-auth-20-0/server-auth-20-0-vault
: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-auth&target_branch=20.0
:alt: Try me on Runboat

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

This module implements a vault for secrets and files using
end-to-end-encryption. The encryption and decryption happens in the
browser using a vault specific shared master key. The master keys are
encrypted using asymmetrically. For this the user has to enter a second
password on the first login or if he needs to access data in a vault.
The asymmetric keys are stored for a certain time in the browser
storage.

The server can never access the secrets with the information available.
Only people registered in the vault can decrypt or encrypt values in a
vault. The meta data isn't encrypted to be able to search/filter for
entries more easily.

This modules requires a secure context for the browser to work properly
and therefore HTTPS support is required.

The `vault-recovery <https://github.com/fkantelberg/vault-recovery>`__
project focuses on disaster recovery in case of an incident to recover
secrets from old database backups or old exports.

**Table of contents**

.. contents::
:local:

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

- Field and file history for restoration
- Import improvement

..

- Support challenge-response/FIDO2
- Support for argon2 and kdbx v4

- When changing an entry from one vault to another existing vault, the
values added on this entry cannot be accessed, so the field vault is
going to be readonly when it is defined.

If you want to move entries between vaults you can use the export ->
import option.

- HTTPS or localhost (secure browser context) is required for the client
side encryption

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-auth/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-auth/issues/new?body=module:%20vault%0Aversion:%2020.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
-------

* initOS GmbH

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

- Florian Kantelberg <florian.kantelberg@initos.com>
- `Tecnativa <https://www.tecnativa.com>`__:

- Carlos Roca

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-auth <https://github.com/OCA/server-auth/tree/20.0/vault>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
143 changes: 143 additions & 0 deletions vault/TECHNICAL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
::

┌───────┐ ┏━━━━━━━━━━━━━┓ ╔═══════════╗
│ input │ ┃ unencrypted ┃ ║ encrypted ║
└───────┘ ┗━━━━━━━━━━━━━┛ ╚═══════════╝

Vault
=====

Each vault stores entries with enrypted fields and files in a tree like structure. The access is controlled per vault. Every added user can read the secrets of a vault. Otherwise the users can receive permission to share the vault with other users, to write secrets in the vault, or to delete entries of the vault. The databases stores the public and password protected private key of each user. The password used for the private key is derived from a password entered by the user and should be different than the password used for the login. Keep in mind that the meta information like field name or file names aren't encrypted.

Shared-key encryption
=====================

To be able to securely share sensitive data between all users a shared-key encryption is used. All users share a common secret for each vault. This secret is encrypted by the public key of each user to grant access to the user by using the private key to restore the secret.

Encryption of master key
------------------------

::

. ┏━━━━━━━━━━━━┓
┃ Master key ┃
┗━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━┓ ┃
┃ User ┃ ▼
┃ ┃ ┏━━━━━━━━━┓
┃ ┏━━━━━━━━━━━━━┓ ┃ ┃ encrypt ┃ ╔════════════╗
┃ ┃ Public key ┃━━━━▶┃ (RSA) ┃━━━━━▶║ Master key ║
┃ ┗━━━━━━━━━━━━━┛ ┃ ┗━━━━━━━━━┛ ╚════════════╝
┃ ╔═════════════╗ ┃
┃ ║ Private key ║ ┃
┃ ╚═════════════╝ ┃
┗━━━━━━━━━━━━━━━━━┛

Decryption of master key
------------------------

::

. ┌──────────┐ ┏━━━━━━━━━━┓
│ Password │━━━━▶┃ derive ┃
└──────────┘ ┃ (PBKDF2) ┃
┗━━━━━━━━━━┛
┃
┏━━━━━━━━━━━━━━━━━┓ ▼ ╔════════════╗
┃ User ┃ ┏━━━━━━━━━━┓ ║ Master key ║
┃ ┃ ┃ Password ┃ ╚════════════╝
┃ ┏━━━━━━━━━━━━━┓ ┃ ┗━━━━━━━━━━┛ ┃
┃ ┃ Public key ┃ ┃ ┃ ▼
┃ ┗━━━━━━━━━━━━━┛ ┃ ▼ ┏━━━━━━━━━┓
┃ ╔═════════════╗ ┃ ┏━━━━━━━━┓ ┏━━━━━━━━━━━━━┓ ┃ decrypt ┃ ┏━━━━━━━━━━━━┓
┃ ║ Private key ║━━━━━┃ unlock ┃━━▶┃ Private key ┃━━━▶┃ (RSA) ┃━━━━━▶┃ Master key ┃
┃ ╚═════════════╝ ┃ ┗━━━━━━━━┛ ┗━━━━━━━━━━━━━┛ ┗━━━━━━━━━┛ ┗━━━━━━━━━━━━┛
┗━━━━━━━━━━━━━━━━━┛

Symmetric encryption of the data
================================

The symmetric cipher AES is used with the common master key to encrypt/decrypt the secrets of the vaults. The encryption parameter and encrypted data is stored in the database while everything else happens in the browser.

Encryption of data
------------------

::

. ┏━━━━━━━━━━━━┓
┃ Master key ┃
┗━━━━━━━━━━━━┛
┃ ┏━━━━━━━━━━━━━━━━━━┓
▼ ┃ Database ┃
┏━━━━━━━━━┓ ┃ ┃
┏━━━━━━━━━━━━┓ ┃ encrypt ┃ ┃╔════════════════╗┃
┃ Plain text ┃━━▶┃ (AES) ┃━━━▶║ Encrypted data ║┃
┗━━━━━━━━━━━━┛ ┗━━━━━━━━━┛ ┃╚════════════════╝┃
┃ ┃┏━━━━━━━━━━━━━━━━┓┃
┗━━━━━━━━▶┃ Parameters ┃┃
┃┗━━━━━━━━━━━━━━━━┛┃
┗━━━━━━━━━━━━━━━━━━┛

Decryption of data
------------------

::

. ┏━━━━━━━━━━━━┓
┃ Master key ┃
┗━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━┓ ┃
┃ Database ┃ ▼
┃ ┃ ┏━━━━━━━━━┓
┃╔════════════════╗┃ ┃ decrypt ┃ ┏━━━━━━━━━━━━┓
┃║ Encrypted data ║━━━▶┃ (AES) ┃━━▶┃ Plain text ┃
┃╚════════════════╝┃ ┗━━━━━━━━━┛ ┗━━━━━━━━━━━━┛
┃┏━━━━━━━━━━━━━━━━┓┃ ▲
┃┃ Parameters ┃━━━━━━━━┛
┃┗━━━━━━━━━━━━━━━━┛┃
┗━━━━━━━━━━━━━━━━━━┛

Inbox
=====

This allows an user to receive encrypted secrets by external or internal Odoo users. External users have to use either the owner specific inbox link from his preferences or the link of an already created inbox. The value is symmetrically encrypted. The key for the encryption is wrapped with the public key of the user of the inbox to grant the user the access to the key. Internal users can directly send a secret from a vault entry to another user who has enabled this feature. If a direct link is used the access counter and expiration time can block an overwrite.

Encryption of inbox
-------------------

::

. ┏━━━━━━━━━━━━┓
┃ Plain data ┃
┗━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━┓ ┃
┃ User ┃ ▼
┃ ┃ ┏━━━━━━━━━┓
┃ ┏━━━━━━━━━━━━━┓ ┃ ┃ encrypt ┃ ╔════════════════╗
┃ ┃ Public key ┃━━━━▶┃ (RSA) ┃━━━━━▶║ Encrypted data ║
┃ ┗━━━━━━━━━━━━━┛ ┃ ┗━━━━━━━━━┛ ╚════════════════╝
┃ ╔═════════════╗ ┃
┃ ║ Private key ║ ┃
┃ ╚═════════════╝ ┃
┗━━━━━━━━━━━━━━━━━┛

Decryption of inbox
-------------------

::

. ┌──────────┐ ┏━━━━━━━━━━┓
│ Password │━━━━▶┃ derive ┃
└──────────┘ ┃ (PBKDF2) ┃
┗━━━━━━━━━━┛
┃
┏━━━━━━━━━━━━━━━━━┓ ▼ ╔════════════════╗
┃ User ┃ ┏━━━━━━━━━━┓ ║ Encrypted data ║
┃ ┃ ┃ Password ┃ ╚════════════════╝
┃ ┏━━━━━━━━━━━━━┓ ┃ ┗━━━━━━━━━━┛ ┃
┃ ┃ Public key ┃ ┃ ┃ ▼
┃ ┗━━━━━━━━━━━━━┛ ┃ ▼ ┏━━━━━━━━━┓
┃ ╔═════════════╗ ┃ ┏━━━━━━━━┓ ┏━━━━━━━━━━━━━┓ ┃ decrypt ┃ ┏━━━━━━━━━━━━┓
┃ ║ Private key ║━━━━━┃ unlock ┃━━▶┃ Private key ┃━━━▶┃ (RSA) ┃━━━━━▶┃ Plain data ┃
┃ ╚═════════════╝ ┃ ┗━━━━━━━━┛ ┗━━━━━━━━━━━━━┛ ┗━━━━━━━━━┛ ┗━━━━━━━━━━━━┛
┗━━━━━━━━━━━━━━━━━┛
4 changes: 4 additions & 0 deletions vault/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import controllers, models, wizards
49 changes: 49 additions & 0 deletions vault/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Vault",
"summary": "Password vault integration in Odoo",
"license": "AGPL-3",
"version": "20.0.1.0.0",
"website": "https://github.com/OCA/server-auth",
"application": True,
"author": "initOS GmbH, Odoo Community Association (OCA)",
"category": "Vault",
"depends": ["base_setup", "web"],
"data": [
"security/vault_security.xml",
"security/ir.access.csv",
"views/res_config_settings_views.xml",
"views/res_users_views.xml",
"views/vault_entry_views.xml",
"views/vault_field_views.xml",
"views/vault_file_views.xml",
"views/vault_log_views.xml",
"views/vault_inbox_views.xml",
"views/vault_right_views.xml",
"views/vault_views.xml",
"views/menuitems.xml",
"views/templates.xml",
"wizards/vault_export_wizard.xml",
"wizards/vault_import_wizard.xml",
"wizards/vault_send_wizard.xml",
"wizards/vault_store_wizard.xml",
],
"assets": {
"vault.assets_frontend": [
"vault/static/src/common/*.js",
"vault/static/src/frontend/*.js",
],
"web.assets_backend": [
"vault/static/lib/**/*.min.js",
"vault/static/src/**/*.xml",
"vault/static/src/common/*.js",
"vault/static/src/backend/*.scss",
"vault/static/src/backend/**/*.js",
],
"web.assets_unit_tests": [
"vault/static/tests/**/*.test.js",
],
},
}
4 changes: 4 additions & 0 deletions vault/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import main
Loading
Loading