Bug 1486224 - SUI fails to change group
Summary: SUI fails to change group
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - Service
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: Allen W
QA Contact: Matt Pusateri
URL:
Whiteboard: auth:miqldap:ad
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-29 09:11 UTC by ncatling
Modified: 2018-03-01 13:16 UTC (History)
11 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-01 13:16:22 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Error seen when setting group in sui then trying to log into classic (386.68 KB, image/png)
2017-08-29 18:05 UTC, Allen W
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 0 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 18:37:12 UTC

Description ncatling 2017-08-29 09:11:53 UTC
Description of problem:
Attempting to change LDAP/AD group in Self-service UI fails with the this production log error:

ERROR -- : An unauthorized connection attempt was rejected
ERROR -- : Failed to upgrade to WebSocket (REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: WebSocket)

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

How reproducible:


Steps to Reproduce:
1. Log in to SUI
2. Change group (via top right drop down)
3. 

Actual results:
Change group fails (with production log error)

Expected results:
Change group successful.

Additional info:

Comment 2 Allen W 2017-08-29 13:16:07 UTC
Changing groups doesn't happen instantly. If ya could, attempt a group change, then wait some arbitrary time, 3 minutes, and check the group again.  Screen shots, or an ip of a machine would be helpful in trouble shooting this issue.

Comment 3 ncatling 2017-08-29 13:26:53 UTC
Every time I attempt a group change, the page re-renders fully but the group remains unchanged and the error above appears in the production log.

The environment concerned, isn't accessible unfortunately.

Comment 4 Allen W 2017-08-29 13:29:18 UTC
Aww BUMMER, ok well websocket error is unrelated, the other might indicate the group you are trying to switch doesn't have roles with product features that support using the SUI.

Comment 5 ncatling 2017-08-29 14:32:08 UTC
Ok, I've done some more testing. It looks like the group is changing but the 'Change Group' menu doesn't update correctly to reflect the currently selected group. As such, it isn't possible to change back without logging out and back in again.

Comment 8 Allen W 2017-08-29 15:36:25 UTC
Going to make a gif of this, but changing the group is working correctly, if you're not seeing the menu update, not waiting enough time.  Stand by for that gif thing...

Comment 9 ncatling 2017-08-29 15:48:09 UTC
Ok, I've waited 10 minutes and still no change.

Comment 10 Chris Kacerguis 2017-08-29 16:18:39 UTC
A Pivotal Tracker story has been created for this Bug: https://www.pivotaltracker.com/story/show/150641732

Comment 13 Allen W 2017-08-29 18:04:22 UTC
Ok so we're gonna have to tag in some friends on the server team to help with this one.   At the core, sui sets the `x-miq-group` header to the newly selected group and then reloads the dashboard, which refreshes the user.  Not sure what the server is doing, but its something along the lines of looking for that updated header and then changing the user current group.  It works sometimes, but other times not so much and other times, after switching the user current group from the SUI and logging into classic yields "The ManageIQ Server is still starting. If this message persists, please contact your ManageIQ administrator." with no console or network output to indicate what might be up.

Comment 14 Allen W 2017-08-29 18:05:17 UTC
Created attachment 1319707 [details]
Error seen when setting group in sui then trying to log into classic

Comment 15 Chris Kacerguis 2017-09-05 13:32:19 UTC
Allen added a comment in Pivotal Tracker:   
   
when updating group via api, the follow error is thrown :sad_face: 

continuing to work this issue from the approach of "hey lets do a little bit more than update the session headers and wait for miq server to notice"

Comment 16 Allen W 2017-09-05 16:01:38 UTC
Need support figuring out how to make the api happy:

url: POST http://localhost:3001/api/users/10000000000001
body: {"action": "edit", "resource": {"group": {"name": "10000000000002"}}}

seeing:
{
  "error": {
    "kind": "bad_request",
    "message": "Cannot update attributes other than password, email, settings for the authenticated user",
    "klass": "Api::BadRequestError"
  }
}

User is making POST to modify self, is an admin user, though I would imagine being an admin shouldn't be required to change current group.

Comment 17 Allen W 2017-09-25 21:16:57 UTC
https://github.com/ManageIQ/manageiq-api/issues/74 is needed before we put this thing to bed...

POST http://localhost:3000/api/users/:id
with a body of {"action": "edit", "group": { "href": "http://localhost:3001/api/groups/:desiredGroupId" }}

Now works as expected, yields instant group switching.

Comment 18 Allen W 2017-09-28 19:22:28 UTC
https://github.com/ManageIQ/manageiq-ui-service/pull/1013

annnnnnnd THE END IS NEAR

Comment 19 Matt Pusateri 2017-10-11 19:54:43 UTC
I need a list of roles that have SSUI perms, initial testing fails and without a list of valid roles, I'm blocked.

Comment 21 Matt Pusateri 2017-12-06 20:33:53 UTC
Verified on 5.9.0.11 Ext Auth FreeIPA/AD/OpenLDAP

Comment 24 errata-xmlrpc 2018-03-01 13:16:22 UTC
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, 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-2018:0380


Note You need to log in before you can comment on or make changes to this bug.