Bug 1475541 - Certificate renewal scripts can crash and leave FreeIPA in a broken state
Certificate renewal scripts can crash and leave FreeIPA in a broken state
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: freeipa (Show other bugs)
25
All Linux
unspecified Severity urgent
: ---
: ---
Assigned To: IPA Maintainers
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-26 17:06 EDT by Adam Williamson
Modified: 2017-12-12 05:19 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-12 05:19:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
journal extract (29.81 KB, text/plain)
2017-07-26 17:23 EDT, Adam Williamson
no flags Details

  None (edit)
Description Adam Williamson 2017-07-26 17:06:05 EDT
Rob Crittenden kindly helped me diagnose and fix a serious problem on my FreeIPA server today. tomcat had suddenly started failing to authenticate when trying to access the LDAP server (389). Rob figured out (if I understand correctly) that it was down to a TLS certificate mismatch: the server certificate Tomcat was expecting 389 to be using was not the same as the server certificate it was *actually* using. Diagnosing this was not at all straightforward, and fixing it involved some fairly advanced (for a non-LDAP-specialist) ldapmodify stuff that again I probably couldn't have worked out for myself.

We think this was ultimately caused by a problem with the certmonger-based automatic certificate renewal stuff. It seems that an SELinux denial caused the renew_ca_cert and stop_pkicad scripts (both part of FreeIPA) not to be able to stop the pki-tomcatd service, and this failure caused renew_ca_cert to crash (several times, in fact). I think this resulted in the inconsistent state (the renewal process got as far as issuing the new cert and configuring 389 to use it, but didn't manage to configure tomcat to expect it).

Of course, we should fix the SELinux policy so the scripts *aren't* preventing from stopping the service, and I've filed a bug for that: https://bugzilla.redhat.com/show_bug.cgi?id=1475528 . But I also thought I should file this bug to see if the renewal process can be made safer - done more atomically, so if it fails things are correctly rolled back and FreeIPA left in a consistent state (and perhaps some kind of understandable alert generated and logged / sent to the admin / whatever). And certainly it shouldn't cause renew_ca_cert to just straight up *crash*, as it does.

I'll attaching the full extract of journal messages from the renewal.
Comment 1 Adam Williamson 2017-07-26 17:23 EDT
Created attachment 1305048 [details]
journal extract
Comment 2 Petr Vobornik 2017-08-04 18:18:08 EDT
Upstream ticket:
https://pagure.io/freeipa/issue/7091
Comment 3 Fedora End Of Life 2017-11-16 13:55:48 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 4 Fedora End Of Life 2017-12-12 05:19:44 EST
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.