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 1818881 - Add security property (i.e. java.security file) version of jdk.security.allowNonCaAnchor
Summary: Add security property (i.e. java.security file) version of jdk.security.allow...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: java-1.8.0-openjdk
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Martin Balao
QA Contact: OpenJDK QA
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-30 15:31 UTC by Chris Dolphy
Modified: 2023-09-07 22:36 UTC (History)
2 users (show)

Fixed In Version: java-1.8.0-openjdk-1.8.0.272.b10-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:31:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
openjdk bug system JDK-8241888 0 None None None 2020-03-30 21:07:32 UTC

Description Chris Dolphy 2020-03-30 15:31:31 UTC
Description of problem:
In OpenJDK 8u241/242, JSSE implemented new checks on Trust Anchor Certificates.  Root CA certificates now must have BasicConstraints CA extensions.  A system property jdk.security.allowNonCaAnchor was added to restore old behavior.

However, customer would like to be set as a security property instead of a system property.

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

How reproducible:
Predictable

Steps to Reproduce:
1. Connect to server using Java client.  Server should have a Root certificate signing the server certificate.  Here's commands to create it:

keytool -genkeypair -keystore ca.jks -alias ca -dname cn=ca,dc=redhat,dc=com -storepass secret -keypass secret -validity 365 -keysize 2048 -keyalg RSA
keytool -exportcert -alias ca -keystore ca.jks -storepass secret -file ca.cer
keytool -genkeypair  -keystore jboss.keystore.jks -storepass secret -keypass secret -dname "cn=jboss.usersys.redhat.com, ou=GSS,dc=redhat,dc=com" -alias jboss -keysize 2048 -keyalg RSA
keytool -certreq -keystore jboss.keystore.jks -storepass secret -alias jboss -file jboss.csr
keytool -gencert -infile jboss.csr -outfile jboss.cer -keystore ca.jks -alias ca -storepass secret -keypass secret -validity 365
keytool -importcert -keystore jboss.keystore.jks -storepass secret -trustcacerts -alias ca -file ca.cer -noprompt
keytool -importcert -keystore jboss.keystore.jks -storepass secret -alias jboss -file jboss.cer -noprompt

2. Client should get error:
sun.security.validator.ValidatorException: TrustAnchor with subject "CN=..." is not a CA certificate

3. Set the new security property and no error should be produced.


Actual results:
No errors.

Expected results:
sun.security.validator.ValidatorException: TrustAnchor with subject "CN=..." is not a CA certificate

Comment 2 Martin Balao 2020-04-08 15:17:38 UTC
Status update:

 * Change pushed to JDK baseline (will be available in JDK-15)
  * http://hg.openjdk.java.net/jdk/jdk/rev/c1ea616a7965

JDK-11 and JDK-8 backports still pending.

Comment 4 Andrew John Hughes 2020-10-26 15:37:21 UTC
Only just seen this bug. The fix is in the latest 8u272 release, packages of which are on their way out.

Comment 5 jiri vanek 2020-10-26 15:40:10 UTC
Is explicit regression test for this requested?

Comment 6 Andrew John Hughes 2020-10-26 15:43:31 UTC
It'd be good to have if easily feasible. The change does get flagged as a modification to java.security so it's definitely in the latest builds.

Comment 7 Andrew John Hughes 2020-10-28 15:50:22 UTC
Looks like this will have to be listed as a RHEL 8.4 bug at this stage, but this issue is fixed across all the new OpenJDK 8 packages that just went out.

Comment 16 errata-xmlrpc 2021-05-18 15:31:11 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-1.8.0-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-2021:1795


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