Skip to main content

API service for secrets sharing over network

Project description

Pssecret server

Code style: black PyPI - Downloads

Pssecret is self-hosted service to share secrets (like passwords) with somebody over the network, but don't want them to appear in chats, unencrypted e-mails, etc.

This service tries to be as anonymous as possible. The only personal information that will be stored on a server will be IP address of the client that made request to the server.

Service is built with Python, FastAPI and is using Redis for data storage.

Installation

Requirements

  • Python 3.11+
  • Redis
  • Python development libraries (optional, only needed for hiredis module installation)

How to install

Quick way

If you don't need to configure a lot of things, you can install from pipx

$ pipx install pssecret-server

For better performance, install application with hiredis support.

$ pipx install pssecret-server[hiredis]

After that just run the app with

$ pssecret-server

This will start the uvicorn server on 127.0.0.1:8000. Available configuration options:

--host TEXT        Bind socket to this host.  [default: 127.0.0.1]
--port INTEGER     Bind socket to this port. If 0, an available port will be
                   picked.  [default: 8000]
--uds TEXT         Bind to a UNIX domain socket.
--workers INTEGER  Number of worker processes.  Defaults to the
                   $WEB_CONCURRENCY environment variable if available, or 1.
--help             Show this message and exit.

If you'd like more control

Create virtual environment, install application, run using uvicorn directly.

$ python -m venv .venv
$ source .venv/bin/activate
$ pip install pssecret-server
$ uvicorn pssecret_server.main:app --workers 4 --uds /path/to/socket.sock

You can also run uvicorn without activating virtualenv, e.g. from SystemD service

$ /path/to/your/.venv/bin/python -m uvicorn pssecret_server.main:app --workers 4 --uds /path/to/socket.sock

Running Pssecret server

Make sure you have the Redis service running.

After installation is done, you can start pssecret server with pssecret-server command. The web server will be started with uvicorn ASGI web server.

$ pssecret-server

Configuration

Configuration is done via environment variables.

Environment variables:

  • REDIS_URL: URL for Redis access. Check what values are supported here.
  • SECRETS_ENCRYPTION_KEY: Key used for encrypting stored data.

You can also declare these variables in a .env file in the working directory. Protect this file (or other source from where SECRETS_ENCRYPTION_KEY is read by application) from being read by unauthorized parties.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pssecret_server-1.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pssecret_server-1.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file pssecret_server-1.1.0.tar.gz.

File metadata

  • Download URL: pssecret_server-1.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.7 Linux/6.6.65-1-MANJARO

File hashes

Hashes for pssecret_server-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b9127a9da8a4fd70ce60ab83592bcf231efc0e6bd1266c8949a66a0148115ec2
MD5 74bcadf763e80511e1880dc818387700
BLAKE2b-256 b8ed88f08ffdc4978970a7e85b116da14759a296ada4d5e1bc5bf6eca1823264

See more details on using hashes here.

File details

Details for the file pssecret_server-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pssecret_server-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.12.7 Linux/6.6.65-1-MANJARO

File hashes

Hashes for pssecret_server-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e51ed13f25f73b55ab214a97cbcb96bd2bd55c03a12f1788872ac133af36992e
MD5 54d8e08047cf3e6de91b4e39246008aa
BLAKE2b-256 25105f1344ada6c2c954aa4a5c2ddfe4f887bb281590cd5d0619d84144c9277a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page