Skip to main content

Reusable ACME and STIR/SHAKEN certificate issuance toolkit

Project description

STIR/SHAKEN Toolkit

Reusable Python tooling for STIR/SHAKEN certificate work:

  • Local utilities for CSRs, fingerprints, certificate inspection/validation, and STI-PA SPC tokens.
  • A PeeringHub ACME workflow for issuing STIR/SHAKEN certificates.
  • Python modules that can be reused by higher-level automation.

The package is split into three layers:

  • acme_core: provider-neutral RFC 8555 ACME primitives.
  • stir_shaken_acme: STIR/SHAKEN-specific TNAuthList, STI-PA, CSR, fingerprint, issuance, and inspection/validation helpers.
  • stir_shaken_toolkit.providers.peeringhub: PeeringHub profile defaults and issuance convenience APIs.

Install

pip install stir-shaken-toolkit

Quick Start

Most operators using PeeringHub need four groups of values:

  • STI-PA credentials: STIPA_USER_ID, STIPA_PASSWORD, and STIPA_SP_ID.
  • The service provider code: STIPA_SPC.
  • The PeeringHub ACME key identifier, when PeeringHub provides one: ACME_KID.
  • X.509 subject details such as organization, state, locality, and country.

Values can be supplied as CLI arguments, YAML config, or environment variables. For repeated use, a config file or environment variables are usually less noisy than long command lines.

export STIPA_USER_ID=sti-pa-user
export STIPA_PASSWORD=sti-pa-password
export STIPA_SP_ID=818H
export STIPA_SPC=818H
export ACME_KID=peeringhub-kid
export SHAKEN_SUBJECT_ORGANIZATION="Example Telecom"
export SHAKEN_SUBJECT_STATE=TX
export SHAKEN_SUBJECT_LOCALITY=Irving

Prepare or verify the PeeringHub ACME account:

stir-shaken-toolkit peeringhub-account-setup

Issue a certificate:

stir-shaken-toolkit peeringhub-issue

By default, issuance writes artifacts to a new timestamped directory such as ./shaken-cert-20260508T162900Z.

peeringhub-account-setup and peeringhub-issue contact PeeringHub ACME. peeringhub-issue also contacts STI-PA.

Common Commands

PeeringHub issuance:

stir-shaken-toolkit peeringhub-account-setup
stir-shaken-toolkit peeringhub-issue

Local CSR and fingerprint utilities:

stir-shaken-toolkit csr --spc 818H
stir-shaken-toolkit inspect --csr shaken.csr
stir-shaken-toolkit inspect --certificate leaf.pem --json
stir-shaken-toolkit fingerprint --csr shaken.csr
stir-shaken-toolkit validate-key-pair --key account.key --certificate leaf.pem
stir-shaken-toolkit validate-key-pair --key shaken.key --csr shaken.csr

Standalone STI-PA SPC token request:

stir-shaken-toolkit spc-token \
  --spc 818H \
  --fingerprint "SHA256 AA:BB:..."

List STI-PA STI-CA companies:

stir-shaken-toolkit ca-list
stir-shaken-toolkit ca-list --json --details

Run stir-shaken-toolkit --help or stir-shaken-toolkit <command> --help for the current command-line reference.

Configuration Basics

CLI values resolve in this order:

  1. Explicit command-line arguments.
  2. --config YAML values.
  3. Prefixed environment variables.
  4. Built-in defaults.

Environment variables use domain prefixes: STIPA_*, ACME_*, SHAKEN_*, and PEERINGHUB_*.

--config is a global option, so place it before the subcommand:

stir-shaken-toolkit --config toolkit.yaml peeringhub-issue

See Configuration for the complete config and environment variable reference.

Important Files

PeeringHub ACME commands use a local account directory. If you do not configure one, the toolkit chooses a per-user platform default.

The durable credential is account.key. Protect it like any other private key. PeeringHub issuance uses this key for ACME account authentication, the STI-PA SPC token fingerprint, the CSR public key, and the final certificate/private-key pair.

The account.json file is a recoverable cache of the PeeringHub ACME account URL. If it is removed, the toolkit can recreate it by signing with the existing account.key.

PeeringHub issuance writes certificate artifacts but does not write a private key into the issuance output directory. The issued certificate belongs with the ACME account key.

For installation and publication details, see Artifacts and Installation.

More Documentation

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

stir_shaken_toolkit-1.0.2.tar.gz (50.2 kB view details)

Uploaded Source

Built Distribution

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

stir_shaken_toolkit-1.0.2-py3-none-any.whl (51.3 kB view details)

Uploaded Python 3

File details

Details for the file stir_shaken_toolkit-1.0.2.tar.gz.

File metadata

  • Download URL: stir_shaken_toolkit-1.0.2.tar.gz
  • Upload date:
  • Size: 50.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stir_shaken_toolkit-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0e0e52698ac8b02ab71909868e5880a8d0c65fd163746e69b27d076f6f8dc565
MD5 9d7cca98cc4c5d80c9647a07eee88597
BLAKE2b-256 c8bdaa2761af7ddd885208f1413a325895f5a9ef6a4ac3ad723a8794681f0afa

See more details on using hashes here.

Provenance

The following attestation bundles were made for stir_shaken_toolkit-1.0.2.tar.gz:

Publisher: pypi.yml on peeringhub-io/stir-shaken-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stir_shaken_toolkit-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for stir_shaken_toolkit-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7f6531d7a41b3de0f7b930cf195e68f0882af2a6aba8977f52e5cd5467afe2d3
MD5 bf90b20368d09350582a45584a608ebb
BLAKE2b-256 4ece8dbf269869eb51e5fbb91a3df598049a11b19fba58f2bed6bd81a66c4d55

See more details on using hashes here.

Provenance

The following attestation bundles were made for stir_shaken_toolkit-1.0.2-py3-none-any.whl:

Publisher: pypi.yml on peeringhub-io/stir-shaken-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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