• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python password manager

Vault

Pypi Build Status codecov MIT licensed

Vault is a simple Python password manager. It allows you to securely save secrets with a simple CLI interface.

Features

  • Secrets are stored in an encrypted SQLite database with SQLCipher
  • Within the database, each password and notes are encrypted with a unique salt using AES-256 encryption with pycryptodome
  • Master key is hashed with a unique salt
  • Possibility to create an unlimited number of vaults
  • Clipboard cleared automatically
  • Automatic vault locking after inactivity
  • Password suggestions with password-generator-py
  • Import / Export in Json

Basic usage

Demo

Installation and setup

Vault 2.x requires sqlcipher to be installed on your machine.

MacOS

On MacOS, you can install sqlcipher with brew:

brew install sqlcipher

# Install sqlcipher3
pip3 install sqlcipher3==0.4.5

# If you are getting an error "Failed to build sqlcipher3", you would need to fix the build flags:
SQLCIPHER_PATH="$(brew --cellar sqlcipher)/$(brew list --versions sqlcipher | tr ' ' '\n' | tail -1)"
C_INCLUDE_PATH=$SQLCIPHER_PATH/include LIBRARY_PATH=$SQLCIPHER_PATH/lib pip3 install sqlcipher3==0.4.5

Then install the vault:

pip3 install pyvault

# Run setup
vault

Ubuntu / Debian

On Ubuntu/Debian, you can install sqlcipher with apt:

sudo apt update
sudo apt install -y gcc python3-dev libsqlcipher-dev xclip

Then install the vault:

pip3 install pyvault

# Run setup
vault

Using Docker

# Pull the image
docker pull gabfl/vault

# Create local directory
mkdir ~/.vault

# Launch image
docker run -v ~/.vault:/root/.vault -ti gabfl/vault

Cloning the project

# Clone project
git clone https://github.com/gabfl/vault && cd vault

# Installation
pip3 install .

# Run setup
vault

Advanced settings:

usage: vault [-h] [-t [CLIPBOARD_TTL]] [-p [HIDE_SECRET_TTL]]
             [-a [AUTO_LOCK_TTL]] [-v VAULT_LOCATION] [-c CONFIG_LOCATION]
             [-k] [-i IMPORT_ITEMS] [-x EXPORT] [-f [{json}]] [-e]

optional arguments:
  -h, --help            show this help message and exit
  -t [CLIPBOARD_TTL], --clipboard_TTL [CLIPBOARD_TTL]
                        Set clipboard TTL (in seconds, default: 15)
  -p [HIDE_SECRET_TTL], --hide_secret_TTL [HIDE_SECRET_TTL]
                        Set delay before hiding a printed password (in
                        seconds, default: 15)
  -a [AUTO_LOCK_TTL], --auto_lock_TTL [AUTO_LOCK_TTL]
                        Set auto lock TTL (in seconds, default: 900)
  -v VAULT_LOCATION, --vault_location VAULT_LOCATION
                        Set vault path
  -c CONFIG_LOCATION, --config_location CONFIG_LOCATION
                        Set config path
  -k, --change_key      Change master key
  -i IMPORT_ITEMS, --import_items IMPORT_ITEMS
                        File to import credentials from
  -x EXPORT, --export EXPORT
                        File to export credentials to
  -f [{json}], --file_format [{json}]
                        Import/export file format (default: 'json')
  -e, --erase_vault     Erase the vault and config file

More Repositories

1

pg_dump-to-s3

Automatically dump and archive PostgreSQL backups to Amazon S3
Shell
121
star
2

bigquery_fdw

BigQuery Foreign Data Wrapper for PostgreSQL
Python
89
star
3

mysql_generate_series

mysql_generate_series is a MySQL replica of PostgreSQL's generate_series functions
60
star
4

redis-priority-queue

Simple Redis work queue with added features (priorities, pop multiple items at once)
Python
40
star
5

sql2csv

Run MySQL and PostgreSQL queries and store result in CSV
Python
32
star
6

password-generator-py

Passwords easy for humans, hard for computers
Python
29
star
7

mysql-batch

Run large MySQL UPDATE and DELETE queries with small batches to prevent table/row-level locks
Python
25
star
8

webhook

Easily test webhooks and other HTTP requests
Python
17
star
9

dbschema

MySQL/PostgreSQL schema migrations made easy
Python
16
star
10

pg-batch

Run large PostgreSQL UPDATE and DELETE queries with small batches to prevent locks
Python
15
star
11

roulette

Python roulette game
Python
14
star
12

PHP-PSR-2-Fixer-Coda-Plugin

Coda Plugin that uses PHP_CodeSniffer to automatically fix PHP coding standards issues
Shell
6
star
13

sitecrawl

Simple Python module to crawl a website and extract URLs
Python
5
star
14

shachange

Change an image sha signature
Python
4
star
15

pg_IdFromDate

PostgreSQL methods to efficiently find the ID associated to a date in a big data table
PLpgSQL
3
star
16

http-sqlite

Rest API built on top of SQLite
Python
3
star
17

cloudssh

EC2 SSH connections helper
Python
2
star
18

redis-expire-least-used

Redis 2 step expiration tool to pre-expire least used items on a Redis server
Lua
2
star
19

sample-django

Django basic example
Python
1
star
20

sitemap_maker

Python tool to generate sitemap XML files
Python
1
star
21

sample-flask

Flask basic example
Python
1
star
22

deb

Ubuntu repo
1
star