While debugging an crypto issue with connecting to a legacy system I found a minor error in the docker file provided with the project.
The RUN command ends with ensuring /dev/urandom is used as seen below:
RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \
(...)
&& echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security
The problem with this is that java.security lives in another location nowadays, /lib/jvm/default-java/conf/security/java.security
This creates an "dead" java.security with just the line "securerandom.source=file:/dev/urandom" that is not used by the JDK/JRE and the intended configuration is lost as the file will not be used.
On an additional note, openJDK introduces one extra security policy file in /etc/crypto-policies/back-ends/java.config that is read after the conf/security/java.security and any overriding file given by -Djava.security.properties=<URL> on command line.
This extra file is usually not present in a standard system, but it IS present in the image used to run Java, which means that any attempt to override the crypto policies "the normal way" will be overriden by the system java.config file.
There's a good writeup on the system java.config file here:
https://asamalik.fedorapeople.org/fedora-docs-antora/en_US/fedora/rawhide/release-notes/sysadmin/Security/