Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New docker version and correction of password #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Cybergern
Copy link

I had trouble getting this running with the old docker version since the broker would crash due to some formatting problems with the keystore. After updating to the latest base images this problem disappeared. I also noticed that control center would not start due to incorrect password. I corrected the java options to have the correct password and it started just fine.

Thank you for making this project, it has been very useful for me so far for testing purposes.

@jforge
Copy link

jforge commented Oct 17, 2023

Thanks for the PR, I stumbled upon this as I saw an "Invalid keystore format" error message.
I simply follows your change in my fork, and it worked.

I think, the root cause can be found here: https://support.oracle.com/knowledge/More%20Applications%20and%20Technologies/2847060_1.html

The Java runtime in the 5.3.1 image is "OpenJDK Runtime Environment (Zulu 8.38.0.13-CA-linux64) (build 1.8.0_212-b04)" and I generated my keystores with Java 20, so that the problem seems to correlate with the Oracle support information:

"An "Invalid keystore format" error occurs when a keystore is read by a JDK version lower than a keystore generated with JDK 8u301 and higher. [...]"

The 6.2.4 images have a much newer runtime: OpenJDK Runtime Environment Zulu11.54+25-CA (build 11.0.14.1+1-LTS)

Further Oracle notes:

"In Java 8u301 release, a new fix went in to upgrade the default PKCS12 encryption algorithm, as noted in Java 8u301 release notes at https://www.oracle.com/java/technologies/javase/8all-relnotes.html#R180_301

➜ Upgraded the Default PKCS12 Encryption Algorithms
The default encryption algorithms used in a PKCS #12 keystore have been updated. The new algorithms are based on AES-256 and SHA-256 and are stronger than the old algorithms that were based on RC2, DESede, and SHA-1. See the security properties starting with keystore.pkcs12 in the java.security file for detailed information.

For compatibility, a new system property named keystore.pkcs12.legacy is defined that will revert the algorithms to use the older, weaker algorithms. There is no value defined for this property.
"

@Cybergern
Copy link
Author

Glad someone got some use out of it!

@jforge
Copy link

jforge commented Oct 19, 2023

I've contributed some refactoring in another PR: #2
This should work from scratch (tested on macos and ubuntu).
I've also switched to docker compose v2 plugin rather than the docker-compose v1 tool; this might have some effect, if you use the ./auto scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants