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 1886837 - Revise PKINIT upgrade code
Summary: Revise PKINIT upgrade code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.0
Assignee: Thomas Woerner
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-09 13:56 UTC by Thorsten Scherf
Modified: 2023-12-15 19:43 UTC (History)
8 users (show)

Fixed In Version: idm-client-8050020210701113027.de73ecb2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 18:21:53 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-7266 0 None None None 2021-11-09 18:26:49 UTC
Red Hat Product Errata RHBA-2021:4230 0 None None None 2021-11-09 18:22:11 UTC

Description Thorsten Scherf 2020-10-09 13:56:43 UTC
This bug is created as a clone of upstream ticket:
https://pagure.io/freeipa/issue/8532

I am reading through PKINIT upgrade and setup code and I think we have logical bug in ipa-pkinit-manage and in the upgrade code:
1. ipa-pkinit-manage never calls krbinstance's setup_pkinit() on enable, so we are never able to enable the certificate issuance through it even though we are able to disable one
2. upgrade code only allows to issue self-signed certificates if certificates are missing

as a result, there is no way to upgrade from self-signed to CA-based and the way it is done, even if you'd do reissue, the issuer will still be left `cn=<hostname>`, without EKUs we need, so it will not work for web UI logon FAST wrapping.

We have to reissue cert properly and there is nothing that would do it -- as nothing calls into krb instance's `setup_pkinit()`.

a manual fix is to force reissue of the PKINIT certificate against the right CA with right issuer and EKUs:
```
ipa-getcert rekey -f /var/kerberos/krb5kdc/kdc.crt -U id-kp-serverAuth -U id-pkinit-KPKdc -K krbtgt/IPA.TEST -T KDCs_PKINIT_Certs -X IPA
```

but we need to revise upgrade code and `ipa-pkinit-manage` to make sure we are taking care of the conversion of 'bogus' PKINIT certificate to the correct one, whether self-signed or IPA CA.

Comment 5 Rob Crittenden 2021-06-17 21:30:06 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/50306cc636955ff5e478819e98224953cb6346ee

Comment 13 anuja 2021-08-02 09:25:57 UTC
Verigied using sanity ceck:
using upstream-pkinit-manage

(A) test-result.txt.gz
============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-3.10.1, py-1.10.0, pluggy-0.13.1 -- /usr/libexec/platform-python
cachedir: /home/cloud-user/.pytest_cache
metadata: {'Python': '3.6.8', 'Platform': 'Linux-4.18.0-324.el8.x86_64-x86_64-with-redhat-8.5-Ootpa', 'Packages': {'pytest': '3.10.1', 'py': '1.10.0', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.11.0', 'html': '1.22.1', 'multihost': '3.0', 'sourceorder': '0.5'}}
rootdir: /usr/lib/python3.6/site-packages/ipatests, inifile:
plugins: metadata-1.11.0, html-1.22.1, multihost-3.0, sourceorder-0.5
collecting ... collected 5 items

test_integration/test_pkinit_manage.py::TestPkinitManage::test_pkinit_enable PASSED [ 20%]
test_integration/test_pkinit_manage.py::TestPkinitManage::test_pkinit_disable PASSED [ 40%]
test_integration/test_pkinit_manage.py::TestPkinitManage::test_pkinit_reenable PASSED [ 60%]
test_integration/test_pkinit_manage.py::TestPkinitManage::test_pkinit_on_replica PASSED [ 80%]
test_integration/test_pkinit_manage.py::TestPkinitInstall::test_pkinit PASSED [100%]

(B) runner.log 
2021-07-30T10:10:05+0000 ok: [master.testrelm.test] => (item=ipa-server) => 
2021-07-30T10:10:05+0000   msg:
2021-07-30T10:10:05+0000   - arch: x86_64
2021-07-30T10:10:05+0000     epoch: null
2021-07-30T10:10:05+0000     name: ipa-server
2021-07-30T10:10:05+0000     release: 4.module+el8.5.0+11912+1b4496cf
2021-07-30T10:10:05+0000     source: rpm
2021-07-30T10:10:05+0000     version: 4.9.6

Comment 16 errata-xmlrpc 2021-11-09 18:21:53 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 (ipa bug fix and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2021:4230


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