Skip to main content

CLI tool to assist with certificate management

Project description

launch-cert-tool

Overview

This CLI tool allows a consistent method of certificate validation, intended for use by Launch engineers when swapping out certificates for our various services.

Eventually we'd like to get to the point where we issue and renew certificates directly from ACM, but until that happens, we need to use fully-chained certificates in order to have our services play nicely with certain build systems (e.g. Azure DevOps). This tool can help you verify that you have everything you need before rotating certificates in ACM/CloudFront.

Installation

pip

Installing this tool to the virtual environment of your choice can be accomplished with the following:

pip install launch-cert-tool

uv

uv handles setting up a virtual environment, you can add this tool to an existing project with:

uv add launch-cert-tool

uvx / run-standalone (recommended)

uvx allows you to download the tool and execute it in an isolated throwaway environment without having to install any dependencies to your system. Run this tool using the following:

uvx --with launch-cert-tool launch-cert-tool [COMMAND] [OPTIONS]

You can utilize this technique to run a particular version of the tool if required:

uvx --with launch-cert-tool@1.0.0 launch-cert-tool [COMMAND] [OPTIONS]

Usage

Once installed to a virtual environment, launch-cert-tool should be added to your PATH. You may invoke the command without any arguments (or use the --help option) to view the usage page.

Validating local certificate files

To validate certificate files prior to import to ACM, you'll need to have the certificates saved to your local machine. Local certificate verification allows you to specify any number of local files to include into a single chain for validation. This means that you could have your leaf certificate for the service separate from the intermediate certificates that make up the chain of trust. The syntax for local validation is demonstrated below:

launch-cert-tool validate local /path/to/leaf.crt /other/path/to/intermediate.crt

Validating a chain stored in ACM

ACM allows us to pull down an imported certificate and the associated chain to perform the same validation. This ensures that what you uploaded to ACM matches what you tested locally:

launch-cert-tool validate acm arn:aws:acm:<region>:<account id>:certificate/<certificate id>

Validating certificates served by a remote host

As a followup test after switching CloudFront over to your newly-imported ACM certificates, you may also validate the chain of certificates for a certain host, as shown here:

launch-cert-tool validate remote example.com

Contributing

Prerequisites

Development Environment

To configure your local development environment, perform the following steps:

  1. Clone this repository to your local machine
  2. asdf install (or mise install) to set up tool dependencies
  3. make configure to pull in platform targets and set up hooks
  4. uv sync to synchronize Python dependencies

Run tests with make test and review the test coverage report locally using make coverage.

Running a dev version locally

Using uv run to launch your code ensures that your code runs in an isolated environment. For more inforamtion about using uv run, see the official documentation.

To set up the proper script and environment to be able to run your dev version of launch-cert-tool from the command line, you will need to perform an editable installation:

uv pip install -e .

Further reading

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

launch_cert_tool-1.0.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

launch_cert_tool-1.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file launch_cert_tool-1.0.1.tar.gz.

File metadata

  • Download URL: launch_cert_tool-1.0.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.2

File hashes

Hashes for launch_cert_tool-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c8aa0ab6621de7eced5f5a51c27e19b15436f5ef56ca3a21e11c4d6b99e8b3c5
MD5 614d46efdf0ab9bb132b9897e6886f60
BLAKE2b-256 06899fa1f8e1127fae14c8b61f812602ca1ea329557014272c59230ae3540c0b

See more details on using hashes here.

File details

Details for the file launch_cert_tool-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for launch_cert_tool-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 84732bb3eb77769af12141a3bade23fc8dceb8ab50ba243270f38a07a54a8871
MD5 1c2e4474078cd33912805725508cb93f
BLAKE2b-256 2933d3c0daceebd673f8b15cb0649e02764af0ba84198ae382f34670e0cd1325

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