Skip to content

horseinthesky/gophkeeper

Repository files navigation

🔒 gophkeeper

gophkeeper is a PoC secret storage service.

main

✨ Features

  • 📦 Manage all secrets with a nice bubbletea powered UI
  • 🚀 Fast secret management thanks to automatic caching
  • 🔒️ High privacy with GCM encryption
  • 💾 Transparent background synchronization with the server
  • 💪 Async execution for improved performance

New secret

Select a secret kind

new

Fill new secret form

entry

Display your secret info

show

Supported secret kinds

  • Login/Password pairs
  • Arbitrary text
  • Arbitrary bytes (files)
  • Bank card credentials

⚡️ Requirements

  • Git
  • Docker
  • Go >= 1.19

📦 Installation

Clone the repo.

Next install dependencies

make init

Then build packages

make build

🚀 Usage

Server

The Server supports the following settings:

  • env - environment determines what the logging level and log format will be
    • dev - plain text colored INFO level logs
    • prod (default) - JSON WARN level logs
  • address - address:port to listen on (defaults to localhost:8080)
  • dsn - PostgreSQL database DSN
  • clean - database cleanup time interval (defaults to 15m)

All can set all the settings in the config file (-c flag) or via env vars (overrides config file values) with the same names prefixed with GOPHKEEPER_ (e.g. GOPHKEEPER_ENV).

Run server with:

./gs -c <your_server_config.yml>

🐳 Docker

You can also run gophkeeper server side in docker. Image will be automatically build for you.

Run gophkeeper server:

make sup

Stop gophkeeper server:

make sdown

Client

Client settings are the following:

  • user (mandatory) - your username
  • password (mandatory) - your password
  • encrypt (default is true) - if gophkeeper should encrypt your secrets
  • key (mandatory 32 bytes master password if encrypt set to true) - this key will be used to encrypt your secrets
  • env - environment determines what the logging level and log format will be
    • dev - plain text colored INFO level logs
    • prod (default) - JSON WARN level logs
  • address - address:port of the server to connect to (defaults tolocalhost:8080)
  • dsn - PostgreSQL database DSN
  • sync - secret synchronization time interval (defaults to 15s)
  • clean - database cleanup time interval (defaults to 1m)

All can set all the settings in the config file (-c flag) or via env vars (overrides config file values) with the same names prefixed with GOPHKEEPER_ (e.g. GOPHKEEPER_ENV).

Run client with:

./gc -c <your_client_config.yml>

The client will automatically register/login (if you are an existing user) with provided credentials.

🔨 Dev

For development you will need additional tools:

Install them with

make dev

Next prepare test databases for client/server

make mkdb
make migrateup

You can refresh (purge and reinstall) your DBs with

make refreshdb

You an also renew client/server certificates with

make cert

About

Yandex Practicum Second Diploma

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published