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

[rhc] Collect information related to rhc-worker-playbook #3584

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

jcastill
Copy link
Member

Capture information from rhc worker playbooks, and obfuscate public ssh keys.

Related: RH: RHEL-27555


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@example.com?
  • Are any related Issues or existing PRs properly referenced via a Closes (Issue) or Resolved (PR) line?
  • Are all passwords or private data gathered by this PR obfuscated?

@jcastill
Copy link
Member Author

I tried to reduce the number of regexp groups from 5 but I cannot think of anyway to reduce more. Any ideas?

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-3584
  • And now you can install the packages.

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

1 similar comment
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-3584
  • And now you can install the packages.

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

# "ansible_ssh_host_key_ecdsa_public": ********,

path = "/var/log/rhc-worker-playbook/ansible/*"
regexp = r"(\s*\"ansible_ssh_host_key_)(.+)(_public\":\s*)(.+)(\,)"
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a tiny probability some SSH public key will be the last item in the JSON map, hence without trailing comma. So (\,) should be (\,|$) I guess..?

Copy link
Member Author

Choose a reason for hiding this comment

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

Very good point, I'll modify that group and test it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@TurboTurtle TurboTurtle added this to the 4.8.0 milestone Apr 2, 2024
Capture information from rhc worker playbooks, and obfuscate
public ssh keys.

Related: RH: RHEL-27555

Signed-off-by: Jose Castillo <jcastillo@redhat.com>
@TurboTurtle TurboTurtle merged commit 4b61539 into sosreport:main Jun 28, 2024
32 checks passed
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.

3 participants