Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPLAT-1429: Adds flag to omit credentials in logging #8287

Merged
merged 4 commits into from May 3, 2024

Conversation

faermanj
Copy link
Contributor

@faermanj faermanj commented Apr 18, 2024

Fixes SPLAT-1429 by adding a flag that allow users to omit password from logging.

@@ -288,6 +291,9 @@ func newCreateCmd(ctx context.Context) *cobra.Command {
for _, t := range targets {
t.command.Args = cobra.ExactArgs(0)
t.command.Run = runTargetCmd(ctx, t.assets...)
if "Cluster" == t.name {
cmd.PersistentFlags().BoolVar(&skipPasswordPrintFlag, "skip-password-print", false, "Do not print the generated user password.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cmd.PersistentFlags().BoolVar(&skipPasswordPrintFlag, "skip-password-print", false, "Do not print the generated user password.")
cmd.PersistentFlags().BoolVar(&skipPasswordPrintFlag, "skip-password-print", true, "Do not print the generated user password.")

Don't we want to default this to true to skip the password printing by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@barbacbd yoda condition fixed, thanks.
But I'd say it's safer to leave false as the default, at least for one release, as user scripts/hacks may depend on that.

Copy link
Contributor

Choose a reason for hiding this comment

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

I am fine with that, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

4.16 where this will land is a LTS release. So, it is better to have the default to true to skip printing the password sooner rather than a later release.
Also, can we call the the flag printUserPassword which is set to false by default? User scripts can be updated to specifically turn on password printing.

Copy link
Contributor

@barbacbd barbacbd left a comment

Choose a reason for hiding this comment

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

/lgtm

@@ -288,6 +291,9 @@ func newCreateCmd(ctx context.Context) *cobra.Command {
for _, t := range targets {
t.command.Args = cobra.ExactArgs(0)
t.command.Run = runTargetCmd(ctx, t.assets...)
if "Cluster" == t.name {
cmd.PersistentFlags().BoolVar(&skipPasswordPrintFlag, "skip-password-print", false, "Do not print the generated user password.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I am fine with that, thanks.

@barbacbd
Copy link
Contributor

/retitle no-jira: Adds flag to omit credentials in logging

@openshift-ci openshift-ci bot changed the title Adds flag to omit credentials in logging no-jira: Adds flag to omit credentials in logging Apr 22, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 22, 2024
@openshift-ci-robot
Copy link
Contributor

@faermanj: This pull request explicitly references no jira issue.

In response to this:

Fixes SPLAT-1429 by adding a flag that allow users to omit password from logging.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@barbacbd
Copy link
Contributor

/retest-required

@barbacbd
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 22, 2024
@zaneb
Copy link
Member

zaneb commented Apr 25, 2024

If this "Fixes SPLAT-1429" then how can it be no-jira?

cmd/openshift-install/create.go Outdated Show resolved Hide resolved
cmd/openshift-install/create.go Outdated Show resolved Hide resolved
@r4f4
Copy link
Contributor

r4f4 commented Apr 30, 2024

/retitle SPLAT-1429: Adds flag to omit credentials in logging

@openshift-ci openshift-ci bot changed the title no-jira: Adds flag to omit credentials in logging SPLAT-1429: Adds flag to omit credentials in logging Apr 30, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 30, 2024

@faermanj: This pull request references SPLAT-1429 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.16.0" version, but no target version was set.

In response to this:

Fixes SPLAT-1429 by adding a flag that allow users to omit password from logging.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@r4f4
Copy link
Contributor

r4f4 commented Apr 30, 2024

/hold
for the fixes.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 30, 2024
Co-authored-by: Rafael F. <r4f4rfs@gmail.com>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 2, 2024
Copy link
Contributor

@r4f4 r4f4 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 2, 2024
@r4f4
Copy link
Contributor

r4f4 commented May 2, 2024

/label tide/merge-method-squash
/hold cancel

@openshift-ci openshift-ci bot added tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels May 2, 2024
Copy link
Contributor

openshift-ci bot commented May 2, 2024

@faermanj: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-e2e-aws-ovn-upgrade d3788e2 link false /test okd-e2e-aws-ovn-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@patrickdillon
Copy link
Contributor

/approve

Copy link
Contributor

openshift-ci bot commented May 3, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 3, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 51c6a5b into openshift:master May 3, 2024
19 of 20 checks passed
r4f4 added a commit to r4f4/installer that referenced this pull request May 6, 2024
* Adds flag to omit credentials in logging

* Update cmd/openshift-install/create.go

Co-authored-by: Rafael F. <r4f4rfs@gmail.com>

* Update cmd/openshift-install/create.go

Co-authored-by: Rafael F. <r4f4rfs@gmail.com>

---------

Co-authored-by: Rafael F. <r4f4rfs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants