Bug 1674337

Summary: Cockpit gets unexpected internal error when unprivileged user accesses Subscriptions tab
Product: Red Hat Enterprise Linux 8 Reporter: Ganesh <gnaik>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact: Lucie Vařáková <lmanasko>
Priority: medium    
Version: 8.0CC: csnyder, jstavel, lmanasko, mpitt, redakkan, sbalasub, sudo, vferschm
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
.Unprivileged users can access the Subscriptions page If a non-administrator navigates to the *Subscriptions* page of the web console, the web console displays a generic error message `Cockpit had an unexpected internal error`. To work around this problem, sign in to the web console with a privileged user and make sure to check the *Reuse my password for privileged tasks* checkbox.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-15 15:32:48 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: 1682763    
Bug Blocks:    
Attachments:
Description Flags
Snapshot of the incident
none
Attachment1 none

Description Ganesh 2019-02-11 02:28:23 UTC
Created attachment 1528853 [details]
Snapshot of the incident

Description of the problem:

Login to Cockpit with an unprivileged user and click on the 'Subscriptions' tab get 'Ooops' in red on the upper right corner of Cockpit. Clicking on that message get the explanation:
"Cockpit had an unexpected internal error. 

You can try restarting Cockpit by pressing refresh in your browser. The javascript console contains details about this error (Ctrl-Shift-J in most browsers)."

In the java console you get:
"index.js:6786 Uncaught TypeError: E.GetSyspurpose is not a function
    at index.js:6786
    at Function.<anonymous> (index.js:6604)
    at s (cockpit.js:958)
    at cockpit.js:970
    at n (cockpit.js:876)"

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Login with the non-root unprivileged user to Cockpit.
2. Click on tab "Subscriptions"

Actual results:
- Shows, not the specific message.

Expected results:
- Specific and appropriate messages should pop-up if non-root users are not allowed to click on Subscription and check status.

Additional info:

Comment 1 Martin Pitt 2019-02-11 07:52:03 UTC
Confirming. This lives in subscription-manager-cockpit, reassigning.

Comment 12 Martin Pitt 2019-07-05 10:31:01 UTC
@Vendula: That seems okay, thanks! But hopefully this actually got fixed by now in subscription-manager? :-)

Comment 21 Rehana 2020-09-09 10:56:39 UTC
Created attachment 1714264 [details]
Attachment1 [details]

Comment 25 Jan Stavel 2022-10-19 16:55:55 UTC
a playbook to simulate this case