Skip to content

pkcs12 password hidden from the log - #4845

Open
abastyr wants to merge 9 commits into
v3.x/stagingfrom
v3.x/bugfix/log/008
Open

pkcs12 password hidden from the log#4845
abastyr wants to merge 9 commits into
v3.x/stagingfrom
v3.x/bugfix/log/008

Conversation

@abastyr

@abastyr abastyr commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
  • Hidden the pkcs12 password from the logs (replaced by ...)
  • Made logs invisible to the Other users.
  • Fixed calling the keytool with a single parameter

Signed-off-by: Adrian Bastyr <adrian.bastyr@broadcom.com>
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

build 10757 SUCCEEDED.
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30450779380

Signed-off-by: Adrian Bastyr <adrian.bastyr@broadcom.com>
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

build 10758 SUCCEEDED.
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30451185006

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Test workflow 8861 is started.
Running install test: Convenience Pax
The zowe artifact being used by this test workflow: libs-snapshot-local/org/zowe/3.5.0-PR-4845/zowe-3.5.0-pr-4845-10757-20260729122048.pax
Running on machine: zzow09
Result: SUCCESS
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30451255423

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Test workflow 8862 is started.
Running install test: Convenience Pax
The zowe artifact being used by this test workflow: libs-snapshot-local/org/zowe/3.5.0-PR-4845/zowe-3.5.0-pr-4845-10758-20260729122449.pax
Running on machine: zzow11
Result: SUCCESS
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30451550114

@MarkAckert
MarkAckert self-requested a review July 29, 2026 21:46
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

build 10771 SUCCEEDED.
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30493612327

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

Test workflow 8869 is started.
Running install test: Convenience Pax
The zowe artifact being used by this test workflow: libs-snapshot-local/org/zowe/3.5.0-PR-4845/zowe-3.5.0-pr-4845-10771-20260729215041.pax
Running on machine: zzow11
Result: SUCCESS
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30493953450

Comment thread bin/libs/certificate.sh Outdated
maskedargs="${maskedargs}... "
printitem=1
fi
if [ "${item}" = "-storepass" ]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also mask -keypass, -destkeypass, and -srcstorepass? We call these with pkeytool during some certificate setup scenarios.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a plan

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the script with a case for multiple possible parameters

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added two more, tested the changes and they LGTM!

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

build 10784 SUCCEEDED.
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30529922167

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Test workflow 8879 is started.
Running install test: Convenience Pax
The zowe artifact being used by this test workflow: libs-snapshot-local/org/zowe/3.5.0-PR-4845/zowe-3.5.0-pr-4845-10784-20260730092200.pax
Running on machine: zzow09
Result: FAILURE
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30530448215

Signed-off-by: MarkAckert <35308966+MarkAckert@users.noreply.github.com>
@MarkAckert MarkAckert added the Build: None Used in CI label Jul 30, 2026
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

build 10791 SUCCEEDED.
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30584885648

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

Test workflow 8882 is started.
Running install test: Convenience Pax
The zowe artifact being used by this test workflow: libs-snapshot-local/org/zowe/3.5.0-PR-4845/zowe-3.5.0-pr-4845-10791-20260730215603.pax
Running on machine: zzow10
Result: SUCCESS
Link to workflow run: https://github.com/zowe/zowe-install-packaging/actions/runs/30585347897

Comment thread bin/libs/logging.sh
if [ ! -f "${ZWE_PRIVATE_LOG_FILE}" ]; then
# create and echo message if log file doesn't exist
mkdir -p "${log_dir}"
umask 0007

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did we lose -p on the mkdir here? i think its still needed, else mkdir could fail.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread bin/libs/logging.sh
if [ ! -f "${ZWE_PRIVATE_LOG_FILE}" ]; then
# create and echo message if log file doesn't exist
mkdir -p "${log_dir}"
umask 0007

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants