SnailPass is a simple, opensource and multiplatform password manager. At the moment there are clients only for Windows and Android. This repository is the server. SnailPass-Server project contains the RESTful API, database, and other core infrastructure items needed for the "backend" of all client applications.
The server project is written in Python using Flask. The codebase can be developed, built, run, and deployed cross-platform on Windows, macOS, and Linux distributions.
Encryption in client applications implemented using a symmetric algorithm with a hashed master password as a key. At the same time the key isn't stored anywhere and never transmitted over the network. For this reason, the data can be decrypted only locally and the server stores only the cipher.
- AES-CBC as a symmetric-key algorithm.
- Pbkdf2 as a key derivation function.
- SHA-512 as a hash function.
Flask-RESTful
as an extension for Flask that adds an abstraction for building REST APIsSQLAlchemy
as a SQL toolkit and ORMpytest
as a library for codebase testing
Please refer to the Deployment Guide down below to quickly spin up a server container. Check out API Documentation to learn about all the features, endpoints and request/response structures.
You can deploy SnailPass-Server using Docker containers on Windows, macOS, and Linux distributions. Use the provided terminal commands to get started.
- Docker
- Docker Compose (already included with some Docker installations)
Uses Flask's development server (port 5000) and SQLite database which recreates every time container is started.
docker-compose build
docker-compose up -d
Uses uWSGI server, postgres database and nginx as reverse proxy (port 80).
docker-compose -f docker-compose-prod.yml build
docker-compose -f docker-compose-prod.yml up -d
docker-compose -f docker-compose-prod.yml exec flask python manage.py recreate_db
NOTE: Execute last command only if you starting container for the first time or if you want to CLEAR production database.
Production config also requires .env
, nginx.conf
and uwsgi.ini
files with sensitive info in the project directory. .env
file template:
PROD_POSTGRES_USER=username
PROD_POSTGRES_PASSWORD=userpassword
PROD_POSTGRES_DB=databasename
SNAILPASS_DATABASE_URI=postgresql://username:userpassword@postgres/databasename
SNAILPASS_SECRET_KEY=secretkey
MAIL_DEFAULT_SENDER=maildefaultsender
MAIL_USERNAME=mailusername
MAIL_PASSWORD=mailpassword