Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vicktornl/wagtail-secret-sharing


https://github.com/vicktornl/wagtail-secret-sharing

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Wagtail Secret Sharing

[![Version](https://img.shields.io/pypi/v/wagtail-secret-sharing.svg?style=flat)](https://pypi.python.org/pypi/wagtail-secret-sharing/)
![CI](https://github.com/vicktornl/wagtail-secret-sharing/actions/workflows/ci.yml/badge.svg)

A secure sharing app for Wagtail using [django-secret-sharing](https://github.com/vicktornl/django-secret-sharing).

## Features

* Keep sensitive information out of your chat logs and email via a secure sharing protocol
* REST API
* One time secrets
* Expiry dates
* Create random passwords
* Secure S3 presigned file transfers

## Requirements

- Python 3
- Django >= 2.2.8
- Wagtail >= 2

## Installation

Install the package

```
pip install wagtail-secret-sharing
```

Add `wagtail.contrib.routable_page`, `django_secret_sharing` and `wagtail_secret_sharing` to your INSTALLED_APPS

```
INSTALLED_APPS = [
...
"wagtail.contrib.routable_page",
"django_secret_sharing,
"wagtail_secret_sharing",
]
```

Extend the `AbstractSecretsPage`

```python
from wagtail_secret_sharing.models import AbstractSecretsPage

class SecretsPage(AbstractSecretsPage):
...
```

Add the urls (`api_urls` not needed when you don't use file transfers or any other API features)

```
urlpatterns = [
...
path("api/secrets/", include("django_secret_sharing.api_urls"),),
]
```

Run migrate

```
python manage.py migrate
```

## Templates

Override the default templates with your own

**wagtail_secret_sharing/create.html**

```
{% load wagtailroutablepage_tags %}

{% if secret_url %}

{{ secret_url }}


Create
{% else %}

{% csrf_token %}
{{ form }}

Add file


{% endif %}

{% block scripts %}
{% include "django_secret_sharing/file_transfer_simple.html" %}
{% include "django_secret_sharing/file_transfer_scripts.html" %}
{% endblock %}
```

**wagtail_secret_sharing/retrieve.html**

```
{% load wagtailroutablepage_tags %}

View
```

**wagtail_secret_sharing/view.html**

```
{% load wagtailroutablepage_tags %}

{{ value }}
Create
```

## File transfers

For more information how to use file transfers we suggest you to read the (https://github.com/vicktornl/django-secret-sharing#file-transfers)[documentation] of `django-secret-sharing`.