No description
Find a file
dependabot[bot] 62a629021a
Bump fakeredis from 2.20.0 to 2.21.1
Bumps [fakeredis](https://github.com/cunla/fakeredis-py) from 2.20.0 to 2.21.1.
- [Release notes](https://github.com/cunla/fakeredis-py/releases)
- [Commits](https://github.com/cunla/fakeredis-py/compare/v2.20.0...v2.21.1)

---
updated-dependencies:
- dependency-name: fakeredis
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-16 02:08:30 +00:00
.github Bump github/codeql-action from 2 to 3 (#309) 2023-12-22 13:54:08 -08:00
snappass Add health check endpoint (#329) 2024-02-02 16:14:51 -08:00
.dockerignore Install deps from requirements.txt (#303) 2023-12-01 09:35:00 -08:00
.gitignore Deprecate support for py26 and py34 2018-05-06 12:45:38 -07:00
ADOPTERS.md Update ADOPTERS.md (#116) 2019-12-24 07:28:42 -08:00
AUTHORS.rst Bots that prefetch should not destroy the secret (#100) 2019-03-05 07:47:07 -08:00
CHANGELOG.rst Prepare the 1.6.0 release (#157) 2022-05-17 10:46:35 -07:00
CODE_OF_CONDUCT.md Prepare the 1.4.1 release 2018-10-31 15:50:49 -07:00
CONTRIBUTING.rst Migrate CI to GitHub Actions (#150) 2022-05-17 10:32:12 -07:00
dev-requirements.txt Bump fakeredis from 2.20.0 to 2.21.1 2024-02-16 02:08:30 +00:00
docker-compose.yml Use SIGINT to grecefully shutdown flask 2017-05-24 14:02:23 -04:00
Dockerfile Install deps from requirements.txt (#303) 2023-12-01 09:35:00 -08:00
LICENSE Prepare the 1.6.0 release (#157) 2022-05-17 10:46:35 -07:00
Makefile Adds option for two-week timeout. (#120) 2020-05-08 11:43:54 -07:00
MANIFEST.in Prepare snappass for distribution. 2013-10-05 23:10:50 -07:00
README.rst Prepare 1.6.1 release (#304) 2023-12-01 17:04:38 -08:00
requirements.txt Bump flask from 2.3.2 to 3.0.0 (#294) 2023-12-22 14:08:29 -08:00
setup.cfg Bump version: 1.6.1 → 1.6.2 (#311) 2024-01-02 17:17:27 -08:00
setup.py Bump version: 1.6.1 → 1.6.2 (#311) 2024-01-02 17:17:27 -08:00
tests.py Add health check endpoint (#329) 2024-02-02 16:14:51 -08:00
tox.ini Remove py3.7 (#234) 2023-06-09 12:54:41 -07:00

========
SnapPass
========

|pypi|

.. |pypi| image:: https://img.shields.io/pypi/v/snappass.svg
    :target: https://pypi.python.org/pypi/snappass
    :alt: Latest version released on PyPI

It's like SnapChat... for passwords.

This is a web app that lets you share passwords securely.

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
because she uses Google Hangouts Chat, and Google Hangouts Chat might log everything.

You could write it down, but you can't find a pen, and there's way too many
characters because your security person, Paul, is paranoid.

So we built SnapPass.  It's not that complicated, it does one thing.  If
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
--------

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/

Requirements
------------

* `Redis`_
* Python 3.8+

.. _Redis: https://redis.io/

Installation
------------

::

    $ pip install snappass
    $ snappass
    * Running on http://0.0.0.0:5000/
    * Restarting with reloader

Configuration
-------------

Start by ensuring that Redis is up and running.

Then, you can configure the following via environment variables.

``SECRET_KEY``: unique key that's used to sign key. This should
be kept secret.  See the `Flask Documentation`__ for more information.

.. __: http://flask.pocoo.org/docs/quickstart/#sessions

``DEBUG``: to run Flask web server in debug mode.  See the `Flask Documentation`__ for more information.

.. __: http://flask.pocoo.org/docs/quickstart/#debug-mode

``STATIC_URL``: this should be the location of your static assets.  You might not
need to change this.

``NO_SSL``: if you are not using SSL.

``URL_PREFIX``: useful when running snappass behind a reverse proxy like `nginx`. Example: ``"/some/path/"``, Defaults to ``None``

``REDIS_HOST``: this should be set by Redis, but you can override it if you want. Defaults to ``"localhost"``

``REDIS_PORT``: is the port redis is serving on, defaults to 6379

``SNAPPASS_REDIS_DB``: is the database that you want to use on this redis server. Defaults to db 0

``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

``REDIS_PREFIX``: (optional, defaults to ``"snappass"``) prefix used on redis keys to prevent collisions with other potential clients

``HOST_OVERRIDE``: (optional) Used to override the base URL if the app is unaware. Useful when running behind reverse proxies like an identity-aware SSO. Example: ``sub.domain.com``

Docker
------

Alternatively, you can use `Docker`_ and `Docker Compose`_ to install and run SnapPass:

.. _Docker: https://www.docker.com/
.. _Docker Compose: https://docs.docker.com/compose/

::

    $ 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

Similar Tools
-------------

- `Snappass.NET <https://github.com/generateui/Snappass.NET>`_ is a .NET
  (ASP.NET Core) port of SnapPass.


We're Hiring!
-------------

Are you really excited about open-source and great software engineering?
`Pinterest is hiring <https://careers.pinterest.com>`_!