Skip to main content

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.

Release files for django-storage-timestamps 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-storage-timestamps 0.1.1
File Size Uploaded
django-storage-timestamps-0.1.1.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-storage-timestamps 0.1.1
File Interpreter ABI Platform
django_storage_timestamps-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.0 kB

Release files / django-storage-timestamps-0.1.1.tar.gz

Download URL django-storage-timestamps-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f65048e229fd63d36b53065e71bd9a8c5a247de4e2f01a031685cee7d0db1b2f
BLAKE2b-256 checksum
How to use checksums
3c0c93cdbe6758ad5d15d7fc2dd7e649daca02378e31d92d7fcfbe695f3803e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

Release files / django_storage_timestamps-0.1.1-py3-none-any.whl

Download URL django_storage_timestamps-0.1.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ececaa056847cd4a7d78a8245a7aefd4e1661191064e4fbc1a442d310c0d6b7
BLAKE2b-256 checksum
How to use checksums
b2ce2f5e9be44c3aed617edbd7da8afaf3d2a378b562512422790792c4f18690
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page