2024-12-25 11:40:57 +00:00
|
|
|
# Pssecret
|
2022-06-09 22:08:36 +00:00
|
|
|
|
2022-06-12 12:45:42 +00:00
|
|
|
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
|
|
|
|
|
2024-12-25 11:40:57 +00:00
|
|
|
Pssecret is self-hosted service to share secrets (like passwords) with somebody
|
2022-06-09 22:08:36 +00:00
|
|
|
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
|
2022-06-12 10:50:48 +00:00
|
|
|
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.
|
2022-06-12 12:44:27 +00:00
|
|
|
|
2022-06-12 21:56:09 +00:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
2022-12-17 08:37:41 +00:00
|
|
|
- Python 3.11+
|
2022-06-12 21:56:09 +00:00
|
|
|
- Redis
|
|
|
|
- Python development libraries (optional, only needed for `hiredis` module installation)
|
|
|
|
|
|
|
|
### How to install
|
|
|
|
|
|
|
|
#### TL/DR
|
|
|
|
|
2022-12-17 08:54:22 +00:00
|
|
|
```bash
|
2024-12-25 11:40:57 +00:00
|
|
|
$ git clone git@git.ivnglkv.me:root/pssecret.git
|
2024-12-25 12:44:29 +00:00
|
|
|
$ python3 -m venv .venv
|
|
|
|
$ . ./.venv/bin/activate
|
2022-12-17 08:53:50 +00:00
|
|
|
$ pip install .
|
2022-06-12 21:56:09 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2024-12-25 11:40:57 +00:00
|
|
|
Steps to install Pssecret:
|
2022-06-12 21:56:09 +00:00
|
|
|
|
|
|
|
1. Clone repository
|
|
|
|
2. (optional) Create virtual environment
|
|
|
|
3. Install package
|
|
|
|
|
2024-12-25 11:40:57 +00:00
|
|
|
### Running Pssecret server
|
2022-06-12 22:03:13 +00:00
|
|
|
|
2024-12-25 11:40:57 +00:00
|
|
|
After installation is done, you can start pssecret with `pssecret` command.
|
2022-06-12 22:03:13 +00:00
|
|
|
The web server will be started with `uvicorn` ASGI web server.
|
|
|
|
|
2022-12-17 08:54:22 +00:00
|
|
|
```bash
|
2024-12-25 11:40:57 +00:00
|
|
|
$ pssecret
|
2022-06-12 22:03:13 +00:00
|
|
|
```
|
2022-06-12 21:56:09 +00:00
|
|
|
|
2022-12-17 08:53:50 +00:00
|
|
|
### Configuration
|
|
|
|
|
2024-12-25 11:40:57 +00:00
|
|
|
Configuration is done through config file. By default, path is `/etc/pssecret/pssecret.toml`.
|
|
|
|
You can override this by setting environment variable `PSSECRET_CONF_FILE` value to actual file
|
2022-12-17 08:53:50 +00:00
|
|
|
location, i.e.:
|
|
|
|
|
|
|
|
```bash
|
2024-12-25 11:40:57 +00:00
|
|
|
$ PSSECRET_CONF_FILE=/home/user/.conf/pssecret.toml pssecret
|
2022-12-17 08:53:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
You can find all available configuration options in the example file, located
|
2024-12-25 11:40:57 +00:00
|
|
|
at [conf/pssecret.toml.example](conf/pssecret.toml.example) under Git root.
|
2022-12-17 08:53:50 +00:00
|
|
|
|
2022-06-12 12:44:27 +00:00
|
|
|
## Contributing
|
|
|
|
|
|
|
|
Codestyle is enforced with Black, and additional checks are done with the help of pre-commit-hooks,
|
|
|
|
Flake8 and isort. Prior to making any commits, install `pre-commit` tool and install hooks:
|
|
|
|
|
2022-12-17 08:54:22 +00:00
|
|
|
```bash
|
2022-06-12 12:44:27 +00:00
|
|
|
# Alternatively, you could use 'pip install ".[development]"'
|
2024-12-25 11:40:57 +00:00
|
|
|
$ pip install pre-commit
|
2022-06-12 12:44:27 +00:00
|
|
|
$ pre-commit install
|
|
|
|
```
|
|
|
|
|
|
|
|
This way you will always be sure that new code follows project guidelines.
|
|
|
|
|
|
|
|
This project is using trunk-based branching strategy with the `main` as trunk branch.
|