FreeIPA www cert with new hosts
I have been setting up new systems to migrate services to, mostly with ansible. I am deep in the Enterprise Linux ecosystem which means systemd and dbus and all the redhatisms. Sometimes it works great, and sometimes it's complicated. It's the price I pay for using FreeIPA domain services.
I found a great certificate management ansible role. It uses certmonger (which uses dbus, etc.) and "just works" until it doesn't.
I learned that in order for my subject alternative name www.example.com to be added to my host HTTP cert, I needed to run a few extra ipa commands.
ipa host-add www.example.com --force # previously done ipa host-add-managedby www.example.com --hosts=vm6.ipa.internal.com --hosts=vm7.ipa.internal.com ipa service-add HTTP/www.example.com # previously done ipa service-add-host HTTP/www.example.com --hosts=vm6.ipa.internal.com --hosts=vm7.ipa.internal.com
And then certmonger could get the cert it needed. And how I got the cert injected into the containers is pretty clever, if I say so myself. I'll have to write about that in the future.
One snippet from the error message looks like the following.
ca-error: Server at https://dns1.ipa.internal.com/ipa/json denied our request, giving up: 2100 (Insufficient access: Insufficient privilege to create a certificate with subject alt name 'www.example.com'.).
Comments