Giter Site home page Giter Site logo

fmpoc / keyssrv Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 165.09 MB

A devops secrets manager

Home Page: https://pkhub.io

Shell 2.08% JavaScript 4.31% Ruby 0.01% Python 0.52% Java 0.06% Clojure 5.65% Go 52.57% CSS 15.75% Makefile 1.01% HTML 13.85% Dockerfile 0.31% SCSS 3.66% Starlark 0.15% Mustache 0.01% Jinja 0.04%

keyssrv's Introduction

keyssrv

This is a secrets manager like AWS Secrets Manager but different.

I'm hosting it at https://pkhub.io for my own use.

For docs on how it works check out https://docs.pkhub.io/usecases/cli_setup/

Encryption and keys

When you register as a user an encryption key is created, which is encrypted with your password.
Each safe you create has its own encryption key i.e one encryption key per safe. The safe's encryption key is then encrypted with your own encryption key.

So to read the content of a safe you need:

user-password = read
user-encryption-key = decrypt( encrypted-user-key, user-password)
safe-encryption-key = decrypt( safe.encrypted-key, user-encryption-key)

plain-text = decrypt( encrypted-data, safe-encryption-key)

Sharing safes

When you share a safe you share the encryption key of the safe with a user. The encryption key is encrypted with the user's encrypted key you share it with.

For example:

UserA share SafeA with UserB

userA-password = read 
userA-encryption-key = decrypt( encrypted-userA-key, userA-password)
safeA-encryption-key = decrypt( userA-safeA.encrypted-key, userA-encryption-key)

# this is stored in redis on a timeout
safeA-encrypted-key-share = encrypt(safeA-encryption-key, system-key)

# when user B accepts
userB-password = read 
userB-encryption-key = decrypt( encrypted-userB-key, userB-password)
safeA-encryption-key = decrypt(safeA-encrypted-key-share, system-key)

userB-safeA.encrypted-key = encrypt( safeA-encryption-key, userB-encryption-key)

Hosted service

I host this on AWS and behind a CloudFlare Proxy. CloudFlare's proxy provides extra security and automatically protects against certain online attacks. This was also the only service I found I could trust and that supports DNSSec.

License

This code is made available under the APACHE-2 License.
https://www.apache.org/licenses/LICENSE-2.0

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.