GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — Delete unwanted CA certificates in Dockerfile by hibohra1398 · Pull Request #55 · hypertrace/docker-java-base Conversation
Contributor
Remove specific CA certificates from the Java keystore. SummaryRemove the two Java trust anchors named in the OpenJDK eMudhra advisory from the Java 11 and Java 21 base images. keytool -delete runs in the Azul JDK stage, before jlink, so the stripped JRE ships without emsigneccrootcag3 [jdk] and comodoaaaca [jdk]. Current tags are Zulu 11.0.32.1 and 21.0.12.1, both built before the disclosure, and both still trust those roots.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsRemove specific CA certificates from the Java keystore.
vishalsinghal03
previously approved these changes
hibohra1398
requested review from
JBAhire,
aaron-steinfeld and
kotharironak
as code owners
ravisingal
reviewed
Uh oh!
There was an error while loading. Please reload this page.
ravisingal
reviewed
Uh oh!
There was an error while loading. Please reload this page.
ravisingal
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hibohra1398 we should check certificates here.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. jlink copies cacerts from java.base.jmod, so the existing pre-jlink keytool delete never reached the runtime store, and the cacerts copied from distroless java-base still had both roots. Add a temporary emudhra-clean stage that deletes emsigneccrootcag3 and comodoaaaca from /jre and /etc/ssl/certs/java, and copy the cleaned stores into the final image. Remove once upstream ships the fix. Ref: https://openjdk.org/emudhra …tificates out of which emSign ECC Root CA - G3 is distrusted …}-slim/lib/security/cacerts) and Distroless Java store (/etc/ssl/certs/java/cacerts) still has three, in both images
ravisingal
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why overwrite this one? it was already cleaned up in line 8-19.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The jlink step builds /jre/lib/security/cacerts from the copy inside java.base.jmod, not from the JDK's own cacerts, so the roots would still be trusted in the final image. That is why the emudhra-clean stage deletes them from /jre and the final stage overwrites /usr/lib/jvm/zulu-*-slim/lib/security/cacerts with the cleaned file. The same stage also cleans /etc/ssl/certs/java/cacerts from distroless and /etc/ssl/certs/ca-certificates.crt from BASE_IMAGE, and the final stage overwrites both. Because of this, the earlier keytool loop above jlink only edited the Zulu JDK's own truststore, which the final image never ships, so it is redundant and removing it.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can then remove changes in line 8-20?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes already removed
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
This was referenced
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |