Bug 1964255
| Summary: | libpcp/pmproxy: authentication is unsuccessful if the password contains special characters | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Mark Keir <mkeir> | ||||
| Component: | pcp | Assignee: | Andreas Gerstmayr <agerstmayr> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Jan Kurik <jkurik> | ||||
| Severity: | low | Docs Contact: | Apurva Bhide <abhide> | ||||
| Priority: | unspecified | ||||||
| Version: | 8.4 | CC: | agerstmayr, jkurik, nathans, yuokada | ||||
| Target Milestone: | beta | Keywords: | Bugfix, Triaged | ||||
| Target Release: | 8.6 | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | pcp-5.3.4-1.el8 | Doc Type: | No Doc Update | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2022-05-10 13:30:36 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1991763 | ||||||
| Attachments: |
|
||||||
|
Description
Mark Keir
2021-05-25 06:29:41 UTC
Hi Mark, I was trying to reproduce the issue, but everything works for me. Can you please share content of your /etc/pcp/bpftrace/bpftrace.conf file ? Created attachment 1786781 [details]
bpftrace.conf
Requested configuration file attached.
Can you check the datasource settings if only "Basic Auth" is selected in the Auth section? And please check /var/log/pcp/pmproxy/pmproxy.log for anything unusual. Also, can you try creating another user with an "easy" password, as in just letters and digits (the error you're seeing also shows up when the username/password doesn't match)? Possibly some special character gets lost. fwiw, I also couldn't reproduce this, just fishing for things which could get wrong. A failed "Save & Test" created a log entry in /var/log/pcp/pmproxy/pmproxy.log such as the following event. [Wed May 26 15:32:16] pmproxy(110882) Error: opening input terminal for read Moving on to try a user/password with less complexity. Creating a password with this command, the Datasource could be configured. mkpasswd -s 0 -l 15 Using the following also worked for a fresh value. mkpasswd -s 3 -l 15 By substituting the special characters in the starting password, I was able to determine that a special character of "=" broke the Datasource configuration for any attempted location in the string. Thanks a lot for your analysis! I'll fix this bug in RHEL 8.5. I thought it's a quick and easy fix in pmproxy or grafana-pcp, but after diving down to the root cause, I realized that the issue is in a core part of PCP (the handling of hostspecs [1]), so I moved the component to pcp. I cannot guarantee that I've the time to properly implement and test this for 8.5, so I cleared the DTM/ITM. Sorry for the hasty triaging. [1] https://github.com/performancecopilot/pcp/issues/1305 fixed upstream and will be part of the next rebase of PCP:
commit 2ff22e302de22f62cbd6cee1bf8f2aad775da866
Author: Andreas Gerstmayr <agerstmayr>
Date: Tue Sep 14 19:55:28 2021 +0200
libpcp: use urlencoding for hostspec parameter values
Resolves: #1305
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 (pcp bug fix and enhancement update), 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/RHBA-2022:1765 |