Use OpenBao as an intermediate CA¶
In this how-to guide, we will configure OpenBao to act as an intermediate Certificate Authority (CA) using OpenBao’s PKI secrets engine. Here self-signed-certificates will be the parent CA and tls-certificates-requirer will be the charm requesting a certificate to OpenBao.
The certificates issued by OpenBao will have a validity period that is half of its intermediate CA’s, which is determined by the root provider’s configuration, in this case, the self-signed certificates.

Note
OpenBao PKI will only allow issuing certificates depending on how it is configured, please see pki_allow_subdomains, pki_allowed_domains, pki_allow_any_name and pki_allow_wildcard_certificates
Configure OpenBao’s common name
juju config openbao pki_ca_common_name=<your domain name>
Configure OpenBao PKI Engine to allow issuing certificates for subdomains
juju config openbao pki_allow_subdomains=true
Deploy the parent CA
juju deploy self-signed-certificates --channel 1/stable
Integrate OpenBao with its parent CA
juju relate openbao:tls-certificates-pki self-signed-certificates
Deploy
tls-certificates-requirerjuju deploy tls-certificates-requirer --config common_name=<your domain name> --config sans_dns=<your domain name>
Integrate TLS Certificates Requirer with OpenBao
juju relate tls-certificates-requirer openbao:openbao-pki
Retrieve the certificate
juju run tls-certificates-requirer/leader get-certificate