Skip to main content
Made with pop, a Python implementation of Plugin Oriented Programming Made with Python

The Idem TLS provider

About

An Idem plugin to work with TLS keys and certificates.

The plugin fetches TLS certificate information for use with other Idem plugins, such as idem-aws, when creating resources that expose TLS services.

What is POP?

This project is built with pop, a Python-based implementation of Plugin Oriented Programming (POP). POP seeks to bring together concepts and wisdom from the history of computing in new ways to solve modern computing problems.

For more information:

Getting Started

Prerequisites

  • Python 3.8+

  • git (if installing from source or contributing to the project)

    To contribute to the project and set up your local development environment, see CONTRIBUTING.rst in the source repository for this project.

Installation

You can install idem-tls with the Python package installer (PyPI) or from source.

Install from PyPI

pip install idem-tls

Install from Source

# clone repo
git clone git@<your-project-path>/idem-tls.git
cd idem-tls

# Setup venv
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Usage

Setup

After installation, idem-tls execution and state modules are accessible to the pop hub.

For more information:

To set the TLS method that idem-tls uses, configure it in your credentials.yaml file.

Credentials for idem-tls are optional. If you don’t configure a TLS method, the plugin uses TLSv1 by default.

credentials.yaml:

tls:
  default:
    method: TLSv1_2

For more about Idem credentials files, including recommended steps for encryption and environment variables, see Authenticating with Idem

You are now ready to use idem-tls.

Exec Module

An SLS file specifies the desired state of a resource. You can run an exec module within an SLS file using the exec.run state, where the exec module returns a new state that can be referenced with argument binding.

The idem-tls plugin exec module supports TLS certificate get and list operations.

  • tls.certificate.get

    Return the root CA certificate for a given URL.

  • tls.certificate.list

    Return the certificate chain for a given URL.

Syntax:

[Idem-state-name]:
  exec.run:
    - path: tls.certificate.get
    - kwargs:
        url: 'string'

Example:

unmanaged-tls_certificate:
  exec.run:
    - path: tls.certificate.get
    - kwargs:
        url: https://oidc.eks.us-east-2.amazonaws.com/id/sample
oidc.eks.us-east-2.amazonaws.com/id/sample:
    aws.iam.open_id_connect_provider.present:
      name: oidc.eks.us-east-2.amazonaws.com/id/sample
      resource_id: oidc.eks.us-east-2.amazonaws.com/id/sample
      url:  https://oidc.eks.us-east-2.amazonaws.com/id/sample
      client_id_list:
        - sample_client
      thumbprint_list:
        - ${exec:unmanaged-tls_certificate:sha1_fingerprint}
      tags:
        - Key: tag-key-1
          Value: tag-value-1
        - Key: tag-key-2
          Value: tag-value-2

Idem command line example:

idem exec exec.tls.certificate.list url=https://oidc.eks.us-east-2.amazonaws.com/id/sample

Current Supported Resource States

tls

certificate

Metadata

Release files for idem-tls 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idem-tls 2.0.0
File Size Uploaded
idem-tls-2.0.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for idem-tls 2.0.0
File Interpreter ABI Platform
idem_tls-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.4 kB

Release files / idem-tls-2.0.0.tar.gz

Download URL idem-tls-2.0.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
16102ed10e7bc541fff445a245dd01f765998e62dbc38ca95584a86793cc133f
BLAKE2b-256 checksum
How to use checksums
e5c94908f9b22b807b927b072d6738b406ffbda1c592571894734746e8b056bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.4 tqdm/4.65.0 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.17

Release files / idem_tls-2.0.0-py3-none-any.whl

Download URL idem_tls-2.0.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b02b7b72fd9678e771db1f451889826aae9a827304fdc6746c29f9628829072
BLAKE2b-256 checksum
How to use checksums
6fab13d1a653acc526740e52934225e37eadbd93523335e2b6f0f0f92f4866a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.4 tqdm/4.65.0 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.17

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page