[ 
https://issues.apache.org/jira/browse/KNOX-3566?focusedWorklogId=1054307&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1054307
 ]

ASF GitHub Bot logged work on KNOX-3566:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Nov/26 14:43
            Start Date: 12/Nov/26 14:43
    Worklog Time Spent: 10m 
      Work Description: smolnar82 opened a new pull request, #1508:
URL: https://github.com/apache/knox/pull/1508

   [KNOX-3566](https://issues.apache.org/jira/browse/KNOX-3566) - Bump BC JARs 
to 1.86
   
   ## What changes were proposed in this pull request?
   
   Bump `bcprov-jdk18on`, `bcpkix-jdk18on` and `bcutil-jdk18on` to 1.86, and 
add guards so future BouncyCastle upgrades that break Knox are caught by the 
build or CI instead of at runtime.
   
   **Build**
   - A single `bouncycastle.version` property now drives all three BC 
artifacts. `dependencyManagement` pins hide version mismatches from 
`dependencyConvergence`, so mixed BC versions could otherwise slip through and 
only fail at runtime.
   - The enforcer now bans the legacy `org.bouncycastle:*-jdk15on` and 
`*-jdk15to18` artifacts. They ship the same packages as the `jdk18on` ones and 
would put a second copy on the classpath.
   
   **Unit tests** (`gateway-util-common`)
   - New `BouncyCastleCompatibilityTest`:
     - RSA and EC certificates generated by `X509CertificateUtil`: signature, 
version, subject/issuer DN, self-signed, exact validity, SAN.
     - The PEM Knox writes can be read back by the JDK's own 
`CertificateFactory`.
     - A BCFKS keystore and a PEM written by BC 1.85 still load with the 
current BC version. The keystore's private key still signs and verifies. A 
generator under `src/test/resources/bouncycastle/` can add fixtures for later 
versions.
   
   **E2E** (`.github/workflows`)
   - `compose/check-bc-jars.sh` runs right after the image build. In the 
shipped distribution (gateway and knoxshell), every BC jar must be `jdk18on`, 
on `<bouncycastle.version>`, and present once.
   - `test_gateway_identity_cert.py` (base pass) checks the certificate the 
gateway generates for itself at startup and completes a TLS handshake that 
verifies it strictly. It adds `cryptography` to `requirements.txt`.
   - The single-EKU (no mTLS) pass now also asserts that the generated 
identity's EKU is exactly `serverAuth`.
   - On failure, a new step prints any `Error in generating certificate` lines 
from `gateway.log`. If certificate generation fails, the gateway has no TLS and 
every suite only shows "Connection refused".
   
   ## How was this patch tested?
   
   - `mvn verify` on `gateway-util-common` passes, including the new tests and 
the checkstyle/PMD/spotbugs/forbiddenapis checks.
   - The enforcer ban was confirmed to reject a `jdk15on` dependency.
   - `check-bc-jars.sh` was confirmed to reject an image built with BC 1.85, 
and synthetic layouts with a legacy jar, a duplicate or mixed version, or a 
missing `bcutil`.
   - Local E2E base pass: 154 passed, including the new identity certificate 
tests, and pylint is clean.
   - Relying on CI here for the single-EKU passes.
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 1054307)
    Time Spent: 0.5h  (was: 20m)

> Bump bc*-jdk18on* to 1.86
> -------------------------
>
>                 Key: KNOX-3566
>                 URL: https://issues.apache.org/jira/browse/KNOX-3566
>             Project: Apache Knox
>          Issue Type: Task
>          Components: Server
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 3.1.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Bump BC JARs to the most recent version.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to