Skip to main content

Allow django users to securely communicating sensitive files over the internet.

Project description

# django-secup

Allow django users to securely communicating sensitive files over the internet.

Only django users which is staff can invite an external user to upload a sensitive file.

Ordinary django users can send file with description to the django staff users if have valid emails. If invalid email address is used, secup managers defined in the settings will be notified.

Signed urls created to navigates users to secup.

## Warning

If we want to securly serve files from Cloud, it is easy. But if we don't use a cloud provider, the best solution requires cooperation of django and web server like X-Sendfile. Other methods not included web servers is not completely secure or should not prefered if the file sizes are large.

This application package uses a secure method not included web servers, but it's not ideal way to serve large files expecting high traffic.

## Todos

- Create a new flow for staff to sends files to external users.
- Create a structure to sign files which uploaded by staff with GnuPG.
- Write tests with high coverage.

## Quick start

1. Install the secup module::
pip install django-secup

2. Add "secup" to your INSTALLED_APPS setting like this::

3. Include the secup URLconf in your project like this::
path('secup/', include('secup.urls')),

4. Run migrations to create the secup models::
python migrate

5. You have to define secup managers in the, superusers or a tuple of users::
# or
('Yusuf Ozer', ''),

6. You can set secure media folder in the, default is 'secure-media' folder::
SECURE_MEDIA_URL_PREFIX = '/secure-media/'
SECURE_MEDIA_ROOT = os.path.join(BASE_DIR, 'secure-media/')

7. To send notification mails with signed urls to related users set::

8. Edit notification email templates if you set true previous setting. All templates included related 'SecureUpload' object as context::

- templates/secup/email_invited.html
- templates/secup/email_invited.txt
- templates/secup/email_managers.html
- templates/secup/email_managers.txt
- templates/secup/email_uploaded.html
- templates/secup/email_uploaded.txt

9. Set default timeout for signed urls::
SECUP_LINKS_VALID_SECONDS = 7200 # default is 2 hours

## To Check Locally

python runserver
To invite external user to upload file (django staff required):

To see files uploaded to you (django user required):

To upload files to staff members (django user required):

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

django-secup-1.0.0.tar.gz (9.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page