Code Monkey home page Code Monkey logo

pyvault's Introduction

PyVault

GitHub Release

A secure, user-friendly API for storing and retrieving encrypted sensitive data. All data is encrypted using public/private key encryption before being stored in a secure database. As privacy is a main concern, the server never stores the keys used to encrypt the data, so only the client can decrypt it.

The current version of the project is a work in progrss and handles simple text data such as passwords, API keys, etc. Future releases will include support for files, images, and other data types.

Key Features:

  • Data encryption: Data is encrypted before being stored on the server.
  • Public/private key encryption: Sets of keys are created and used to encrypt and decrypt data. Keys are kept by the user and never stored on the server.
  • User authentication: Users can create accounts and log in to access their data with ease.
  • Data Association: Data can be associated with particular websites, applications, or services.

Getting Started

Prerequisites

  • Python 3.10
  • Virtualenv (Recommended)

(Optional) Create a virtual environment

# Create the venv
$ python3 -m venv env

# Activate it
$ source env/bin/activate

Clone and Setup

# Clone the repository
$ git clone https://github.com/afesuazo/vault
$ cd vault

# Run the setup script to install packages
# Same as pip3 install -r requirements.txt
$ chmod +x ./setup.sh
$ ./setup.sh

Configuration File

Create a config.py with the following content and replace the values with your own

# config.py
SECRET_KEY = "SECRET_KEY"
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 30

DB_URL = "postgresql+asyncpg://<user>:<password>@<127.0.0.1>:<5432>/<db_name?"
REDIS_URL = "redis://<localhost>:<6379>"

TESTING = False
TEST_DB_URL = "postgresql+asyncpg://<test_user>:<test_password>@<127.0.0.1>:<5432>/<test_db_name>"

The file should be placed in the root directory of the project.

Running the Program

$ chmod +x ./run.sh
$ ./run.sh

Or run it manually:

gunicorn -c gunicorn_conf.py app.main:app

Then visit http://localhost:4545 in your web browser. You should see the words "Vault Active!" printed to your screen.

You can also visit http://localhost:4545/docs to access the interactive API documentation interface created by FastAPI.

Testing

The project uses pytest for testing. To run the tests, simply run the following command:

$ pytest

Usage

API documentation will be available soon. In the meantime check the /docs endpoint for the interactive API documentation.

Feedback

If you come across any bugs or have any ideas for improvements, please create an issue ticket in the repository.

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.

Planned Features and Improvements

  • Move configuration to a .env file
  • Loginless authentication
  • Basic CLI
  • Data Sharing
  • Extend data types to include files, images, etc.

pyvault's People

Contributors

afesuazo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.