Skip to main content

Tool for a disaster recovery of Odoo's vault module

Project description

License: MIT PyPI - Python Version Code style: black

vault-recovery

This tool provides utilities for a disaster recovery for the Odoo vault module from database backups or formerly exported files. The backups need atleast the following tables for the recovery:

  • res_users
  • res_users_key
  • vault
  • vault_entry
  • vault_field
  • vault_file
  • vault_right

Installation

$ pip3 install vault-recovery

Security

Do not run the recover or decrypt mode on the server. This will compromise the security design of the vault module.

Usage

The tool supports different operation modes for specific purposes.

vault info [...] can be used to retrieve information from a postgres database about available vaults. It can be used to get UUIDs of users and vaults with some additional information. The UUIDs are used in other modes.

$ vault info -d odoo
User: admin [6cf47287-d791-44a0-b073-78659959ca3f]
  Fingerprint: 61:a7:70:73:75:06:61:ad:fc:0e:9a:3c:bd:99:a0:17:be:7f:35:5e:31:d0:80:e4:fd:cc:90:ac:be:5b:e8:82
  Vaults:
    Test Vault [cee24057-4318-46b8-b227-05ec687df64e]

vault export [...] can be used to export vaults from a database into exported files. These files include everything from the database which is needed to recover the database including the encrypted master key, private key, and entries.

$ vault export -d odoo --user 6cf47287-d791-44a0-b073-78659959ca3f > vaults.json

vault recover [...] can be used to recover the secrets from a vault. It can recover from a database or from a previously exported exported file as the following example shows. The data is put inside of the output directory as raw, plain, and encrypted files.

$ vault recover -d odoo -i vaults.json --password --output ~/vaults

vault encrypt [...] can be used to protect raw files with password or passfiles.

$ vault encrypt -i raw.json --password > encrypted.json

vault decrypt [...] can be used to decrypt encrypted files.

$ vault decrypt -i encrypted.json --password -o ~/vaults > raw.json

Files types

The tool outputs various JSON files for different purposes to store the data and to allow splitting the process into steps. All files are structured as a dictionary with a type key. The following types exists:

  • exported: contains all information needed to recover vaults. They can be used to recover the data on more secure environments.

  • plain: contains the most information of a recovered vault. These files are unencrypted.

  • raw: contains unencrypted entries ready to be imported into a running vault

  • encrypted: contains encrypted entries ready to be imported into a running vault

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

vault_recovery-0.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file vault_recovery-0.2-py3-none-any.whl.

File metadata

  • Download URL: vault_recovery-0.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for vault_recovery-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1f8a2b272b13e9ff43998027a71f4e902fce5ec5f6f7563ca88427a0f2bd702
MD5 6bdd9c46dddd36f22e42800e1684752d
BLAKE2b-256 1f183910e1e19e8ef286ee92e26142f73b8f059dfc42a276615f6c5ff7b0e8ba

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page