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 2048582 - Support PKCS#12 keystores in FIPS mode [rhel-8, openjdk-17]
Summary: Support PKCS#12 keystores in FIPS mode [rhel-8, openjdk-17]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: java-17-openjdk
Version: 8.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Martin Balao
QA Contact: OpenJDK QA
URL:
Whiteboard:
Depends On: 2023467
Blocks: 2123568 2123569 2130351
TreeView+ depends on / blocked
 
Reported: 2022-01-31 14:48 UTC by Martin Balao
Modified: 2022-11-08 10:14 UTC (History)
12 users (show)

Fixed In Version: java-17-openjdk-17.0.4.1.1-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2123568 2123569 (view as bug list)
Environment:
Last Closed: 2022-11-08 09:30:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rh-openjdk jdk pull 2 0 None open RH2048582: Support PKCS#12 keystores 2022-08-11 16:40:27 UTC
Red Hat Issue Tracker RHELPLAN-110420 0 None None None 2022-01-31 14:53:06 UTC
Red Hat Product Errata RHBA-2022:6691 0 None None None 2022-11-08 09:31:34 UTC

Internal Links: 2086995

Description Martin Balao 2022-01-31 14:48:33 UTC
The goal of this enhancement is to support PKCS#12 keystores in FIPS mode. In order to accomplish that, we need to extend the SunPKCS11 security provider to implement Password-Based encryption algorithms (PBE). These algorithms enable key derivation (from a human-readable password) for data encryption and authentication.

We aim to leverage on defined PKCS#11 PBE mechanisms as much as possible, instead of calling low-level crypto primitives (such as hash functions) directly. We might use low-level crypto primitives if there is no other way around. In any case, it's required that the NSS Software Token (SunPKCS11 back-end for FIPS) implements the mechanisms chosen. Depending on the case and needs, we might consider NSS Software Token custom mechanisms that are not part of the PKCS#11 standard -this type of mechanisms is used already in OpenJDK-.

The version of the PKCS#11 standard in which we will based this work is v3.0. However, we will analyze potential backward-compatibility issues and see if older NSS libraries (available in RHEL versions supported) could be affected.

To prioritize which PBE mechanisms to implement, we will focus on those required for PKCS#12 keystores that are current. As an example, we will prioritize OpenJDK-defined 'PBEWithHmacSHA256AndAES_256' and 'HmacPBESHA256' which are Keytool defaults for encryption and authentication respectively when dealing with PKCS#12 keystores. Legacy mechanisms might be implemented on a best-effort basis. The rationale for that is that legacy algorithms are discouraged, they might not be FIPS-compliant and keystore migration should be feasible at a reasonable cost.

It is worth noticing that the code to handle the PKCS#12 format is already implemented in the SunJCE security provider. This code gets cryptographic services by means of the Java Cryptographic Architecture (JCA), to which SunPKCS12 will now provide implementations. Using SunJCE for PKCS#12 handling should be fine under FIPS mode because no crypto transformations are applied there: it's ASN.1 binary-format parsing. However, this implies that we need to install the SunJCE security provider in FIPS mode with enough granularity to disable all other non-PKCS#12 services.

Even when the FIPS configuration is Red Hat downstream only, the extension of the SunPKCS11 security provider will be proposed to OpenJDK upstream.


Useful pointers:

 * PKCS #12: Personal Information Exchange Syntax v1.1 (RFC 7292)
  * https://datatracker.ietf.org/doc/html/rfc7292

 * PKCS #5: Password-Based Cryptography Specification v2.1 (RFC 8018)
  * https://datatracker.ietf.org/doc/html/rfc8018

 * PKCS #11 standard (v3.0)
  * https://docs.oasis-open.org/pkcs11/pkcs11-curr/v3.0/

Comment 16 errata-xmlrpc 2022-11-08 09:30:31 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 (java-17-openjdk 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-2022:6691


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