Created attachment 1188818 [details] Output of journalctl -t renew_ca_cert Description of problem: IdM is configured with an embedded Certificate Authority. With this configuration, it must automatically renew the certificates used internally by its components. Certmonger is used to track the certificates stored in /etc/pki/pki-tomcat/alias, succeeds in cert renewal but fails when running the CA helper script because of SElinux policy preventing from updating the file /var/lib/pki/pki-tomcat/conf/ca/CS.cfg with the new cert. This results in certmonger not having the right certificate. Certmonger is running the script /usr/libexec/certmonger/dogtag-ipa-ca-renew-agent-submit => the script inherits certmonger context, which is certmonger_t $ ps -efZ | grep certmonger system_u:system_r:certmonger_t:s0 root 1670 1 0 14:59 ? 00:00:00 /usr/sbin/certmonger -S -p /var/run/certmonger.pid -n The file that cannot be updated is /var/lib/pki/pki-tomcat/conf/ca/CS.cfg, with context pki_tomcat_etc_rw_t: $ sudo ls -Z /var/lib/pki/pki-tomcat/conf/ca/CS.cfg unconfined_u:object_r:pki_tomcat_etc_rw_t:s0 /var/lib/pki/pki-tomcat/conf/ca/CS.cfg Version-Release number of selected component (if applicable): Fedora release 24 (Twenty Four) freeipa-server.x86_64 4.4.0.201608050957GIT9dac0a1-0.fc24 selinux-policy.noarch 3.13.1-191.fc24.2 selinux-policy-targeted.noarch 3.13.1-191.fc24.2 How reproducible: Always Steps to Reproduce: 1. Install IDM with a self-signed CA: sudo ipa-server-install --setup-dns \ --auto-forwarders \ --auto-reverse \ -n $DOMAIN \ -r $REALM \ -p Secret123 -a Secret123 \ -U 2. check when the subsystemCert expires $ sudo getcert list -d /etc/pki/pki-tomcat/alias -n 'subsystemCert cert-pki-ca' | grep expires 3. stop ntpd and change date to a few days before cert expiration $ sudo systemctl stop ntpd $ sudo date -s "2018-07-25 00:00" 4. Certmonger renews the certs, but we can find errors: $ sudo journalctl -t renew_ca_cert --since "2018-07-25" > ~/journalctl.out $ sudo ausearch -m avc --start today > ~/ausearch_certmonger.out The file /var/lib/pki/pki-tomcat/conf/ca/CS.cfg has not been updated with the new cert (line ca.subsystem.cert=...) Actual results: AVC errors seen and journal errors for certmonger, file CS.cfg not updated. Expected results: No AVC error, file CS.cfg udpated. Additional info: Attaching output of journalctl and ausearch.
Created attachment 1188819 [details] Output of ausearch -m AVC
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. 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 '24'. 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 24 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.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 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.