Skip to main content

SHAKEN certificate issuance and renewal lifecycle manager (Certbot for SHAKEN Certs)

Project description

SHAKEN Cert Manager - Certbot for SHAKEN Certs

shaken-cert-manager is an operator-focused lifecycle manager for STIR/SHAKEN certificates. It issues certificates through stir-shaken-toolkit, keeps durable archive state, exposes the active certificate through stable live links, runs lifecycle hooks, reports monitoring status, and cleans up old material.

It currently supports integration with the PeeringHub STI-CA SHAKEN certificate provider -- an active PeeringHub account is required for valid issuance of certificates.

It does not replace your signing service. Your signing service still needs to read the private key, publish the active certificate chain at the URL used in PASSporT x5u, insert the Identity header into outbound calls, etc.

Install

Package install

pip install shaken-cert-manager

Development install

From the repository root:

pip install -e .[dev]

Quick Start

Create a manager config from the example:

cp shaken-cert-manager.example.yaml shaken-cert-manager.yaml
chmod 600 shaken-cert-manager.yaml

Fill in the PeeringHub, STI-PA, certificate subject, account, state, and hook settings needed for the deployment.

See the minimal config example for the smallest useful shape.

Prepare or provision the PeeringHub ACME account key before issuing:

stir-shaken-toolkit peeringhub-account-setup --account-dir /var/lib/shaken/account

Issue the first certificate:

shaken-cert-manager --config shaken-cert-manager.yaml issue-initial

Check status:

shaken-cert-manager --config shaken-cert-manager.yaml status
shaken-cert-manager --config shaken-cert-manager.yaml status --nagios

Run renewal from your scheduler:

shaken-cert-manager --config shaken-cert-manager.yaml renew

Run cleanup periodically:

shaken-cert-manager --config shaken-cert-manager.yaml cleanup

Short-Lived Certificates

See Custom Certificate Length for an example and related issuance settings.

Commands

  • issue-initial: issue a certificate only when no active usable certificate exists.
  • renew: issue a replacement only when renewal policy requires it.
  • force-renew: issue a replacement immediately; use --skip-confirm for non-interactive runs.
  • status: print active certificate health as text, JSON, or Nagios plugin output.
  • cleanup: remove expired inactive archives, stale live links, and old failed transaction archives.

Use --debug before the subcommand for detailed logs with configured secrets redacted:

shaken-cert-manager --config shaken-cert-manager.yaml --debug status

State Model

The manager owns a state directory, usually /var/lib/shaken:

  • account/account.key: durable PeeringHub ACME account private key.
  • account/account.json: recoverable PeeringHub ACME account state cache.
  • archive/<generation_id>/: durable certificate generation artifacts.
  • live/<generation_id>/: symlink tree exposing an unexpired generation.
  • live/current: symlink to the active live generation.
  • active.json: active generation manifest.
  • last-attempt.json: result of the last manager command that records state.
  • failed/<generation_id>/: retained failed transaction diagnostics.

Publish live/current/certificate-chain.pem from your HTTPS certificate URL and configure your signing service to use account/account.key as the private key. Do not publish account.key.

More Documentation

  • Configuration: config keys, environment overrides, defaults, and example setup guidance.
  • Operations: issuance, renewal, activation, cleanup, and state inspection workflows.
  • Automation: cron and systemd timer examples for unattended renewal.
  • Monitoring: text, JSON, and Nagios status output.
  • Lifecycle Hooks: pre-activation and deploy hook behavior.
  • Subject Templates: advanced subject common name customization.
  • Shell Completion: generated completion through argcomplete.

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

shaken_cert_manager-1.0.3.tar.gz (36.3 kB view details)

Uploaded Source

Built Distribution

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

shaken_cert_manager-1.0.3-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file shaken_cert_manager-1.0.3.tar.gz.

File metadata

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

File hashes

Hashes for shaken_cert_manager-1.0.3.tar.gz
Algorithm Hash digest
SHA256 2ac8e7bbd67b90d670f5c49d0ec167481058a05ca812d28a9599351b8d512f99
MD5 2dbd3a05176bdfd49c8b0c59c9bbb53b
BLAKE2b-256 85a3a153fe4acf9315b202661c761bf4e3239c622b3e27b6add9cf5747f6442e

See more details on using hashes here.

Provenance

The following attestation bundles were made for shaken_cert_manager-1.0.3.tar.gz:

Publisher: pypi.yml on peeringhub-io/shaken-cert-manager

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

File details

Details for the file shaken_cert_manager-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for shaken_cert_manager-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 521a3b173b885148287a6759e5eed9f03eebe6e87b1dd61f88eebe41b99729a1
MD5 d93717b668ee94e3d6882373ed706262
BLAKE2b-256 e1c82447f3a834f585ab180ade0a2ab2448c77f458b391da4ddf4fb41a13e213

See more details on using hashes here.

Provenance

The following attestation bundles were made for shaken_cert_manager-1.0.3-py3-none-any.whl:

Publisher: pypi.yml on peeringhub-io/shaken-cert-manager

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