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

[ovirt] answer files: Filter out all password keys #2947

Merged

Conversation

didib
Copy link
Contributor

@didib didib commented May 26, 2022

Instead of hard-coding specific keys and having to maintain them over
time, replace the values of all keys that have 'password' in their name.
I think this covers all our current and hopefully future keys. It might
add "false positives" - keys that are not passwords but have 'password'
in their name - and I think that's a risk worth taking.

A partial list of keys added since the replaced code was written:

  • grafana-related stuff
  • keycloak-related stuff
  • otopi-style answer files

Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines

  • Is the commit message split over multiple lines and hard-wrapped at 72 characters?
  • Is the subject and message clear and concise?
  • Does the subject start with [plugin_name] if submitting a plugin patch or a [section_name] if part of the core sosreport code?
  • Does the commit contain a Signed-off-by: First Lastname [email protected]?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?

@didib didib force-pushed the filter-all-password-keys-in-answer-files branch 2 times, most recently from f9b8ae7 to 42abb1d Compare May 26, 2022 13:49
@packit-as-a-service
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/sosreport-sos-2947
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@didib
Copy link
Contributor Author

didib commented May 26, 2022

@sandrobonazzola can you please review? Thanks.

Copy link
Contributor

@sandrobonazzola sandrobonazzola left a comment

Choose a reason for hiding this comment

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

LGTM

@didib
Copy link
Contributor Author

didib commented May 26, 2022

Sorry, this won't work - we have passwords which do not have 'password' in their key. Will fix later.

@didib didib force-pushed the filter-all-password-keys-in-answer-files branch from 42abb1d to c445c39 Compare May 30, 2022 09:59
@lgtm-com
Copy link

lgtm-com bot commented May 30, 2022

This pull request introduces 1 alert when merging c445c39 into fe81417 - view on LGTM.com

new alerts:

  • 1 for Syntax error

@didib didib force-pushed the filter-all-password-keys-in-answer-files branch from c445c39 to 0b60273 Compare May 30, 2022 12:34
Instead of hard-coding specific keys and having to maintain them over
time, replace the values of all keys that have 'password' in their name.
I think this covers all our current and hopefully future keys. It might
add "false positives" - keys that are not passwords but have 'password'
in their name - and I think that's a risk worth taking.

Sadly, the engine admin password prompt's name is
'OVESETUP_CONFIG_ADMIN_SETUP', which does not include 'password', so has
to be listed specifically.

A partial list of keys added since the replaced code was written:
- grafana-related stuff
- keycloak-related stuff
- otopi-style answer files

Signed-off-by: Yedidyah Bar David <[email protected]>
Change-Id: I416c6e4078e7c3638493eb271d08d73a0c22b5ba
@didib didib force-pushed the filter-all-password-keys-in-answer-files branch from 0b60273 to 2701067 Compare May 30, 2022 12:53
@didib
Copy link
Contributor Author

didib commented May 30, 2022

OK, this does work. Please review/merge. Thanks!

Copy link
Contributor

@sandrobonazzola sandrobonazzola left a comment

Choose a reason for hiding this comment

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

LGTM

@TurboTurtle TurboTurtle merged commit 5fd872c into sosreport:main Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants