From 2d879350420b106db68087ac2f21ed50d8ee8dbf Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Tue, 11 Feb 2025 14:54:46 +0000 Subject: [PATCH] Start on opentimestamps enricher --- .../opentimestamps_enricher/__manifest__.py | 50 +++++++++++++++++++ .../opentimestamps_enricher.py | 0 2 files changed, 50 insertions(+) create mode 100644 src/auto_archiver/modules/opentimestamps_enricher/__manifest__.py create mode 100644 src/auto_archiver/modules/opentimestamps_enricher/opentimestamps_enricher.py diff --git a/src/auto_archiver/modules/opentimestamps_enricher/__manifest__.py b/src/auto_archiver/modules/opentimestamps_enricher/__manifest__.py new file mode 100644 index 0000000..cfed1fb --- /dev/null +++ b/src/auto_archiver/modules/opentimestamps_enricher/__manifest__.py @@ -0,0 +1,50 @@ +{ + "name": "Opentimestamps Enricher", + "type": ["enricher"], + "requires_setup": False, + "dependencies": { + "python": [ + "loguru", + "opentimestamps", + ], + }, + "configs": { + "tsa_urls": { + "default": [ + # [Adobe Approved Trust List] and [Windows Cert Store] + "http://timestamp.digicert.com", + "http://timestamp.identrust.com", + # "https://timestamp.entrust.net/TSS/RFC3161sha2TS", # not valid for timestamping + # "https://timestamp.sectigo.com", # wait 15 seconds between each request. + + # [Adobe: European Union Trusted Lists]. + # "https://timestamp.sectigo.com/qualified", # wait 15 seconds between each request. + + # [Windows Cert Store] + "http://timestamp.globalsign.com/tsa/r6advanced1", + # [Adobe: European Union Trusted Lists] and [Windows Cert Store] + # "http://ts.quovadisglobal.com/eu", # not valid for timestamping + # "http://tsa.belgium.be/connect", # self-signed certificate in certificate chain + # "https://timestamp.aped.gov.gr/qtss", # self-signed certificate in certificate chain + # "http://tsa.sep.bg", # self-signed certificate in certificate chain + # "http://tsa.izenpe.com", #unable to get local issuer certificate + # "http://kstamp.keynectis.com/KSign", # unable to get local issuer certificate + "http://tss.accv.es:8318/tsa", + ], + "help": "List of RFC3161 Time Stamp Authorities to use, separate with commas if passed via the command line.", + } + }, + "description": """ + Generates RFC3161-compliant timestamp tokens using Time Stamp Authorities (TSA) for archived files. + + ### Features + - Creates timestamp tokens to prove the existence of files at a specific time, useful for legal and authenticity purposes. + - Aggregates file hashes into a text file and timestamps the concatenated data. + - Uses multiple Time Stamp Authorities (TSAs) to ensure reliability and redundancy. + - Validates timestamping certificates against trusted Certificate Authorities (CAs) using the `certifi` trust store. + + ### Notes + - Should be run after the `hash_enricher` to ensure file hashes are available. + - Requires internet access to interact with the configured TSAs. + """ +} diff --git a/src/auto_archiver/modules/opentimestamps_enricher/opentimestamps_enricher.py b/src/auto_archiver/modules/opentimestamps_enricher/opentimestamps_enricher.py new file mode 100644 index 0000000..e69de29