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 1869609 - Switch certmonger IPA responders to JSONRPC and remove xmlrpc-c dependency
Summary: Switch certmonger IPA responders to JSONRPC and remove xmlrpc-c dependency
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: certmonger
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Rob Crittenden
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-18 11:01 UTC by Martin Kosek
Modified: 2021-05-18 15:50 UTC (History)
7 users (show)

Fixed In Version: certmonger-0.79.13-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:49:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description Martin Kosek 2020-08-18 11:01:35 UTC
Description of problem:
certmonger still uses XMLRPC for communication with the FreeIPA PKI service. However, the FreeIPA XMLRPC interface is about to be deprecated (if not already). FreeIPA client already uses JSONRPC by default. The last change was was switching the ipa-join binary, leveraging the jansson library:
https://pagure.io/freeipa/issue/7966

This change is not new, it was already proposed when FreeIPA was switching to JSONRPC:
https://pagure.io/freeipa/issue/3299#comment-323619

Comment 1 Rob Crittenden 2020-08-18 13:00:59 UTC
Related upstream BZ https://bugzilla.redhat.com/show_bug.cgi?id=1869370

Comment 5 Rob Crittenden 2020-11-03 14:51:55 UTC
To validate you don't need to tweak the debug level. It logs the json result at log level 1 and IPA sets it to 2 by default.

The reproduction steps are:

# ipa service-add test/`hostname`
# ipa-getcert request -f /etc/pki/tls/certs/test.pem -k /etc/pki/tls/private/test.key -K test/`hostname` -w
# journalctl -u certmonger

Look for something like this. The resulting json returned by IPA is displayed:

Nov 03 09:47:02 ipa.example.test certmonger[3080129]: 2020-11-03 09:47:02 [3080129] Running enrollment helper "/usr/libexec/certmonger/ipa-server-guard".
Nov 03 09:47:02 ipa.example.test certmonger[3079897]: 2020-11-03 09:47:02 [3079897] Request11('20201103144702') moved to state 'SUBMITTING'
Nov 03 09:47:02 ipa.example.test certmonger[3079897]: 2020-11-03 09:47:02 [3079897] Will revisit Request11('20201103144702') on traffic from 15.
Nov 03 09:47:03 ipa.example.test ipa-submit[3080130]: {
                                                          "error": null,
                                                          "id": null,
                                                          "principal": "host/ipa.example.test",
                                                          "result": {
                                                              "messages": [
                                                                  {
                                                                      "code": 13001,
                                                                      "data": {
                                                                          "server_version": "2.240"
                                                                      },
                                                                      "message": "API Version number was not sent, forward compatibility not guaranteed. Assuming server's API version, 2.240",
                                                                      "name": "VersionMissing",
                                                                      "type": "warning"
                                                                  }
                                                              ],
                                                              "result": {
                                                                  "cacn": "ipa",
                                                                  "certificate": "MII...k=",
                                                                  "issuer": "CN=Certificate Authority,O=EXAMPLE.TEST",
                                                                  "request_id": 13,
                                                                  "san_dnsname": [
                                                                      "ipa.example.test"
                                                                  ],
                                                                  "san_other_kpn": [
                                                                      "test/ipa.example.test"
                                                                  ],
                                                                  "san_other_upn": [
                                                                      "test/ipa.example.test"
                                                                  ],
                                                                  "serial_number": 13,
                                                                  "serial_number_hex": "0xD",
                                                                  "subject": "CN=ipa.example.test,O=EXAMPLE.TEST",
                                                                  "valid_not_after": "Fri Nov 04 13:47:02 2022 UTC",
                                                                  "valid_not_before": "Tue Nov 03 14:47:02 2020 UTC"
                                                              },
                                                              "summary": null,
                                                              "value": 13
                                                          },
                                                          "version": "4.9.0.dev202010270039+git295ef4968"
                                                      }

Comment 13 Sumedh Sidhaye 2020-12-21 11:06:13 UTC
Build used for verification:

ipa-client-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.x86_64
ipa-client-common-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-common-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-healthcheck-core-0.7-3.module+el8.4.0+9007+5084bdd8.noarch
ipa-selinux-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-server-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.x86_64
ipa-server-common-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-server-dns-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.noarch
ipa-server-trust-ad-4.9.0-0.5.rc3.module+el8.4.0+9124+ced20601.x86_64

============================= 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 10 items

test_integration/test_cert.py::TestInstallMasterClient::test_cacert_file_appear_with_option_F PASSED [ 10%]
test_integration/test_cert.py::TestInstallMasterClient::test_certmonger_ipa_responder_jsonrpc PASSED [ 20%]
test_integration/test_cert.py::TestInstallMasterClient::test_ipa_getcert_san_aci PASSED [ 30%]
test_integration/test_cert.py::TestInstallMasterClient::test_getcert_list_profile PASSED [ 40%]
test_integration/test_cert.py::TestInstallMasterClient::test_getcert_list_profile_using_subca PASSED [ 50%]
test_integration/test_cert.py::TestCertmongerRekey::test_certmonger_rekey_keysize PASSED [ 60%]
test_integration/test_cert.py::TestCertmongerRekey::test_rekey_keytype_RSA PASSED [ 70%]
test_integration/test_cert.py::TestCertmongerRekey::test_rekey_request_id PASSED [ 80%]
test_integration/test_cert.py::TestCertmongerRekey::test_rekey_keytype_DSA PASSED [ 90%]
test_integration/test_cert.py::TestCertmongerInterruption::test_certmomger_tracks_renewed_certs_during_interruptions PASSED [100%]

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

Comment 16 errata-xmlrpc 2021-05-18 15:49:54 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 (certmonger 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:1851


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