me-enterprise opened a new pull request, #4234: URL: https://github.com/apache/ambari/pull/4234
``` # /usr/sbin/ambari-server setup-security -v --security-option=setup-https --api-ssl=true --api-ssl-port=8443 --import-cert-path=/certs/myserver-chain.pem --import-key-path=/certs/myserver.key --pem-password=secret Using Python /usr/bin/ambari-python-wrap Security setup options... INFO: Loading properties from /etc/ambari-server/conf/ambari.properties INFO: Loading properties from /etc/ambari-server/conf/ambari.properties Do you want to configure HTTPS [y/n] (y)? SSL port [8443] ? INFO: Loading properties from /etc/ambari-server/conf/ambari.properties Please enter password for Private Key: INFO: about to run command: openssl x509 -dates -subject -in /certs/myserver-chain.pem INFO: process_pid=1151315 INFO: Loading properties from /etc/ambari-server/conf/ambari.properties INFO: about to run command: openssl pkcs12 -export -in '/certs/myserver-chain.pem' -inkey '/certs/myserver.key' -certfile '/certs/myserver-chain.pem' -out '/tmp/ambari-https-2wqvyzfg/https.keystore.p12' -password file:'/tmp/ambari-https-2wqvyzfg/https.pass.txt' -passin file:'/tmp/ambari-https-2wqvyzfg/https.pass.txt' INFO: process_pid=1151316 ERROR: Could not import Certificate and Private Key. SSL error on exporting keystore: Error reading password from BIO Error getting passwords. Please ensure that provided Private Key password is correct and re-import Certificate. Setup of HTTPS failed. Exiting. ``` ## What changes were proposed in this pull request? 1. Keep import and export password in two separate files, so we don't need to know about the finer details of openssl password file parsing logic (openssl requires a two line format only for this special case, and fails if there is only a single line). 2. When validating the keystore, currently the (encrypted) secret key is printed on stdout, and then stdout is discarded. Instead, do not print the secret key on stdout at all. ## How was this patch tested? `ambari-setup setup-security` is confirmed to work again. ## Please review [Ambari Contributing Guide](https://cwiki.apache.org/confluence/display/AMBARI/How+to+Contribute) before opening a pull request. Please note that I have not been accepted to the Apache Jira yet, so cannot open tickets there. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
