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 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.2.tar.gz (25.1 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.2-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shaken_cert_manager-1.0.2.tar.gz
  • Upload date:
  • Size: 25.1 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.2.tar.gz
Algorithm Hash digest
SHA256 914848478e54a625f45f73be06840b58dd77cfb28257006e4ad50a6a3ac69993
MD5 5a181a5e2f3a1291a40796fc4e81cfc2
BLAKE2b-256 420df91287c2ff39bc6d6bd03acf5a03c32a54242d32273eb0f535fb3ac2ec77

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for shaken_cert_manager-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82e8732855f12cafccb981c9eddef64136ae0d749334944ec25a2d10becdc6ad
MD5 8eddece65e77202807461d4ee80760cc
BLAKE2b-256 2c2fc6598d2be15a4b4fcccb796da9d03bc9dd71103ba904c19dfac2e2bb1fb7

See more details on using hashes here.

Provenance

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