Coder Social home page Coder Social logo

jhaals / yopass Goto Github PK

View Code? Open in Web Editor NEW
1.7K 19.0 271.0 14.34 MB

Secure sharing of secrets, passwords and files

Home Page: https://yopass.se

License: Apache License 2.0

Go 36.36% Dockerfile 0.94% Shell 0.17% HTML 0.66% TypeScript 50.28% JavaScript 11.59%
sharing-secrets encryption-decryption hacktoberfest password-sharing

yopass's Introduction

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:

yopass's People

Contributors

0xflotus avatar boekkooi-lengoo avatar cleaverm avatar davidmind avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dunderrrrrr avatar flobeier avatar ftm-qsc avatar grobie avatar gruentee avatar hlubek avatar jcantara-work avatar jhaals avatar jhult avatar jockep avatar kevinrosendaal avatar mdurajewski avatar nbensa avatar nicolasstr avatar perlun avatar petterw avatar piraces avatar rbicker avatar roman-vynar avatar schmengler avatar sheeeng avatar snyk-bot avatar tolidano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yopass's Issues

Possible to remove destruction of secrets?

Hi Johan,

First of all, Great work! This is very impressive!

Is it possible to change the code to disable the destruction of secrets when viewed?
We're looking at deploying this internally, but in testing have found many people click the link by accident before distributing.

Obviously, if this is fundamentally impossible - we'll deal with it :)

Many thanks!

Failed to Fetch

I had to move the app to my new EKS cluster. Once I moved it, the app never worked as it used to. I would take a while to load and once it does and I try to translate a message it just says "Failed to Fetch". I tried updating the forked branch but that did not seem to make a difference. I can see the pod is running and the logs are only showing heath checks from the ALB, nothing else.

Not working in IE11

Hi, Yopass doesnt seem to work in IE11. Its just a blank page. Any plans on getting it to work on IE11?

docker-compose

I'd like to start the docker containers using docker-compose.

I'm currently running both memcached and yopass containers like this and it's working just fine. Perhaps this could be added to readme? Below is without TLS support. I'm running a separate nginx proxy for that.

version: '2.0'
services:
  memcached:
    restart: always
    image: "memcached"
    ports:
      - "11211:11211"
  yopass:
    restart: always
    image: "jhaals/yopass"
    ports:
      - "1337:1337"
    command: "--memcached=memcached:11211"
$ docker-compose up -d

Does the docker-compose file look okay? Any tips or trix @jhaals?

Cannot find package "github.com/go-redis/redis/v7"

: ~/go/src/github.com/jhaals/yopass/cmd/yopass git:(master) $ /usr/local/go/bin/go get
go get: warning: modules disabled by GO111MODULE=auto in GOPATH/src;
	ignoring ../../go.mod;
	see 'go help modules'
package github.com/go-redis/redis/v7: cannot find package "github.com/go-redis/redis/v7" in any of:
	/usr/local/go/src/github.com/go-redis/redis/v7 (from $GOROOT)
	/home/ws/go/src/github.com/go-redis/redis/v7 (from $GOPATH)

Feature Request: Add a "Copy to clipboard" button when viewing a decrypted message

Currently you have to manually select and copy the text, which is easy enough to do. However, it's also easy to miss some of the text by accident and only copy a portion of the text. Because the messages expire, and may be configured for "One-time download" so they can only be viewed once, it would be helpful to have a "Copy to clipboard" button on the Decrypted Message page to ensure that all of the text gets copied correctly.

Unable to store message in database, error: TypeError: Failed to fetch

Hi,
I've successfully installed yopass and it was working fine. After a while however I'm getting error message:
"Unable to store message in database, error: TypeError: Failed to fetch"

Then I need to reinstall the image and yopass is working fine for a while. Could you advise what it can be?

Docker build failing 2

Hi,
I'm getting following error during building container. Are you able to help?
Thanks.

Step 4/14 : COPY . .
 ---> 312f326bccc9
Step 5/14 : WORKDIR /yopass/cmd/yopass
 ---> Running in f2fd70ec00f8
Removing intermediate container f2fd70ec00f8
 ---> 253696da6b1a
Step 6/14 : RUN go get && go build
 ---> Running in b25d9937768a
go: finding github.com/spf13/viper v1.6.1
go: finding github.com/stretchr/testify v1.3.0
............
go: downloading gopkg.in/ini.v1 v1.51.0
go: downloading golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
go: downloading golang.org/x/text v0.3.0
go build github.com/jhaals/yopass/pkg/yopass: module requires Go 1.13
go build github.com/spf13/pflag: module requires Go 1.12
The command '/bin/sh -c go get && go build' returned a non-zero code: 1

Docker build failing

I'm getting the following error when trying to build the 8.0 docker container:

 ---> Running in a794bf84cb89
yarn install v1.13.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.14.7".
warning "react-scripts-ts > [email protected]" has unmet peer dependency "babel-core@6 || 7 || ^7.0.0-alpha || ^7.0.0-beta || ^7.0.0-rc".
warning "react-scripts-ts > [email protected]" has unmet peer dependency "babel-runtime@^6.23.0".
warning "react-scripts-ts > [email protected]" has incorrect peer dependency "typescript@^2.1.0".
warning "react-scripts-ts > [email protected]" has incorrect peer dependency "jest@^22.0.1 || ^22.1.0-alpha.1 || ^23.0.0-alpha.1".
warning "react-scripts-ts > [email protected]" has incorrect peer dependency "[email protected]".
[4/4] Building fresh packages...
Done in 48.80s.
yarn run v1.13.0
$ react-scripts-ts build
Failed to compile.

ENOENT: no such file or directory, stat '/website/public/yopass.svg'


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn install && yarn build' returned a non-zero code: 1


version 7.0 builds without issue

add rate limiting

Ability to rate limit requests. This can be done by an apache/nginx proxy but it should be added to yopass since it ships with a proper web server nowadays

Is it possible to overwrite HTML/CSS?

Hi, I want to adopt the FE slightly of the app. Could you provide me some tipps how this could be solved? If I understand correct, the docker image has only compiled templates.

Could you provide me some tipps how to build the Dockerfile by my own with modified frontend related source files? (HTML, CSS, JS)

File Encryption

It would be great to send someone a link to an encrypted blob read from a file.
In this case, the blob would be stored in the dynamo table

See a demo of how this works elsewhere here: https://demo.tutorialzine.com/2013/11/javascript-file-encrypter/

We can use CryptoJS to allow the user to select a file, it will be encrypted client-side in the browser, we can then base64 encode the file and compute a sha1, and ship both to DynamoDB so the URL becomes the sha1/random-decrypt-key and then at the other end, it downloads the file out of Dynamo.

Install on cPanel instance

Is there a way to install on cPanel? I have tried copying the files from the public folder to my cPanel public_html directory but when I click the Encrypt Message button nothing happens.

optionally Expose upload functionality

the upload functionality available under /#/upload is super useful for sharing certificates etc, can you please add an option to link to this page from the main page?

Error running: multiple-value uuid.NewV4() in single-value context

I've (I think) installed the dependencies, but when I try to run it I get this:

# github.com/jhaals/yopass/pkg/yopass
jhaals/yopass/pkg/yopass/yopass.go:50:19: multiple-value uuid.NewV4() in single-value context

Info:

go version go1.10.4 **linux/amd64**

# go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build556093694=/tmp/go-build -gno-record-gcc-switches"

Text misleading for new permanent links

Hi there,

when you use the feature to create links that can be used multiple times, the following text is still shown to users:

"Remember that the secret can only be downloaded once so do not open the link yourself."

Can't exec sh into yopass container

Hi,
First thanks for the great app.
I have a problem executing into yopass container, I tried the following without avail:
docker exec -ti deploy_yopass_1 /bin/sh
docker exec -ti deploy_yopass_1 /bin/bash

It seems that i can't find any installed shell in the docker container.

Encrypt stored passwords

Currently the passwords are stored in clear-text. This exposes all stored passwords if the machine is breached.

Security could be enhanced if the URL that is passed around contained a secret. yopass would then transparently decrypt the stored password and display it.

Support for file sharing

Background: I wanted to share a file securily with someone this morning. I ended up encrypting using gpg --symmetric, e-mailing the file and sending the secret through Yopass. Two issues with this:

  • For a non-technical person this would not be doable (they would likely resort to some less good zip file format encryption algorithm).
  • Experience of sharing a file was really bad encouraging me, and others, to reinvent file sharing procedures.
    • Specifically for my solution, the encrypted file might reside in the receiving e-mail inbox without me knowing. Preferably the file should not be stored online at all after it has been downloaded by the receiver.

Proposal: Add support for file uploads and downloads for sharing larger secrets.

Scope: For simplicity, I propose only a single file can be uploaded. The submitter can easily bundle multiple files in a zip file.

Potential workaround: I tried to base64 encode the file I wanted to share and paste it into Yopass. For smaller files this might work, however, Yopass responsed that my secret was too large (possible to raise this limit?).

Discussion points: Yopass uses memcached. memcached has default --max-item-size=1mb so assuming no partioning is done, that will be the upper size. That said, the memcached limit can be raised to allow larger files. I don't think raising the limit has any big implications.

Add delete button for non one-time passwords

Hey, I really like the checkbox for the "one-time view". However, it's not possible to delete such an entry while viewing the content.

What do you think about adding such a button in the UI?

Optional Decryption Key

Hello,
I'd like to share with you with my modification, which allow users define the Decryption Key on the own.
I'm not the programist, so forgive me possible mistakes.

Maybe you will consider to extend main code with this possibility.

[...]
  const submit = async () => {
    if (secret === '') {
      return;
    }
    //new optional key validation 
    if (password !== '') {

      if (password.length > 30) {
          setLoading(false);
          setError('Decryption key is to long');
          return;
      }

      const letterNumber = /^[0-9a-zA-Z]+$/;
      if (!password.match(letterNumber)) {
          setLoading(false);
          setError('Decryption key is not alphanumeric');
          return;
      }
    }
//end of new optional key validation 

    setLoading(true);
    setError('');

    try {
//modified 
        const rand = randomString();
        let pw;
        if (password === ''){
         pw = rand;
        } else {
         pw = password;
        }
//end modification
      const request = await fetch(BACKEND_DOMAIN, {

[....]
        <Form>
          <FormGroup>
            <Label>Secret message</Label>
            <Input
              type="textarea"
              name="secret"
              rows="4"
              autoFocus={true}
              placeholder="Message to encrypt locally in your browser"
              onChange={e => setSecret(e.target.value)}
              value={secret}
            />
          </FormGroup>
//add new Form Group
          <FormGroup>
            <Input
              rows="1"
              type="text"
              name="password"
              placeholder="Optional alphanumeric Decryption Key"
              onChange={e => setPassword(e.target.value)}
              value={password}
            />
          </FormGroup>
//end of new Form Group
          <FormGroup tag="fieldset">
            <Label>Lifetime</Label>

In my installation I also reduced the autogenerated Key to 6 digits:

const randomString = (): string => {
  let text = '';
  const possible =
    '0123456789';
  for (let i = 0; i < 6; i++) {
    text += possible.charAt(randomInt(0, possible.length));
  }
  return text;
};

Have a nice day.
Regards.

increase max size of secrets

Memcache by default can store 1M items and dynamodb can store 400kB, currently yopass can only store items under 10,000 in length. I suggest increasing the size to closer to the max dynamodb size or having a config option to optionally increase this

Logo Proposal

Hi, i am a graphics designer. I will like to know if you want me to create a new logo for your project.

yopass and lets encrypt certificate

Johan, I'm really sorry but as I'm not sure if you watch closed issues, so I opened new one.
Basically I missed "s" in certs but only in description of the issue. On the server I haven't missed it, and just in case in once I've changed certs to cert but everywhere in the command and folder. Unfortunately it didn't help. Have you tried youpass with certbot? I really like youpass but so far I used public certificate authority and now I would like to install letsencrypt. Is it possible? Unfortunately the software works in docker and I don't have too much experience with the docker so my plan was to:

  1. Stop docker service
  2. run certbot to get/renew certificate
  3. start docker.

It should work but unfortunately youpass container doesn't seem to find my certificate.

Errors building Go lambda function in deploy/aws-lambda: GitHub repos no longer exist

The code in deploye/aws-lambda references some GitHub repos that do not exist.

$ cd deploy/aws-lambda
$ GOOS=linux go build -o main
main.go:10:2: cannot find package "github.com/akrylysov/algnhsa" in any of:
	/usr/src/github.com/akrylysov/algnhsa (from $GOROOT)
	/home/USER/go/src/github.com/akrylysov/algnhsa (from $GOPATH)
main.go:12:2: cannot find package "github.com/aws/aws-sdk-go/aws" in any of:
	/usr/src/github.com/aws/aws-sdk-go/aws (from $GOROOT)
	/home/USER/go/src/github.com/aws/aws-sdk-go/aws (from $GOPATH)
main.go:13:2: cannot find package "github.com/aws/aws-sdk-go/aws/session" in any of:
	/usr/src/github.com/aws/aws-sdk-go/aws/session (from $GOROOT)
	/home/USER/go/src/github.com/aws/aws-sdk-go/aws/session (from $GOPATH)
main.go:14:2: cannot find package "github.com/aws/aws-sdk-go/service/dynamodb" in any of:
	/usr/src/github.com/aws/aws-sdk-go/service/dynamodb (from $GOROOT)
	/home/USER/go/src/github.com/aws/aws-sdk-go/service/dynamodb (from $GOPATH)
main.go:15:2: cannot find package "github.com/jhaals/yopass/pkg/yopass" in any of:
	/usr/src/github.com/jhaals/yopass/pkg/yopass (from $GOROOT)
	/home/USER/go/src/github.com/jhaals/yopass/pkg/yopass (from $GOPATH)

Bare metal deployment returns 404

I'm attempting to setup yopass compiled from source based on the latest tag, listening to localhost with a reverse proxy in front. However I can't reach the yopass instance. What may I be missing?

Many thanks for a great piece of software that served me well on many occasions.

# ps uaxww | grep -E 'yopass|redis'
redis    18838  0.1  0.0  51444  2376 ?        Ssl  23:12   0:00 /usr/bin/redis-server 127.0.0.1:6379
yopass   19471  0.0  0.2 313464  7728 ?        Ssl  23:13   0:00 /usr/bin/yopass serve --address 127.0.0.1 --port 8080 --database redis


# curl -X GET http://localhost:8080
404 page not found
# curl -X GET http://localhost:8080/yopass
404 page not found

Corrupted archives after downloading

Hello,
I tested a little bit an file uploading feature and I noticed a problem with sharing zip/7z archives.
After uploading and downloading an archive become corrupted and unreadable.

I attach a sample zip files with almost empty txt file inside and same files after being downloaded.

Sharing file is great feature even for small files (this is enough for sharing certificates or VPN's profiles) when it's working correctly. 😄

Regards.

sample.zip
sample-downloaded.zip

HTTPS

Hi,
I'm trying to run yopass on port 443 but setting it like below doesn't work. It does on 1337, Could you advise please?

docker run --name memcached_yopass -d memcached

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

docker run -p 443:443 --link memcached_yopass:memcache -d jhaals/yopass -memcached=memcache:11211

Malformed UTF-8 data

With Linux Chrome 57.0.2950.4 dev (64-bit), after entering the decoding key, nothing is shown.

The console shows this error:

Error: Malformed UTF-8 data         angular.js:12416
    at Object.stringify (aes.js:10)
    at init.toString (aes.js:8)
    at app.js:60
    at angular.js:10215
    at angular.js:14634
    at n.$eval (angular.js:15916)
    at n.$digest (angular.js:15727)
    at n.$apply (angular.js:16024)
    at g (angular.js:10511)
    at K (angular.js:10683)
(anonymous)	@	angular.js:12416

Include Cookies in requests

Hi Johan,

thanks for the great software
I am running yopass behind SSO. Authentication is done via a cookie.
Unfortunately currently yopass is not sending the cookies with the request.
The field that will most likely solve this is: https://developer.mozilla.org/en-US/docs/Web/API/Request/Request credentials: include
I do not see any case where transmitting the cookie with the request would have negative consequences, so this might be good to make the default behaviour.

Prometheus support

Hey @jhaals,

first of all, thanks so much for yopass, we're big fan here at SoundCloud! It's our favorite tool to quickly share some credentials with others.

We wonder if you were to accept a submission to add Prometheus monitoring to yopass, to track number of requests and errors? I saw that the prometheus client library is already in the list of dependencies. So we'd only need to load the library, add one metric, and expose the /metrics handler. https://godoc.org/github.com/prometheus/client_golang/prometheus/promhttp#InstrumentHandlerDuration

Cheers!

suggestion: Add ability to share pictures

Hi,

it would be nice if one could paste in pictures to share via browser.
This could be used to share 2d barcodes which we use to share secrets for OTP auth devices.

OR add setting to display as 2D barcode which would safe space but be less generic

letss encrypt certificate

Hi,

I'm trying to change my certificate to generated by certboot. Unfortunately I have strange issue with this as when I'm using command:

docker run -p 443:1337 -v /etc/letsencrypt/live/yopass.mydomain.com:/certs
--link memcached_yopass:memcache -d jhaals/yopass -memcached=memcache:11211 -tls.key=/certs/privkey.pem -tls.cert=/certs/fullchain.pem

I'm getting error message:
2019/02/14 15:47:58 Starting yopass. Listening on port 1337
2019/02/14 15:47:58 open /cert/fullchain.pem: no such file or directory

The file definitely is in in the folder and it seems accepting first one (privkey.pem).

When I remove from the command " -tls.key=/certs/privkey.pem" of course youpass doesn't work but container starts so I guess it finds the /cert/fullchain.pem file.

I've tried to resolve this issue myself but after few hours of attempts eventually gave up.

Could you help me please?

a secret with special characters cannot be viewed properly

If i submit a secret string "mystring>" via REST api, the only way to view it is by going to link
/secret/<key>
Which returns a json and is not decoded.

Please allow to get via url without decrypt key i.e. below should work
https://yopass.se/#/s/7ca6f773-c77f-11e6-89b0-0242ac110004

My use case was to send non-technical people, secure yopass urls, so that they could collect their passwords.
/secret/<key>
resulted in a json response in their browser with special characters messed up
@jhaals

Failed To Fetch

Hi,

I have just started using this app. Its running on my EKS cluster. The containers are running and are healthy. It worked for a new days like a charm, but now, when I try to Encrypt a message it just returns "Failed to fetch".
image

Looking at the container logs I don't see anything other than ALB health checks:

10.5.x.x - - [15/May/2020:17:19:27 +0000] "GET / HTTP/1.1" 200 2609
10.5.x.x - - [15/May/2020:17:19:27 +0000] "GET / HTTP/1.1" 200 2609

I tried to kill the pod and a new one created but exact same behavior.

Anyone experienced this?

API use and documentation

In a previous version of yopass there was a rudimental documentation of an API via HTTPS and JSON (see here).

Since your last bigger rewrite and the change to the sjcl cryptolibrary this part is missing in the README of the project.

We consider to automate a secure secret delivery in one of our internal services, so yopass would be a nice solution. (A yopass instance is already running but at this point only used in browser)

While the most of the JSON API is still working as expected...

# request
curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"secret":"secret","Expiration":3600}' \
  https://dasvcjfzrl.execute-api.eu-west-1.amazonaws.com/dev/secret

# response
{"message":"ea75ddc4-bcad-43b7-b767-7546253e8ca8"}

... At this point I need to know how the encryption part can be done locally without JS before sending the request to the server. You seem to use the SJCL defaults.

But I haven't got this managed so far. Do you have an idea on how an api client can do that?

It would be nice to have this as an official feature back again.

Viewing secrets does not work anymore

The new restructured version seems to be broken if its installed manually or by docker.

Due to the missing updated installation steps I tried to follow the steps in the Dockerfile, but I always end with an 404 when Itry to view the secret. Also the full secret link is shown in the server logs now...

If I use the docker containers I end up with the same results...

2018/03/02 14:59:30 Starting yopass. Listening on port 1337
127.0.0.1 - - [02/Mar/2018:14:59:36 +0100] "GET /result HTTP/1.0" 404 19
127.0.0.1 - - [02/Mar/2018:14:59:57 +0100] "GET / HTTP/1.0" 304 0
127.0.0.1 - - [02/Mar/2018:14:59:57 +0100] "GET /static/css/main.6f022e07.css HTTP/1.0" 304 0
127.0.0.1 - - [02/Mar/2018:14:59:57 +0100] "GET /static/js/main.09471f93.js HTTP/1.0" 304 0
127.0.0.1 - - [02/Mar/2018:15:00:12 +0100] "POST /secret HTTP/1.0" 200 50
127.0.0.1 - - [02/Mar/2018:15:00:30 +0100] "GET /s/a1c5ddef-59c4-4615-963b-49f758ca3fdf/C0atSB6B1IqquLuh HTTP/1.0" 404 19

Support keyboard shortcuts

When loading the yopass website the input field is immediately in focus. I'd love to send off the form after pasting/entering some plaintext by keyboard shortcut. At least under Linux based Firefox 80.0 the common ctrl+enter combination is not recognized to submit the form. Maybe it would even be possible to be able to copy the one-click link with ctrl+c or some other combination on the next page?

I don't really have any experience with Typescript/Javascript to add that quickly myself.

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.