• Stars
    star
    1,823
  • Rank 25,474 (Top 0.6 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created almost 11 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Secure sharing of secrets, passwords and files

Yopass-horizontal

Yopass - Share Secrets Securely

Go Report Card codecov

demo

Yopass is a project for sharing secrets in a quick and secure manner*. The sole purpose of Yopass is to minimize the amount of passwords floating around in ticket management systems, Slack messages and emails. The message is encrypted/decrypted locally in the browser and then sent to yopass without the decryption key which is only visible once during encryption, yopass then returns a one-time URL with specified expiry date.

There is no perfect way of sharing secrets online and there is a trade off in every implementation. Yopass is designed to be as simple and "dumb" as possible without compromising on security. There's no mapping between the generated UUID and the user that submitted the encrypted message. It's always best to send all the context except password over another channel.

Demo available here. It's recommended to host yopass yourself if you care about security.

  • End-to-End encryption using OpenPGP
  • Secrets can only be viewed once
  • No accounts or user management required
  • Secrets self destruct after X hours
  • Custom password option
  • Limited file upload functionality

History

Yopass was first released in 2014 and has since then been maintained by me and contributed to by this fantastic group of contributors. Yopass is used by many large corporations none of which are currently listed in this readme. If you are using yopass and want to support other then by code contributions. Give your thanks in an email, consider donating or by giving consent to list your company name as a user of Yopass in this readme(Trusted by)

Trusted by

Command-line interface

The main motivation of Yopass is to make it easy for everyone to share secrets easily and quickly via a simple webinterface. Nevertheless, a command-line interface is provided as well to support use cases where the output of a program needs to be shared.

$ yopass --help
Yopass - Secure sharing for secrets, passwords and files

Flags:
      --api string          Yopass API server location (default "https://api.yopass.se")
      --decrypt string      Decrypt secret URL
      --expiration string   Duration after which secret will be deleted [1h, 1d, 1w] (default "1h")
      --file string         Read secret from file instead of stdin
      --key string          Manual encryption/decryption key
      --one-time            One-time download (default true)
      --url string          Yopass public URL (default "https://yopass.se")

Settings are read from flags, environment variables, or a config file located at
~/.config/yopass/defaults.<json,toml,yml,hcl,ini,...> in this order. Environment
variables have to be prefixed with YOPASS_ and dashes become underscores.

Examples:
      # Encrypt and share secret from stdin
      printf 'secret message' | yopass

      # Encrypt and share secret file
      yopass --file /path/to/secret.conf

      # Share secret multiple time a whole day
      cat secret-notes.md | yopass --expiration=1d --one-time=false

      # Decrypt secret to stdout
      yopass --decrypt https://yopass.se/#/...

Website: https://yopass.se

The following options are currently available to install the CLI locally.

  • Compile from source (needs Go >= v1.15)

    export GO111MODULE=on && go get github.com/jhaals/yopass/cmd/yopass && go install github.com/jhaals/yopass/cmd/yopass
  • Arch Linux (AUR package)

    yay -S yopass

Installation / Configuration

Here are the server configuration options.

Command line flags:

$ yopass-server -h
      --address string     listen address (default 0.0.0.0)
      --database string    database backend ('memcached' or 'redis') (default "memcached")
      --max-length int     max length of encrypted secret (default 10000)
      --memcached string   Memcached address (default "localhost:11211")
      --metrics-port int   metrics server listen port (default -1)
      --port int           listen port (default 1337)
      --redis string       Redis URL (default "redis://localhost:6379/0")
      --tls-cert string    path to TLS certificate
      --tls-key string     path to TLS key

Encrypted secrets can be stored either in Memcached or Redis by changing the --database flag.

Docker Compose

Use the Docker Compose file deploy/with-nginx-and-letsencrypt/docker-compose.yml to set up a yopass instance with TLS transport encryption and certificate auto renewal using Let's Encrypt. First point your domain to the host you want to run yopass on. Then replace the placeholder values for VIRTUAL_HOST, LETSENCRYPT_HOST and LETSENCRYPT_EMAIL in deploy/with-nginx-and-letsencrypt/docker-compose.yml with your values. Afterwards change the directory to deploy/with-nginx-and-letsencrypt and start the containers with:

docker-compose up -d

Yopass will then be available under the domain you specified through VIRTUAL_HOST / LETSENCRYPT_HOST.

Advanced users that already have a reverse proxy handling TLS connections can use the insecure setup:

cd deploy/docker/compose/insecure
docker-compose up -d

Afterwards point your reverse proxy to 127.0.0.1:80.

Docker

With TLS encryption

docker run --name memcached_yopass -d memcached
docker run -p 443:1337 -v /local/certs/:/certs \
    --link memcached_yopass:memcached -d jhaals/yopass --memcached=memcached:11211 --tls-key=/certs/tls.key --tls-cert=/certs/tls.crt

Afterwards yopass will be available on port 443 through all IP addresses of the host, including public ones. If you want to limit the availability to a specific IP address use -p like so: -p 127.0.0.1:443:1337.

Without TLS encryption (needs a reverse proxy for transport encryption):

docker run --name memcached_yopass -d memcached
docker run -p 127.0.0.1:80:1337 --link memcached_yopass:memcached -d jhaals/yopass --memcached=memcached:11211

Afterwards point your reverse proxy that handles the TLS connections to 127.0.0.1:80.

AWS Lambda

Yopass website is a separate component in this step which can be deployed to netlify for free.

You can run Yopass on AWS Lambda backed by dynamodb

cd deploy/aws-lambda && ./deploy.sh

Kubernetes

kubectl apply -f deploy/yopass-k8.yaml
kubectl port-forward service/yopass 1337:1337

This is meant to get you started, please configure TLS when running yopass for real.

Monitoring

Yopass optionally provides metrics in the OpenMetrics / Prometheus text format. Use flag --metrics-port <port> to let Yopass start a second HTTP server on that port making the metrics available on path /metrics.

Supported metrics:

  • Basic process metrics with prefix process_ (e.g. CPU, memory, and file descriptor usage)
  • Go runtime metrics with prefix go_ (e.g. Go memory usage, garbage collection statistics, etc.)
  • HTTP request metrics with prefix yopass_http_ (HTTP request counter, and HTTP request latency histogram)

Translations

Yopass has third party support for other languages. That means you can write translations for the language you'd like or use a third party language file. Please note that yopass itself is english only and any other translations are community supported.

Here's a list of available translations:

More Repositories

1

ansible-vault

ansible lookup plugin for secrets stored in Vault(by HashiCorp)
Python
347
star
2

puppet-anvil

Your private Puppet Forge
Go
39
star
3

url-shortener

Tiny url shortener backed by sqlite
Go
33
star
4

droptoflare

Creates DNS records for your DigitalOcean Droplets in Cloudflare
Ruby
27
star
5

vault-java

Java implementation of the Vault(Hashicorp) API
Java
18
star
6

tutter

Plugin based Github robot
Ruby
15
star
7

python-filebutler

minimalistic file sharing service
Python
14
star
8

jhaals-warranty

Puppet module that provides warranty information for Dell/Lenovo Hardware
Ruby
13
star
9

iptables-etcd

Fetch iptables rules from etcd
Go
8
star
10

puppet-forge-mirror

simple tool that mirrors the Puppet Forge
Ruby
7
star
11

docker-mumble-server

Docker container for Mumble server
Ruby
6
star
12

yopass-cli

CLI for yopass
Ruby
5
star
13

filebutler-upload

filebutler-upload is a lightweight python application that let you upload files to python-filebutler
Python
5
star
14

tutter-sppuppet

tutter action - code review without collaborator access
Ruby
4
star
15

srcpath

Automatically structures your git checkouts, go style ⭐
Go
4
star
16

yaml-parser

YAML validation by parsing
Ruby
4
star
17

servermonitor

Remote Server Surveillance
Python
3
star
18

jhaals-osx_notify

Desktop notifications for Mountain Lion via puppet
Ruby
3
star
19

Bouvet

Bouvet Island
3
star
20

puppetdb-grep

DEPRECATED - Grep for facter fact on all nodes matching your puppetdb query
Python
3
star
21

jhaals-app_inventory

This puppet module provides a software inventory for Mac OS X 10.5+
Ruby
3
star
22

script

random scripts
Python
2
star
23

gohealthy

Library for registering HTTP health checks
Go
2
star
24

SSSBackup

Simple Secure System Backup
Python
2
star
25

hoststat

Monitor hostnames for ip address changes
Go
2
star
26

yopass-next

TypeScript
2
star
27

stash-hook-router

Route Stash pull requests to different scripts
Go
1
star
28

short

Simple URL Shortener
Java
1
star
29

puppet-vagrant

Installs Vagrant via Boxen
Ruby
1
star
30

gopass

simple web service for sharing secrets/passwords
JavaScript
1
star
31

filebutler

compojure experiment
Clojure
1
star
32

chantop

Get Channel statistics from a running gRPC service
Go
1
star
33

urlstat

Monitor URLs for state changes
Go
1
star
34

yopass-java

TEST Implementation of Yopass in Java
Java
1
star
35

ec2-api-tools

Create debian package containing ec2-api-tools
Shell
1
star