Skip to main content

Implementation of archival authentication

Project description

TAF

TAF (The Archive Framework) is an implementation of archival authentication. In other words, TAF ensures that a git repository can be securely cloned/updated and authenticated. In our case, a git repository is a collection of thousands of XML documents and represents a Library of official legal material, but TAF can be used to secure any git repository, regardless of its content.

A git repository can be compromised in a number of ways:

  • an attacker could hack a user's account on a code hosting platform, like GitHub or GitLab,
  • an attacker could hack the hosting platform,
  • an attacker could gain access to a developer's personal computer.

This attacker could then:

  • upload a new GPG key to GitHub,
  • push new commits to any repository,
  • add another authorized user with write access,
  • unprotected the master branch of any of the repositories and force push to it.

TAF's goal is not to prevent any of the attacks listed above from happening, but to detect that an attack took place and cancel an update if that is the case. So, TAF should be used instead of directly calling git pull and git clone.

TAF's implementation strongly relies on The Update Framework (TUF), which helps developers maintain the security of a software update system and provides a flexible framework and specification that developers can adopt into any software update system.

Further reading:

  1. UELMA whitepaper
  2. TAF implementation and integration with TUF

Installation Steps

From PyPI

pip install taf

From source:

pip install -e .

Install extra dependencies when using Yubikey:

pip install taf[yubikey]

Development Setup

We are using pre-commit to run black code formatter, flake8 and bandit code quality checks.

pip install -e .[dev]
pip install -e .[test]

pre-commit install # registers git pre-commit hook

pre-commit run --all-files # runs code formatting and quality checks for all files

NOTE: For Windows users: Open settings.json and replace paths.

Running Tests

To run tests with mocked Yubikey:

pytest

To run tests with real Yubikey:

  1. Insert test Yubikey
  2. Run taf setup_test_yubikey WARNING: This command will import targets private key to signature slot of your Yubikey, as well as new self-signed x509 certificate!
  3. Run REAL_YK=True pytest or set REAL_YK=True pytest depending on platform.

Platform-specific Wheels

  1. Open https://dev.azure.com/openlawlibrary/TAF/_build
  2. Click on latest build
  3. Open Summary tab
  4. Under Build artifacts published, click on *wheels to download zip

Building Wheels on Ubuntu 16.04 and 18.04

Binary wheels exists only for macOS, windows-32bit and windows-64bit platforms for python 3.6!

  • Install dependencies
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
sudo apt-get install python3.6-venv
sudo apt-get install python3.6-dev
sudo apt-get install swig
sudo apt-get install libpcsclite-dev
sudo apt-get install libssl-dev
sudo apt-get install libykpers-1-dev
  • Create virtual environment
python3.6 -m venv env
pip install --upgrade pip
pip install wheel
pip install taf
  • Test CLI
taf

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taf-0.2.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

taf-0.2.1-cp36-cp36m-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.6mWindows x86-64

taf-0.2.1-cp36-cp36m-win32.whl (2.4 MB view details)

Uploaded CPython 3.6mWindows x86

taf-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.6mmacOS 10.13+ x86-64

File details

Details for the file taf-0.2.1.tar.gz.

File metadata

  • Download URL: taf-0.2.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for taf-0.2.1.tar.gz
Algorithm Hash digest
SHA256 908b7aa94b294f11d66ecd63ce778f27107696446924b052173e111a53d3ac39
MD5 cd91e53bd47d4263f79aa0aa31758bc0
BLAKE2b-256 bbee5bcfa6c6a93712d18e468397573764677a4b1d114beb6fbf25bfc4434854

See more details on using hashes here.

File details

Details for the file taf-0.2.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: taf-0.2.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for taf-0.2.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 fc54e089456422e61491b4e1e51895686abe3714ac9062b43b59870980422744
MD5 b0df36cbd8ee029afee29d98675f984d
BLAKE2b-256 2c027bcd95f881a41f264af4b77ff353f786ca17aec50ec80d159091a850fce7

See more details on using hashes here.

File details

Details for the file taf-0.2.1-cp36-cp36m-win32.whl.

File metadata

  • Download URL: taf-0.2.1-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.8

File hashes

Hashes for taf-0.2.1-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 778ae5e7b807d07ed364007f43ad4dfc130e6ce1efff5c18f9279eb64419fa39
MD5 561fe8ac0cd9af8bba4d1b5798e155db
BLAKE2b-256 68e80bd59531c0d843922ab573f645a6bf8777825beba1e47bba93c927b33707

See more details on using hashes here.

File details

Details for the file taf-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl.

File metadata

  • Download URL: taf-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: CPython 3.6m, macOS 10.13+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.9

File hashes

Hashes for taf-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 aa8f272f51d0323fd4d6571d57bb05a0481b92af4980488c410a0e1192a95715
MD5 eb3d33d78d1913cccf818f4a26f972c2
BLAKE2b-256 3b407c9c17fd55e36a903331be29ecc117b379410e9f069bc3a8160fb365f8b7

See more details on using hashes here.

Supported by

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