Use Case
If keytool does not exist, sensitive Password is not “redacted” in Error-Message:
Error: /Stage[main]/Myprofilemodule/Java_ks[myRootCA]/ensure: change from 'absent' to 'latest' failed:
Execution of 'keytool -importcert -noprompt -alias myrootca -file /etc/pki/tls/certs/myCA_root.pem -keystore /path/to/mykeystore -srcstorepass MyPassword -deststorepass MyPassword' returned 1:
Error: Could not execute posix command: No such file or directory - keytool
Describe the Solution You Would Like
- check, if
keytool exists, before trying to execute it
- prevent Password-Leak in other Error-Situations