Skip to main content

No project description provided

Project description

This django app allows to automatically add RFC 3161 time-stamps to uploaded files. This way you can prove that the files have existed at a specific point in time and have not been modified since. It is based on rfc3161ng.

Installation

Adapt the settings:

INSTALLED_APPS = [
    
    'storage_timestamps',
    
]

STORAGES = {
    'default': {
        'BACKEND': 'storage_timestamps.storage.TimestampedFileSystemStorage',
    },
    
}

TIMESTAMP_AUTHORITY = 'https://freetsa.org/tsr'  # or any other TSA

Verify timestamps

$ django-admin ts_dump myfile.pdf
TimeStampToken was written to "myfile.pdf.ts".

inspect:
  openssl ts -reply -in "myfile.pdf.ts" -token_in -text
verify:
  openssl ts -verify -in "myfile.pdf.ts" -token_in -data "media/myfile.pdf" -CAfile "/etc/ssl/certs/ca-certificates.crt"

Cleanup unused timestamps

Sometimes, the original file is no longer available, so the timestamp is no longer useful. Timestamps are not deleted automatically in order to prevent unintended data loss. However, you can delete such timestamps manually using django-admin ts_cleanup.

Alternatives

Instead of storing the timestamp separately, you could also embed it in the PDF (see ISO 32000-2:2017 section 12.8). Such a timestamp would be easy to validate with compatible PDF readers. However, it would be much more complicated to create and also be restricted to PDF documents.

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-storage-timestamps-0.1.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

django_storage_timestamps-0.1.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

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