Skip to main content

Automated certificate acquisition and renewal for nomad services

Project description

Stingray

Build status Test coverage

Cryptocoryne registeres and renews certificates for the lofar.net domain based on consul service registrations.

Installation

pip install .

Usage

Cryptocoryne runs periodically on the central nomad cluster.

Every 5 minutes, cryptocoryne queries all services registered within consul that have the tag cert. Then the certificate <service_name>.lofar.net is registered or renewed (if needed) and stored in the LOFAR vault.

Services then have the option to retrieve the certificates from the vault using nomads job templating:

template {
  data = <<EOH
{{with secret "lets-encrypt/certificates/<service_name>.lofar.net" -}}
{{.Data.data.cert }}
{{.Data.data.chain -}}
{{end}}
EOH
  destination = "${NOMAD_SECRETS_DIR}/fullchain.cer"
}
template {
  data = <<EOH
{{with secret "lets-encrypt/certificates/<service_name>.lofar.net" -}}
{{.Data.data.key -}}
{{end}}
EOH
  destination = "${NOMAD_SECRETS_DIR}/key.key"
}

Contributing

To contribute, please create a feature branch and a "Draft" merge request. Upon completion, the merge request should be marked as ready and a reviewer should be assigned.

Verify your changes locally and be sure to add tests. Verifying local changes is done through tox.

pip install tox

With tox the same jobs as run on the CI/CD pipeline can be run. These include unit tests and linting.

tox

To automatically apply most suggested linting changes execute:

tox -e format

License

This project is licensed under the Apache License Version 2.0

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

lofar_cryptocoryne-0.1.1.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

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

lofar_cryptocoryne-0.1.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file lofar_cryptocoryne-0.1.1.tar.gz.

File metadata

  • Download URL: lofar_cryptocoryne-0.1.1.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lofar_cryptocoryne-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1214393daecdf60c20dcccf43189b1bb54906281cca6ae162ee57fe8b2bbb6a2
MD5 0356d46369cc37761860819fef23813d
BLAKE2b-256 d074bd17f3f0228e655f411c18bc27e040ea5fc2adfe84d62b324df0af9e7068

See more details on using hashes here.

File details

Details for the file lofar_cryptocoryne-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lofar_cryptocoryne-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c3d5c13296293996f93208e8bd078593b9cadb56a941e6e1b9c5a16b1ece105
MD5 1234f368d29583e337d028cf6802f0bb
BLAKE2b-256 b069326aa65eb5ef56fb2ae459dfb89e3c2d41f28e4d42db891415e1ca16a246

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