F5 BIGIP & XC certbot plugin

Hi!

As I maintain the certbot-f5bigip plugin to enable the certbot as ACME client to validate and install certificates, I now published the certbot-f5xc plugin! Currently only DNS validation with the DNS01 challenge is supported, so if you use F5 XC for DNS, you can use this plugin to verify domains for your certificates and use the certificate then for other infrastructure beside XC HTTP LBs (which can do auto-cert provisioning already).

I will add an installer next, so certificates can be uploaded / installed to XC and re-used with HTTP LBs, so stay tuned!

Here are the links to the repositories on gitlab.com:

nice! thanks for sharing with the community, @emalzer !

The certbot-f5xc plugin can now also be used as an installer!

@emalzer is there a way to make the plugin only upload to the active unit in a cluster?

If not, then it would be a great feature addition to the plugin :grinning_face_with_smiling_eyes:

hey! the plugin checks all bigips in the cluster and identifies which one is active for the provided VS. so, that should be already the case. did you observe otherwise?

Hey :slight_smile:

I just need to read your documentation where you write that you handle HA just nicely :laughing:

I’m waiting for a server to be setup for me, so I haven’t tried it out just yet.

But can you help me understand two flags you have in your example:

“-a f5-bigip-auth” and “-i f5-bigip-inst”

what do they mean?

sure! the ACME process is split into two parts: authentication and installation. so you can define how you wana do the authentication / validation part and how to do the installation. you can do both on the bigip and then you need to define the f5-bigip-auth-* and the f5-bigip-inst-* parameters. you can also for example do the validation / authentication via a public DNS provider (google, …) and do the installation to the bigip. so you would need to apply the google-dns parameters and only the f5-bigip-inst-* parameters.

is it more clear to you now?

if you want, take a look into the Erich Malzer / certbot-ansible · GitLab repo, there you can manage the required parameters for certbot via a yaml file and let ansible render a shell script that executes then the certbot commands with all the parameters.

Just to get to all the slow minds on board :sweat_smile:

So, if I just want to install the certificate on the BigiP I only need f5-bigip-inst? And if I want to have the Bigip to be part of the certificate validation process I use f5-bigip-auth?

yes, true. if your certbot already has a certificate, you can just use the f5-bigip-inst parameters to install this existing and via certbot managed certificate to the bigip.

Hi again @emalzer

Is it correct that you are using basic auth when you upload the certificates?

I believe that if you change that to the token based auth instead you don’t need to use a administrator for the task. @JRahm can you confirm?

I have a customer which uses certificate vendor and they only need a certificate manager role to do the updating.

Hi!

No, the plugin does not use Basic auth, it uses token based auth.

And If you user the plugin to install the cert/key/chain and create the ClientSSL profile, you need the administrator role.

You can user the `--f5-bigip-inst-disable-clientssl-profile true` and `--f5-bigip-inst-add-chain-to-certificate true` options to only create / update the certificates.

I just did a quick test on my lab cluster an the certificate manager role is still not enough, as the plugin uploads the cert/key via the “/mgmt/shared/file-transfer/uploads/” API and this role does not have the right to use this endpoint.

So currently I’m not aware of how to update / upload cert & key via the API with only the certificate manager role.

I also found this article (https://my.f5.com/manage/s/article/K000152667) which mentions that the ‘certificate-manager’ role cannot perform certificate management tasks via the API.

You are right, I must have been dreaming :laughing:

We will have to wait for a release addressing this shortcoming.

@emalzer just one question.

I can see the certificate object has the name _Letsencrypt postfix. Is that something that can be changed?

We are not using LE, so it tiggles my ocd looking at it :grinning_face_with_smiling_eyes:

sure, you can change the suffix:

--f5-bigip-inst-suffix F5_BIGIP_INST_SUFFIX
                        Custom Suffix for certificates, keys and chains
                        (default: Letsencrypt)

Does this also manage the management/api ssl cert as well? I’ve got a solution for handling the certs on the various VIPs but it does not handle the cert for the actual F5 appliance itself.

Hi! no, it cannot manage the certificate for the management ui or api.

Thanks for documenting this limitation. We confirmed the same certbot-f5bigip file-upload restriction with our F5 Certificate Manager account. As an alternative, we were able to use the F5 sys/crypto/cert and sys/crypto/key APIs to install and replace certificates without Administrator access. This worked for us with the existing Certificate Manager account

F5 BIG-IP now has ACME integration in 21.1 Automatic Certificate Management with ACMEv2 in F5 BIG-IP - DevCentral but this option is great for other use cases.

Maybe share it as an Article code share as well. Still hard to navigate with the new forum for me :laughing: