Bug 1868971
Summary: | Receptor installation job doesn't properly escape data it puts into receptor.conf | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Jessica Hanley <jhanley> |
Component: | RH Cloud - Cloud Connector | Assignee: | Adam Ruzicka <aruzicka> |
Status: | CLOSED ERRATA | QA Contact: | Lukáš Hellebrandt <lhellebr> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.7.0 | CC: | aruzicka, lhellebr, pcreech |
Target Milestone: | 6.8.0 | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ansiblerole-satellite-receptor-installer-0.6.13 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-10-27 13:05:24 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jessica Hanley
2020-08-14 17:45:26 UTC
*** Bug 1868969 has been marked as a duplicate of this bug. *** Merged and released in upstream, moving to modified FailedQA with Sat 6.8 snap 14. # grep password /etc/receptor/rh_<ID>/receptor.conf password=change%me # systemctl status 'receptor@*' | grep followed Sep 16 17:14:19 <FQDN>[31952]: '%' must be followed by '%' or '(', found: '%me' => Part of the password after '%' is still shown in log. Note that: # grep username /usr/share/ansible/roles/project-receptor.satellite_receptor_installer/templates/receptor.conf.j2 username={{ satellite_user | regex_replace('%', '%%') }} The installer playbook should escape all the percent signs. How did you manage to get a single percent sign in that config file? I just edited the config file... because why not? I suppose that's what a user would do when e.g. password changed. We take the credentials from the user and render the config file. Receptor parses the config file (receptor itself, not our plugin) and if it contains something with a percent sign, it fails because it cannot parse the file. When doing so, it logs the offending value. Since we cannot control the parsing, we must solve it from the other side. We can escape the values before rendering the file and thus making sure the file can be parsed by receptor. If the users change the config by hand, then they have to respect the specifics of the config file format. After conversation with Adam, I think this BZ needs to be rewritten. The bug is that the installation job doesn't properly escape contents of the configuration file. The fact that the password is shown in the log is caused by Receptor (not Satellite) being unable to parse the input and showing the offending data - which incidentally contains password. => Changing this BZ to track the config file generation. If the user changes the config file manually and Receptor can't parse it, it's not an issue in the Satellie or the installation job. Do you agree, Adam? Yes, that is correct. Verified with Sat 6.8 snap 14. The password (and other data) is now correctly escaped (% => %%) in the receptor installation playbook, leading to a correct receptor.conf format. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.8 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4366 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.8 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4366 |