Bug 1859569
| Summary: | On a registered system if user tries to list role/usage/addons using invalid credentials , no error message is thrown | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Shwetha Kallesh <skallesh> | |
| Component: | subscription-manager | Assignee: | mhorky | |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> | |
| Severity: | low | Docs Contact: | ||
| Priority: | low | |||
| Version: | 8.3 | CC: | arpandey, jsefler, mhorky, redakkan, zpetrace | |
| Target Milestone: | rc | Keywords: | EasyFix, Triaged | |
| Target Release: | 8.6 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | subscription-manager-1.28.24-1.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 2022788 (view as bug list) | Environment: | ||
| Last Closed: | 2022-05-10 15:22:56 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: | 2022788 | |||
Pre-verification version: [root@kvm-06-guest07 rhsm]# subscription-manager version server type: Red Hat Subscription Management subscription management server: 3.2.21-1 subscription management rules: 5.41 subscription-manager: 1.28.22-1.git.0.5118d85.el8 Registering a system: [root@kvm-06-guest07 rhsm]# subscription-manager register Registering to: subscription.rhsm.stage.redhat.com:443/subscription Username: zpetracePH03 Password: The system has been registered with ID: 8e41e2e5-1890-47e4-bb97-1471c61e856c The registered system name is: kvm-06-guest07.hv2.lab.eng.bos.redhat.com Pre-verification 1: [root@kvm-06-guest07 rhsm]# subscription-manager role --list --username jdkfsl --password ikjko Error: --username, --password, --token and --org can be used only on unregistered systems Pre-verification 2: [root@kvm-06-guest07 rhsm]# subscription-manager usage --list --username jdkfsl --password ikjko Error: --username, --password, --token and --org can be used only on unregistered systems Pre-verification 3: [root@kvm-06-guest07 rhsm]# subscription-manager addons --list --username jdkfsl --password ikjko Error: --username, --password, --token and --org can be used only on unregistered systems Beaker Test information:
HOSTNAME=hpe-dl380pgen8-02-vm-9.hpe2.lab.eng.bos.redhat.com
JOBID=6040357
RECIPEID=11050021
RESULT_SERVER=
DISTRO=RHEL-8.6.0-20211128.3
ARCHITECTURE=x86_64
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]# rpm -qa subscription-manager
subscription-manager-1.28.24-1.el8.x86_64
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]# rpm -qa --changelog subscription-manager | grep 1859569
- [1.28] 1859569: Abort on invalid username/token argument in syspurpose
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager register --username rhel9GA --password ***** --serverurl subscription.rhsm.stage.redhat.com
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 7a42bcf0-fa68-42f6-ae21-bf7bd5f5b4ee
The registered system name is: hpe-dl380pgen8-02-vm-9.hpe2.lab.eng.bos.redhat.com
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager role --list --username sdsfdsf --password fdsfds
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager usage --list --username sdsfdsf --password fdsfds
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager service-level --list --username sdsfdsf --password fdsfds
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager addons --list --username sdsfdsf --password fdsfds
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager role --list --org 13343512
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager service-level --list --org 13343512
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager addons --list --org 13343512
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]# subscription-manager usage --list --org 13343512
Error: --username, --password, --token and --org can be used only on unregistered systems << PASS
[root@hpe-dl380pgen8-02-vm-9 ~]#
[root@hpe-dl380pgen8-02-vm-9 ~]# man subscription-manager | grep "role options" -A 20
role options
The role subcommand displays the current configured role preference for products installed on the system. For example, if the role preference is "Red Hat Enter‐
prise Linux Server", then a subscription with a "Red Hat Enterprise Linux Server" role is selected when auto-attaching subscriptions to the system.
--show Shows the system's current role preference. If a role is not set, then there is a message saying it is not set.
--list Lists the available role system purpose values.
--username=USERNAME
Gives the username for the account to use to connect to the organization account [Usable with --list on unregistered systems].
--password=PASSWORD
Gives the user account password [Usable with --list on unregistered systems].
--token=TOKEN
Token to use when authorizing against the server [Usable with --list on unregistered systems].
--org=ORG
Identifies the organization for which the role applies [Usable with --list on unregistered systems].
--set=ROLE
[root@hpe-dl380pgen8-02-vm-9 ~]#
Verified : PASSED
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 (subscription-manager 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:2047 |
Description of problem: On a registered system if user tries to list role/usage/addons using invalid credentials , no error message is thrown Version-Release number of selected component (if applicable): [root@kvm-07-guest02 ~]# subscription-manager version subscription-manager: 1.27.10-1.git.2.ffd7a7e.el8 How reproducible: Steps to Reproduce: [root@kvm-07-guest02 ~]# subscription-manager role --list --username sdsfdsf --password fdsfds +-------------------------------------------+ Available role +-------------------------------------------+ - Red Hat Enterprise Linux Workstation - Red Hat Enterprise Linux Server - Red Hat Enterprise Linux Compute Node [root@kvm-07-guest02 ~]# subscription-manager role --list --org dsadsa +-------------------------------------------+ Available role +-------------------------------------------+ - Red Hat Enterprise Linux Workstation - Red Hat Enterprise Linux Server - Red Hat Enterprise Linux Compute Node Actual results: Available roles, usage and addons are listed even with invalid credentials Expected results: "Invalid user credentials" message when user provides invalid username/password and "Organization with id dsadsa could not be found." message when user provides invalid role Additional info: