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.
Metadata
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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-storage-timestamps-0.1.1.tar.gz | 5.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|
Security for django-storage-timestamps 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.