Bug 810016

Summary: After notifying that a certificate is no longer valid, certmonger shouldn't do so again right away.
Product: Red Hat Enterprise Linux 6 Reporter: Nalin Dahyabhai <nalin>
Component: certmongerAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED ERRATA QA Contact: Kaleem <ksiddiqu>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 6.2CC: dpal, jgalipea, kchamart
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: certmonger-0.59-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:37:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nalin Dahyabhai 2012-04-04 22:21:27 UTC
Description of problem:
When used in a non-renewing mode (getcert was used with the -R flag), after certmonger notifies the administrator that the certificate is no longer valid, 

Version-Release number of selected component (if applicable):
certmonger-0.56

How reproducible:
Always

Steps to Reproduce:
1. Set your system clock back to 2004.
2. Stop IPA.
3. Run "getcert start-tracking -d /etc/httpd/alias -n ipaCert -p /etc/httpd/alias/pwdfile.txt -R".
4. Stop certmonger.
5. Set your clock ahead to 2007.
6. Start certmonger.
  
Actual results:
7. Watch /var/log/messages start filling up.

Expected results:
7. Watch one message land in /var/log/messages, and observe that another doesn't get logged for either 24 hours or until the service is restarted, whichever comes first.

Comment 3 RHEL Program Management 2012-07-10 08:16:16 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2012-07-10 23:08:55 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 5 Nalin Dahyabhai 2012-07-25 23:02:46 UTC
(In reply to comment #0)
> Description of problem:
> When used in a non-renewing mode (getcert was used with the -R flag), after
> certmonger notifies the administrator that the certificate is no longer
> valid,
it immediately checks again, and notifies the administrator again.  This sequence of events repeats indefinitely.

Comment 7 Kaleem 2012-11-26 09:17:13 UTC
Verified.

Certmonger version:
==================
[root@dhcp201-215 ~]# rpm -q certmonger
certmonger-0.61-1.el6.x86_64
[root@dhcp201-215 ~]#

Beaker automation log extract:
===============================

:: [   PASS   ] :: Certmonger service started successfully
:: [   PASS   ] :: Creating tmp directory
:: [   PASS   ] :: Changing SELinux context of tmp directory
:: [   PASS   ] :: Certificate generated with not-renewing option -R
:: [   PASS   ] :: Running 'sleep 2'
:: [   PASS   ] :: Running 'getcert list > /tmp/tmp.y44QxHtlIy/list.txt'
:: [   PASS   ] :: Running 'cat /tmp/tmp.y44QxHtlIy/list.txt'
:: [   PASS   ] :: File '/tmp/tmp.y44QxHtlIy/list.txt' should contain 'status: MONITORING'
:: [   PASS   ] :: File '/tmp/tmp.y44QxHtlIy/list.txt' should contain 'auto-renew: no'
:: [   PASS   ] :: Certmonger service stopped successfully
:: [   PASS   ] :: Changing system date to 3 year ahead
:: [   PASS   ] :: clearing /var/log/messages
:: [   PASS   ] :: Certmonger service started successfully
:: [   PASS   ] :: Running 'cat /var/log/messages'
:: [   PASS   ] :: File '/var/log/messages' should contain 'certmonger: Certificate named "certtest" in token "NSS Certificate DB" in database "/tmp/tmp.y44QxHtlIy" is no longer valid.'
:: [   PASS   ] :: clearing /var/log/messages
:: [   PASS   ] :: File '/var/log/messages' should not contain 'certmonger: Certificate named "certtest" in token "NSS Certificate DB" in database "/tmp/tmp.y44QxHtlIy" is no longer valid.'
:: [   PASS   ] :: clearing /var/log/messages
:: [   PASS   ] :: Certmonger service restarted successfully
:: [   PASS   ] :: Running 'cat /var/log/messages'
:: [   PASS   ] :: File '/var/log/messages' should contain 'certmonger: Certificate named "certtest" in token "NSS Certificate DB" in database "/tmp/tmp.y44QxHtlIy" is no longer valid.'
:: [   PASS   ] :: Chaning system date to current time
:: [   PASS   ] :: Running 'selfsign-getcert stop-tracking -d /tmp/tmp.y44QxHtlIy -n certtest'
:: [   PASS   ] :: Running 'rm -rf /tmp/tmp.y44QxHtlIy'
:: [   LOG    ] :: Duration: 25s
:: [   LOG    ] :: Assertions: 24 good, 0 bad
:: [   PASS   ] :: RESULT: Test

Comment 9 errata-xmlrpc 2013-02-21 08:37:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0320.html