Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1334795

Summary: Unable to revoke certificate for managed host
Product: Red Hat Enterprise Linux 7 Reporter: Petr Vobornik <pvoborni>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Kaleem <ksiddiqu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: pasik, pvoborni, rcritten, tomek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-30 18:50:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Vobornik 2016-05-10 14:28:51 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/freeipa/ticket/5852

Steps to reproduce:
{{{
# ipa-server-install -a Secret123 -p Secret123 -r EXAMPLE.TEST -U
# echo Secret123 | kinit admin
# ipa host-add host.example.test --ip-address <IP>
# ipa host-add-managedby host.example.test --host $( hostname -f )
# ipa-getcert request -k /etc/ssl/certs/host.example.test.key -f /etc/ssl/certs/host.example.test.cert -N host.example.test -K host/host.example.test
# kinit -kt /etc/krb5.keytab
# ipa host-show host.example.test
  ...
  Serial Number: 12
  ...
# ipa cert-revoke 12
}}}

Current result:
{{{
ipa: ERROR: Insufficient access: not allowed to perform operation: retrieve certificate
}}}

Expected result:
{{{
  Revoked: True
}}}

I beleive the problem lies in ipalib/plugins/cert.py:class cert_show:def execute
{{{
...
611         try:
612             self.check_access()
613         except errors.ACIError as acierr:
614             self.debug("Not granted by ACI to retrieve certificate, looking at principal")
615             bind_principal = getattr(context, 'principal')
616             if not bind_principal.startswith('host/'):
617                 raise acierr
618             hostname = get_host_from_principal(bind_principal)
...
628         if hostname:
629             # If we have a hostname we want to verify that the subject                                            
630             # of the certificate matches it, otherwise raise an error                                             
631             if hostname != cert.subject.common_name:    #pylint: disable=E1101                                    
632                 raise acierr
...
}}}

Comment 1 Petr Vobornik 2017-04-06 16:03:41 UTC
IdM team doesn't have capacity to fix this bug for RHEL 7.4. Moving to next RHEL version. Fixing the bug there will depend on capacity of FreeIPA upstream. Without sufficient  justification there is a chance that it will be moved again later.

Comment 4 Rob Crittenden 2019-01-30 18:50:22 UTC
Not able to reproduce this, assuming it was fixed at some point. Closing as CURRENTRELEASE.