aha-oida / aha-secret

Share secrets encrypted
GNU General Public License v3.0
3 stars 0 forks source link
browser crypto encryption passwords ruby secrets share webservice

aha-secret

Sensitive information should not be stored in a mailbox or chat history.

aha-secret allows you to store a secret message encrypted. Only the generated link could decrypt the message again. The message is encrypted by your browser and decrypted by the browser of the person who is allowed to read it. The first time someone clicks on the link, the message is automatically deleted from the server.

Screenrecord of encryption and decryption

Run dev server

bundle install
overcommit --install
bundle exec rake db:migrate
bundle exec rake serve
# or: bundle exec rackup
# or: bundle exec rerun rackup

See available rake tasks

bundle exec rake -T

Create migration

bundle exec rake db:create_migration NAME=[migration_name]

Run application

bundle exec rake db:migrate
bundle exec rerun rackup

Run console

bin/console

Docker

Build Container

docker build -t aha-secret .

Run Application

Please note that the following command will not persist any data and stored secrets will be deleted if the container is stopped

docker run --rm -it aha-secret

run specs

RACK_ENV=test bundle exec rake db:migrate
bundle exec rspec
# OR
bundle exec rake

Environment variables

The following environment variables can be used:

Variable Description Default
URL Add url as origin base-url
SESSION_SECRET Set custom session-secret random
MEMCACHE Set a memcache-server and enable rack-attack empty(disable rack-attack)

Docker-Compose

It is possible to start this application using docker-compose. It will not only start aha-secret but also a memcache-service to the request-attempts for Rack::Attack.

The docker-compose-file uses the github-docker-repository to download the aha-secret docker-image. In order to run aha-secret follow these instructions:

First download docker-compose:

$ wget https://raw.githubusercontent.com/aha-oida/aha-secret/main/docker-compose.yml

Next create a .env-file with the following content:

RACK_ENV=production
URL=https://please.change.me.now
MEMCACHE=memcached:11211

Finally start the containers:

docker-compose up -d

***Please note that this docker-compose file will not deploy a reverse-proxy. It is recommended to use a reverse proxy for production environments