Skip to content

lennartkloock/simple-password-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CI

πŸ” Simple Password Vault

πŸ”Œ Setup

πŸ“‚ Download

First, download the latest tar archive from releases and unpack it.

curl -sL --url 'https://github.com/lennartkloock/simple-password-vault/releases/download/v0.2.0/simple_password_vault.tar.gz' --output 'simple_password_vault.tar.gz'
tar -xzf simple_password_vault.tar.gz
cd spv

Now, the new folder should contain the following items:

  • the server binary simple-password-vault
  • the default configuration file Rocket.toml
  • a folder called public (This folder contains all HTML, CSS and images)

πŸ”§ Configuration

To make sure the password vault can encrypt all stored passwords securely, please generate a new RSA keypair. The keypair must be encoded in PEM PKCS#1.

openssl genrsa -out keys/rsakey.pem 2048
openssl rsa -in keys/rsakey.pem -outform PEM -pubout -out keys/rsapubkey.pem

To configure the password vault, please edit the Rocket.toml file. Since the password vault is built on top of the Rocket framework, the configuration format and all of rocket's configuration parameters can be used to further configure the password vault.

Additionally, the following keys can be used:

Key Description Default value Example value
name The application's name which will be displayed in the top left corner "Password Vault" "My cool password safe"
db_url The MySQL/MariaDB database url "mariadb://root:password@localhost:3306/vault_db"
static_dir The directory of all static files (css, fonts and images) "public/static" "public/static"
token_length The length that will be used when generating new authorization tokens 32 64
token_validity_duration_secs The duration in seconds that one authorization token (login session) needs to expire 86400 (1 day) 604800 (7 days)
public_key_path The path to the public encryption key (relative to the binary) "keys/rsapubkey.pem" "keys/key_pub.pem"
private_key_path The path to the private encryption key (relative to the binary) "keys/rsakey.pem" "keys/key.pem"

⚠️ Attention: Be aware that every file placed in the folder specified in static_dir or any sub folders will be publicly reachable through the webserver!

Example configuration

[default]
address = "0.0.0.0"
port = 80
name = "Password Vault"
db_url = "mariadb://root:password@localhost:3306/vault_db"
template_dir = "public/templates"

πŸš€ Run it

Note: You will need to create the specified database, otherwise the next step will fail. (For example with: CREATE DATABASE vault_db;)

After editing the Rocket.toml file according to your wishes, you can run the binary:

./simple-password-vault

When everything worked you should be able to navigate to the specified port in your web browser.

In the following you have to set a new password for the admin account. This only happens at the first launch of the application or when all admin accounts were deleted. After logging in with your newly created admin account, the password vault is ready to be used.

πŸ“· Screenshots

no-table important-passwords customer-passwords

πŸ“œ License

This software is licensed under the terms of the MIT license.


Β© 2021 Lennart Kloock
Free icons by Streamline