When I customize my JAVA_OPTS and CATALINA_OPTS in Tomcat setenv.sh, the contents of those variables are available in linux with a 'ps -ef' command because they are passed to tomcat on the command line.
Guilty excerpt from Tomcat 10 start script (catalina.sh)
eval exec "\"$_RUNJDB\"" "\"$CATALINA_LOGGING_CONFIG\"" $LOGGING_MANAGER "$JAVA_OPTS" "$CATALINA_OPTS" \
I have legacy applications that get secret information, such as passwords, in their java properties this way. But OH NO this exposes passwords to anyone on the machine with a ps -ef!
Is there some way to pass in a properties file to the Tomcat classloader so that the passwords can be passed in as java properties to legacy apps, but not exposed on the command line as they would be in JAVA_OPTS or CATALINA_OPTS? I see such a configuration in Tomcat 3 in the server.xml, but that is ancient.