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 1810148 - ipa-server-certinstall raises exception when installing IPA-issued web server cert
Summary: ipa-server-certinstall raises exception when installing IPA-issued web server...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-04 15:46 UTC by Rob Crittenden
Modified: 2021-05-18 15:48 UTC (History)
11 users (show)

Fixed In Version: ipa-4.9.0-0.1.rc1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:47:50 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rob Crittenden 2020-03-04 15:46:14 UTC
Cloned from upstream: https://pagure.io/freeipa/issue/8204

### Issue
changing the freeipa ui apache server cert fails.

ipa-server-certinstall -w -p whatever  --pin=""   /etc/ssl/a.pem.crt   /etc/ssl/private/a.pem.key
fails with

ipapython.ipautil: DEBUG: stderr=
dbus.connection: ERROR: Unable to set arguments ({'template-subject': <Name(O=1.QUIETFOUNTAIN.COM,CN=registry.1.quietfountain.com)>},) according to signature 'a{sv}': <class 'TypeError'>: Don't know which D-Bus type to use to encode type "Name"
ipapython.admintool: DEBUG:   File "/usr/lib/python3/dist-packages/ipapython/admintool.py", line 179, in execute
    return_value = self.run()
  File "/usr/lib/python3/dist-packages/ipaserver/install/ipa_server_certinstall.py", line 117, in run
    self.replace_http_cert()
  File "/usr/lib/python3/dist-packages/ipaserver/install/ipa_server_certinstall.py", line 173, in replace_http_cert
    certmonger.add_subject(req_id, cert.subject)
  File "/usr/lib/python3/dist-packages/ipalib/install/certmonger.py", line 305, in add_subject
    add_request_value(request_id, 'template-subject', subject)
  File "/usr/lib/python3/dist-packages/ipalib/install/certmonger.py", line 284, in add_request_value
    request.obj_if.modify({directive: value})
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 147, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 643, in call_blocking
    message.append(signature=signature, *args)

ipapython.admintool: DEBUG: The ipa-server-certinstall command failed, exception: TypeError: Don't know which D-Bus type to use to encode type "Name"
ipapython.admintool: ERROR: Don't know which D-Bus type to use to encode type "Name"
ipapython.admintool: ERROR: The ipa-server-certinstall command failed.

#### Steps to Reproduce
See above, 100%

Change
def add_subject(request_id, subject):
    """
    In order for a certmonger request to be renwable it needs the subject
    set in the request file.

    When an existing certificate is added via start-tracking it won't have
    a subject_template set. !!!
    """
-    add_request_value(request_id, 'template-subject', subject)
+    add_request_value(request_id, 'template-subject', str(subject))

and it works.
certmonger/eoan,now 0.79.6-2 amd64 [installed,automatic]

I'm concerned my 'fix' will not result in certmonger actually doing the right thing, but at least the command completes 'normally'.  I'll leave it to the freeipa brain trust from here.

Comment 2 Rob Crittenden 2020-03-04 15:57:56 UTC
Linked to upstream issue https://pagure.io/freeipa/issue/8204

Comment 3 Florence Blanc-Renaud 2020-09-10 07:24:48 UTC
Fixed upstream
master:
https://pagure.io/freeipa/c/040d48fa61eb4902f43dfe7fa10257de1e3818b6
https://pagure.io/freeipa/c/f249c51bf4342341378e63953386e9ac4070be54

Upstream test added in ipatests/test_integration/test_installation.py::TestInstallCA::test_cert_install_with_IPA_issued_cert hence setting the TestCaseProvided keyword.

Comment 13 Kaleem 2020-12-22 09:12:46 UTC
Verified with nightly compose based on following details

IPA version: (snip from runner.log):
------------------------------------
2020-12-22T08:30:30+0000 ok: [master.testrelm.test] => (item=ipa-server) => 
2020-12-22T08:30:30+0000   msg:
2020-12-22T08:30:30+0000   - arch: x86_64
2020-12-22T08:30:30+0000     epoch: null
2020-12-22T08:30:30+0000     name: ipa-server
2020-12-22T08:30:30+0000     release: 0.5.rc3.module+el8.4.0+9124+ced20601
2020-12-22T08:30:30+0000     source: rpm
2020-12-22T08:30:30+0000     version: 4.9.0

Test results: (snip from test-result.txt):
-----------------------------------------

Test "test_integration/test_installation.py::TestInstallCA::test_cert_install_with_IPA_issued_cert" for this bugzilla is successful as per following details from the test run.

============================= 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-264.el8.x86_64-x86_64-with-redhat-8.4-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 7 items

test_integration/test_installation.py::TestInstallCA::test_ccaches_cleanup PASSED [ 14%]
test_integration/test_installation.py::TestInstallCA::test_replica_ca_install_with_no_host_dns PASSED [ 28%]
test_integration/test_installation.py::TestInstallCA::test_replica_ca_install_with_skip_schema_check PASSED [ 42%]
test_integration/test_installation.py::TestInstallCA::test_certmonger_reads_token_HSM PASSED [ 57%]
test_integration/test_installation.py::TestInstallCA::test_ipa_ca_crt_permissions PASSED [ 71%]
test_integration/test_installation.py::TestInstallCA::test_cert_install_with_IPA_issued_cert PASSED [ 85%]
test_integration/test_installation.py::TestInstallCA::test_is_ipa_configured PASSED [100%]

---------------- generated xml file: /home/cloud-user/junit.xml ----------------
----------- generated html file: file:///home/cloud-user/report.html -----------
========================= 7 passed in 1692.82 seconds ==========================

Comment 16 errata-xmlrpc 2021-05-18 15:47:50 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 (Moderate: idm:DL1 and idm:client security, 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/RHSA-2021:1846


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