Skip to main content

OCI Certs Management Service plugin for Certbot

Project description

Oracle Cloud Infrastructure (OCI) Installer plugin for Certbot.

This plugin automates the process of installing a certificate acquired by certbot into OCI Certificates Management Service.

For more information on the OCI Certificates service please see the official documentation at https://docs.oracle.com/en-us/iaas/Content/certificates/home.htm

Configuration:

Install and configure the OCI CLI. See https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm for details.

To use this installer you will need:

  • an OCI account with adequate permission to Create / Update / Delete certificates stored in the Certificates Management Service

Installation

This package is now published on PyPi, which makes installation super easy. From your command line:

pip install certbot-oci-certs

Development

If you want to work on the code you should create a virtual environment and install it there:

git clone git@github.com:therealcmj/certbot-oci-certs.git
cd certbot-oci-certs
virtualenv dev
. ./dev/bin/activate
pip install -e .

You can then use your IDE as normal on the live code.

To use the debugger be sure to choose the correct virtual environment. For PyCharm go to Debug, Edit Configurations and then update the Interpreter to point to the newly created Virtual Environment.

Arguments

As of this writing this plug-in supports the following arguments on certbot’s command line:

--oci-certificate-id OCI_CERTIFICATE_ID
                      Certificate OCID (default: None)
--oci-certificate-name OCI_CERTIFICATE_NAME
                      Certificate Name (default: None)
--oci-compartment-id OCI_COMPARTMENT_ID
                      Compartment OCID (default: None)
--oci-auth-mode {configfile,instance,cloudshell}
                      Authentication mode - one of "configfile", "instance", "cloudshell" (default: configfile)
--oci-configfile OCI_CONFIGFILE
                      OCI CLI Configuration file (for authmode=configfile). (default: None)
--oci-profile OCI_PROFILE
                      OCI configuration profile (in OCI configuration file) (default: DEFAULT)

You can always get a list of the available arguments by running

certbot installer -h oci

Examples

Assuming you have previously acquired a certificate for demosite.ociateam.com (perhaps using the certbot-dns-oci plug-in) you can install it via:

certbot install \
 --logs-dir logs --work-dir work --config-dir config \
 --installer oci \
 --oci-compartment $MYOCICOMPARTMENT \
 --cert-path demosite.ociateam.com/cert.pem \
 --key-path demosite.ociateam.com/privkey.pem \
 --chain-path demosite.ociateam.com/chain.pem \
 -d demosite.ociateam.com

If you want to acquire a certificate AND install it in one go using both of my plug-ins you can do that too…

CERTNAME=demo$$.ociateam.com ; \
certbot run \
 --test-cert \
 --logs-dir logs --work-dir work --config-dir config \
 --authenticator dns-oci \
 --installer oci \
 --oci-compartment $MYOCICOMPARTMENT \
 --oci-certificate-name $CERTNAME \
 --debug \
 -d $CERTNAME

And to renew (just that one certificate) later it’s just:

CERTNAME=demo$$.ociateam.com ; \
certbot renew \
 --test-cert \
 --logs-dir logs --work-dir work --config-dir config \
 --debug \
 --cert-name $CERTNAME

CAUTION:

Please do remember tat “certbot renew” tries to renew all certs nearing expiration. If you use the –oci-certificate-name command line argument when running “certbot renew” you’re going to make a mess of things. So be cautious and renew certs one by one OR remember to leave that command line argument off!

YOU HAVE BEEN WARNED.

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

certbot_oci_certs-0.2.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

certbot_oci_certs-0.2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file certbot_oci_certs-0.2.0.tar.gz.

File metadata

  • Download URL: certbot_oci_certs-0.2.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for certbot_oci_certs-0.2.0.tar.gz
Algorithm Hash digest
SHA256 34a8821782670774e1a6680158aae960767cff8656f247a827bca666d0aff6ad
MD5 180c7839fbed72a4c007edcabe417f4a
BLAKE2b-256 7352fe063c0db13da846310499ef9d9113483a3d85ab18803c0a716f8e92e36a

See more details on using hashes here.

File details

Details for the file certbot_oci_certs-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_oci_certs-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 393b247d85ae485452e0dba67116ddac5fafe3a1955ba60b86e0e704467726fe
MD5 5ce0abc520bcf21672604a85bb36fe75
BLAKE2b-256 573ddfb23338d0d15bac5202f188c23b1875df1820a9aa6abd704056704a683a

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