This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 1974895 - [RFE] IPA RA key (2048) is too small when installing in FUTURE crypto policy
Summary: [RFE] IPA RA key (2048) is too small when installing in FUTURE crypto policy
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: ipa
Version: unspecified
Hardware: x86_64
OS: Linux
high
high
Target Milestone: beta
: ---
Assignee: Florence Blanc-Renaud
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-22 17:58 UTC by Rakesh Kumar
Modified: 2023-09-18 18:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-18 18:43:20 UTC
Type: Story
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-6916 0 None None None 2021-09-24 06:04:47 UTC
Red Hat Issue Tracker   RHEL-4858 0 None Migrated None 2023-09-18 18:40:19 UTC

Description Rakesh Kumar 2021-06-22 17:58:58 UTC
Description of problem:
1] Customer want to install ipa on rhel8.4 by using update-crypto-policies --set FUTURE.

2] Though we know that This level also provides  some (not complete) preparation for post-quantum encryption support in form of 256-bit symmetric encryption requirement. The RSA and Diffie-Hellman parameters are accepted if larger than 3071 bits. The level provides at least 128-bit security.

3] so we have  tried to set 

/root/pki_override.cfg 

[CA]
pki_admin_key_size = 4096
pki_admin_keysize = 4096
pki_audit_signing_key_size = 4096
pki_ca_signing_key_size = 4096
pki_ocsp_signing_key_size = 4096
pki_ssl_server_key_size = 4096
pki_sslserver_key_size = 4096
pki_storage_key_size = 4096
pki_subsystem_key_size = 4096
pki_transport_key_size = 4096
and pass it to ipa-server-install via --pki-config-override /root/pki_override.cfg


After that it will fail on the last remaining key that is being created as 2048 which is


/var/lib/ipa/ra-agent.key
/var/lib/ipa/ra-agent.pem


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

IPA Version: ipa-server-4.9.2-3.module+el8.4.0+10412+5ecb5b37.x86_64
Pki Version: pki-ca-10.10.5-3.module+el8.4.0+11039+635979e4.noarch


How reproducible:


Steps to Reproduce:
1.ipa-server-install fails on the below given error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ipaserver/install/cainstance.py", line 1945, in import_included_profiles
    conn.get_entry(dn)
  File "/usr/lib/python3.6/site-packages/ipapython/ipaldap.py", line 1642, in get_entry
    size_limit=size_limit, get_effective_rights=get_effective_rights,
  File "/usr/lib/python3.6/site-packages/ipapython/ipaldap.py", line 1454, in get_entries
    **kwargs)
  File "/usr/lib/python3.6/site-packages/ipapython/ipaldap.py", line 1592, in find_entries
    break
  File "/usr/lib64/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python3.6/site-packages/ipapython/ipaldap.py", line 1095, in error_handler
    raise errors.NotFound(reason=arg_desc or 'no such entry')
ipalib.errors.NotFound: no such entry

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 261, in _httplib_request
    conn = connection_factory(host, port, **connection_options)
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 203, in connection_factory
    tls_version_max=api.env.tls_version_max)
  File "/usr/lib/python3.6/site-packages/ipalib/util.py", line 385, in create_https_connection
    ctx.load_cert_chain(client_certfile, client_keyfile, passwd)
ssl.SSLError: [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:3542) <<<<<==========

During handling of the above exception, another exception occurred:



Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 261, in _httplib_request
    conn = connection_factory(host, port, **connection_options)
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 203, in connection_factory
    tls_version_max=api.env.tls_version_max)
  File "/usr/lib/python3.6/site-packages/ipalib/util.py", line 385, in create_https_connection
    ctx.load_cert_chain(client_certfile, client_keyfile, passwd)
ssl.SSLError: [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:3542) <<<===========

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/ipaserver/install/service.py", line 635, in start_creation
    run_step(full_msg, method)
  File "/usr/lib/python3.6/site-packages/ipaserver/install/service.py", line 621, in run_step
    method()
  File "/usr/lib/python3.6/site-packages/ipaserver/install/cainstance.py", line 1959, in import_included_profiles
    _create_dogtag_profile(profile_id, profile_data, overwrite=True)
  File "/usr/lib/python3.6/site-packages/ipaserver/install/cainstance.py", line 2127, in _create_dogtag_profile
    with api.Backend.ra_certprofile as profile_api:
  File "/usr/lib/python3.6/site-packages/ipaserver/plugins/dogtag.py", line 1199, in __enter__
    method='GET'
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 209, in https_request
    method=method, headers=headers)
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 271, in _httplib_request
    raise NetworkError(uri=uri, error=str(e))
ipalib.errors.NetworkError: cannot connect to 'https://idm.test.example.com:8443/ca/rest/account/login': [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:3542) <<<<=================

2021-06-15T18:09:37Z DEBUG   [error] NetworkError: cannot connect to 'https://idm.test.example.com:8443/ca/rest/account/login': [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:3542)
2021-06-15T18:09:37Z DEBUG Removing /root/.dogtag/pki-tomcat/ca
2021-06-15T18:09:37Z DEBUG   File "/usr/lib/python3.6/site-packages/ipapython/admintool.py", line 180, in execute
    return_value = self.run()
  File "/usr/lib/python3.6/site-packages/ipapython/install/cli.py", line 340, in run
    return cfgr.run()



And finally it failed at

File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 209, in https_request
    method=method, headers=headers)
  File "/usr/lib/python3.6/site-packages/ipapython/dogtag.py", line 271, in _httplib_request
    raise NetworkError(uri=uri, error=str(e))

2021-06-15T18:09:37Z DEBUG The ipa-server-install command failed, exception: NetworkError: cannot connect to 'https://idm.test.example.com:8443/ca/rest/account/login': [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:3542)
2021-06-15T18:09:37Z ERROR cannot connect to 'https://idm.test.example.com:8443/ca/rest/account/login': [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:3542)
2021-06-15T18:09:37Z ERROR The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information


2.
3.

Actual results: Ipa installation is failing with --pki-config-override option


Expected results: Ipa should  install via --pki-config-override /root/pki_override.cfg



Additional info:

Comment 1 Alexander Bokovoy 2021-06-22 18:27:51 UTC
If it breaks on re-issuance of RA cert, then it might be because of the defaults in certmonger. When there is no 'key-size' specified in the request, it uses own default values for RSA/DSA/EC keys. It uses 2048 as the default public key size unless redefined when certmonger is compiled and 512 for the minimum RSA private key size.

RA cert request in IPA during the installation does not define any additional properties and instead rely on the defaults. I guess this is what happens here -- since pki override options only apply to the CA, certmonger does not know about those and does not have any way to use them other than IPA forcing those options through the request settings. Which we don't do in this case.

At the point of a failure in the description we are trying to import CA profiles IPA maintains in its tree. We use RA cert key to perform authentication to the CA end-point and that fails to work because it is 2048 bit long and expectation is to be at least 3071-bit long due to FUTURE policy. 

A possible solution would be to extend ipalib/install/certmonger.py:request_cert() to allow adding key-size/key-type passage. We have this already in resubmit_request() but not in the request_cert().

Rob, does my analysis above match certmonger's logic?

Comment 2 Rob Crittenden 2021-06-22 18:32:55 UTC
You are correct.

Another idea I've been mulling is making the default key size in certmonger configurable instead of built in. This would be independent of IPA and doing that work is probably a good idea either way.

Comment 3 Rakesh Kumar 2021-06-29 15:00:24 UTC
Hi,


|| Another idea I've been mulling is making the default key size in certmonger configurable instead of built in. This would be independent of IPA and doing that work is probably a good idea either way.

Could you please provide as an example to set the default key size in certmonger

Comment 4 Rob Crittenden 2021-06-29 15:55:10 UTC
The certmonger default key size is currently determined at build time, so hardcoded. The only way to change it is to rebuild the package

Comment 7 Rob Crittenden 2021-07-13 17:19:16 UTC
FWIW I opened an issue upstream against certmonger to make the default RSA key size configurable, https://pagure.io/certmonger/issue/211

I think that IPA should also make it possible internally to select the key size.

Comment 24 RHEL Program Management 2023-09-18 18:38:20 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 25 RHEL Program Management 2023-09-18 18:43:20 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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