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
SPLAT-1429: Adds flag to omit credentials in logging #8287
Conversation
cmd/openshift-install/create.go
Outdated
@@ -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.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
f9726e6
to
8a51b42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
cmd/openshift-install/create.go
Outdated
@@ -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.") |
There was a problem hiding this comment.
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.
/retitle no-jira: Adds flag to omit credentials in logging |
@faermanj: This pull request explicitly references no jira issue. In response to this:
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. |
/retest-required |
/lgtm |
If this "Fixes SPLAT-1429" then how can it be |
/retitle SPLAT-1429: Adds flag to omit credentials in logging |
@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:
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. |
/hold |
Co-authored-by: Rafael F. <r4f4rfs@gmail.com>
Co-authored-by: Rafael F. <r4f4rfs@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/label tide/merge-method-squash |
@faermanj: The following test failed, say
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. |
/approve |
[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 |
51c6a5b
into
openshift:master
* 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>
Fixes SPLAT-1429 by adding a flag that allow users to omit password from logging.