snappass/README.rst

116 lines
3.9 KiB
ReStructuredText
Raw Permalink Normal View History

2013-10-05 23:12:31 +02:00
========
SnapPass
========
|pypi| |build|
.. |pypi| image:: https://img.shields.io/pypi/v/snappass.svg
:target: https://pypi.python.org/pypi/snappass
:alt: Latest version released on PyPI
2013-10-05 23:12:31 +02:00
.. |build| image:: https://travis-ci.org/pinterest/snappass.svg
:target: http://travis-ci.org/pinterest/snappass
:alt: Build status
2013-10-05 23:12:31 +02:00
2019-01-16 15:11:56 +01:00
It's like SnapChat... for passwords.
2013-10-05 23:12:31 +02:00
2019-01-16 15:11:56 +01:00
This is a web app that lets you share passwords securely.
2013-10-05 23:12:31 +02:00
Let's say you have a password. You want to give it to your coworker, Jane.
You could email it to her, but then it's in her email, which might be backed up,
and probably is in some storage device controlled by the NSA.
You could send it to her over chat, but chances are Jane logs all her messages
2019-01-16 15:11:56 +01:00
because she uses Google Hangouts Chat, and Google Hangouts Chat might log everything.
2013-10-05 23:12:31 +02:00
You could write it down, but you can't find a pen, and there's way too many
2019-01-16 15:11:56 +01:00
characters because your security person, Paul, is paranoid.
2013-10-05 23:12:31 +02:00
2016-07-19 02:14:38 +02:00
So we built SnapPass. It's not that complicated, it does one thing. If
2013-10-05 23:12:31 +02:00
Jane gets a link to the password and never looks at it, the password goes away.
If the NSA gets a hold of the link, and they look at the password... well they
have the password. Also, Jane can't get the password, but now Jane knows that
not only is someone looking in her email, they are clicking on links.
Anyway, this took us very little time to write, but we figure we'd save you the
trouble of writing it yourself, because maybe you are busy and have other things
to do. Enjoy.
Security
2017-05-16 15:25:03 +02:00
--------
Passwords are encrypted using `Fernet`_ symmetric encryption, from the `cryptography`_ library.
A random unique key is generated for each password, and is never stored;
it is rather sent as part of the password link.
This means that even if someone has access to the Redis store, the passwords are still safe.
.. _Fernet: https://cryptography.io/en/latest/fernet/
.. _cryptography: https://cryptography.io/en/latest/
2013-10-05 23:12:31 +02:00
Requirements
------------
* Redis
* Python 2.7+ or 3.4+ (both included)
2013-10-05 23:12:31 +02:00
Installation
------------
::
$ pip install snappass
$ snappass
* Running on http://0.0.0.0:5000/
* Restarting with reloader
Configuration
-------------
You can configure the following via environment variables.
2018-08-12 23:41:14 +02:00
``SECRET_KEY``: unique key that's used to sign key. This should
be kept secret. See the `Flask Documentation`__ for more information.
2013-10-05 23:12:31 +02:00
.. __: http://flask.pocoo.org/docs/quickstart/#sessions
2018-08-12 23:41:14 +02:00
``DEBUG``: to run Flask web server in debug mode. See the `Flask Documentation`__ for more information.
.. __: http://flask.pocoo.org/docs/quickstart/#debug-mode
2013-10-05 23:12:31 +02:00
2018-08-12 23:41:14 +02:00
``STATIC_URL``: this should be the location of your static assets. You might not
2013-10-05 23:12:31 +02:00
need to change this.
2018-08-12 23:41:14 +02:00
``NO_SSL``: if you are not using SSL.
2016-07-16 16:11:36 +02:00
2018-08-12 23:41:14 +02:00
``REDIS_HOST``: this should be set by Redis, but you can override it if you want. Defaults to ``"localhost"``
2016-07-19 02:14:38 +02:00
2018-08-12 23:41:14 +02:00
``REDIS_PORT``: is the port redis is serving on, defaults to 6379
2016-08-21 09:05:01 +02:00
2018-08-12 23:41:14 +02:00
``SNAPPASS_REDIS_DB``: is the database that you want to use on this redis server. Defaults to db 0
2016-08-21 09:05:01 +02:00
2018-08-12 23:41:14 +02:00
``REDIS_URL``: (optional) will be used instead of ``REDIS_HOST``, ``REDIS_PORT``, and ``SNAPPASS_REDIS_DB`` to configure the Redis client object. For example: redis://username:password@localhost:6379/0
2018-07-01 19:25:55 +02:00
2018-08-12 23:41:14 +02:00
``REDIS_PREFIX``: (optional, defaults to ``"snappass"``) prefix used on redis keys to prevent collisions with other potential clients
2016-07-16 16:11:36 +02:00
Docker
------
Alternatively, you can use `Docker`_ and `Docker Compose`_ to install and run SnapPass:
2016-07-16 16:11:36 +02:00
.. _Docker: https://www.docker.com/
.. _Docker Compose: https://docs.docker.com/compose/
2017-04-15 18:55:12 +02:00
2016-07-16 16:11:36 +02:00
::
$ docker-compose up -d
This will pull all dependencies, i.e. Redis and appropriate Python version (3.7), then start up SnapPass and Redis server. SnapPass server is accessible at: http://localhost:5000
2018-05-12 18:02:24 +02:00
We're Hiring!
-------------
Are you really excited about open-source and great software engineering?
2019-01-16 15:11:56 +01:00
Pinterest is `hiring`__!
.. __: https://careers.pinterest.com