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.io 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

From the repository root:

python -m pip install -e .

shaken-cert-manager depends on Peeringhub issuance support from stir-shaken-toolkit. Install that package in the same environment.

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 status and renewal policy require 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.0.tar.gz (25.2 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.0-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shaken_cert_manager-1.0.0.tar.gz
  • Upload date:
  • Size: 25.2 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.0.tar.gz
Algorithm Hash digest
SHA256 da0478631e6d2f18a553053f14ccc8525864cb463d0d0e772492a1e43e4053cd
MD5 7b1c745f59d59ccf7a9a758d4f3ed485
BLAKE2b-256 61fcf12fa5d2de9d789047371b20b9d22a9b74a14bfc941bdeafbc6e41bcd0ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for shaken_cert_manager-1.0.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for shaken_cert_manager-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b38d186bb0d72cf07e98a802000fa4af758992b8e109dd38b3a41e7ac2855c3c
MD5 2744e66e1aa73c43e552cfbb20538aa4
BLAKE2b-256 0c646d969e18366efcc9269fbb71b1e57a8f4f0295512e516d49f4b2ff86187b

See more details on using hashes here.

Provenance

The following attestation bundles were made for shaken_cert_manager-1.0.0-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