ISSUES:
For TLS connectivity, it is slow in containerized environment that might be blocked on random number generation.
eg: in FIPS env, you must enable TLS for all JDBC connectivity, the JDBC driver may take quite a long time in establishing the JDBC connection to the DB server.
CAUSE:
Refer to this doc on how to use securerandom (https://tersesystems.com/blog/2015/12/17/the-right-way-to-use-securerandom/) It explains in detail why using /dev/random is horribly on the container-based solution, and the implementation of NativePRNGNonBlocking will rely on /dev/urandom, which is non-blocking.
SHA1PRNG (Initial seeding is currently done via a combination of system attributes and the java.security entropy gathering device) NativePRNG (nextBytes() uses /dev/urandom, generateSeed() uses /dev/random) NativePRNGBlocking (nextBytes() and generateSeed() use /dev/random) NativePRNGNonBlocking (nextBytes() and generateSeed() use /dev/urandom)
SOLUTION:
adding securerandom.strongAlgorithms=NativePRNGNonBlocking:SUN,DRBG:SUN
to the fips.security file, which would override the default security file java. security.
https://tersesystems.com/blog/2015/12/17/the-right-way-to-use-securerandom/
No comments:
Post a Comment