pkcs12 password hidden from the log - #4845
Conversation
Signed-off-by: Adrian Bastyr <adrian.bastyr@broadcom.com>
|
build 10757 SUCCEEDED. |
Signed-off-by: Adrian Bastyr <adrian.bastyr@broadcom.com>
|
build 10758 SUCCEEDED. |
|
Test workflow 8861 is started. |
|
Test workflow 8862 is started. |
|
build 10771 SUCCEEDED. |
|
Test workflow 8869 is started. |
| maskedargs="${maskedargs}... " | ||
| printitem=1 | ||
| fi | ||
| if [ "${item}" = "-storepass" ]; then |
There was a problem hiding this comment.
should we also mask -keypass, -destkeypass, and -srcstorepass? We call these with pkeytool during some certificate setup scenarios.
There was a problem hiding this comment.
I've updated the script with a case for multiple possible parameters
There was a problem hiding this comment.
I added two more, tested the changes and they LGTM!
Signed-off-by: Adrian Bastyr <adrian.bastyr@broadcom.com>
…ackaging into v3.x/bugfix/log/008
|
build 10784 SUCCEEDED. |
|
Test workflow 8879 is started. |
Signed-off-by: MarkAckert <35308966+MarkAckert@users.noreply.github.com>
|
build 10791 SUCCEEDED. |
|
Test workflow 8882 is started. |
| if [ ! -f "${ZWE_PRIVATE_LOG_FILE}" ]; then | ||
| # create and echo message if log file doesn't exist | ||
| mkdir -p "${log_dir}" | ||
| umask 0007 |
There was a problem hiding this comment.
why did we lose -p on the mkdir here? i think its still needed, else mkdir could fail.
There was a problem hiding this comment.
If mkdir fails, it means the directory probably exists, hence chmod is executed to assure the permissions are set correctly.
mkdir -p would end with rc 0 and chmod wouldn't be executed.
There was a problem hiding this comment.
I believe the -p option was intended to catch a case when one or more parent dirs do not exist, it is a valid case as log_dir could be supplied as a parameter (-l / --log-dir) to any zwe command with any path, so this would be a regression.
Couple more notes here.
umask 0007 is set and never restored, so potentially may change the behavior of further dirs and files creation in this shell session.
chmod 770 -R "${log_dir}" -R option seems to be misplaced so chmod may treat it as a directory name
…ackaging into v3.x/bugfix/log/008
| if [ ! -f "${ZWE_PRIVATE_LOG_FILE}" ]; then | ||
| # create and echo message if log file doesn't exist | ||
| mkdir -p "${log_dir}" | ||
| umask 0007 |
There was a problem hiding this comment.
I believe the -p option was intended to catch a case when one or more parent dirs do not exist, it is a valid case as log_dir could be supplied as a parameter (-l / --log-dir) to any zwe command with any path, so this would be a regression.
Couple more notes here.
umask 0007 is set and never restored, so potentially may change the behavior of further dirs and files creation in this shell session.
chmod 770 -R "${log_dir}" -R option seems to be misplaced so chmod may treat it as a directory name
pkcs12password from the logs (replaced by...)keytoolwith a single parameter