Bug 1382764

Summary: groups description is not automatically set in web ui, for the retrieved ldap group with 'descriptions' set to base64 decoded.
Product: Red Hat CloudForms Management Engine Reporter: amogh <amavinag>
Component: UI - OPSAssignee: Aparna Karve <akarve>
Status: CLOSED CURRENTRELEASE QA Contact: Matt Pusateri <mpusater>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.7.0CC: amavinag, cpelland, dajohnso, hkataria, jhardy, mpovolny, obarenbo
Target Milestone: GAKeywords: TestOnly
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: auth:miqldap:openldap:ui
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1397152 (view as bug list) Environment:
Last Closed: 2017-06-12 16:47:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1397152    
Attachments:
Description Flags
group_description2
none
group_description1
none
ldap_group_retrieve
none
BZ Validation screenshot none

Description amogh 2016-10-07 16:07:34 UTC
Created attachment 1208187 [details]
group_description2

Description of problem:
groups description is not automatically set in web ui, for the retrieved ldap group with 'descriptions' set to base64 decoded.

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

How reproducible:
always

Steps to Reproduce:
1. create the group in ldap server with description set to set to base64 decoded.
example. SR-APP-EPM-Membre-équipe, as defined in https://bugzilla.redhat.com/show_bug.cgi?id=1367600
2. assign user to the group created in step 1.
3. configure ldap settings in cfme webui, configuration->authentication
4. try to retrieve the ldap group in "add group" page.
5. observe that group is retrieved correctly, but when we select the group. the groups description is not set automatically in the "description" field.
6. try to select the other retrieved groups and observe that groups description is set automatically.

Actual results:
groups description is not set automatically in web ui, for the retrieved ldap group with 'descriptions' set to base64 decoded.

Expected results:
group's description needs to be set automatically when group is selected.

Additional info:
refer the screenshot: group_description1, group_description2

Comment 2 amogh 2016-10-07 16:08:25 UTC
Created attachment 1208188 [details]
group_description1

Comment 4 Martin Povolny 2016-11-18 15:34:13 UTC
Amogh, could you, please attach an LDIF file with the problematic data?

I'll try to recreate the issue with what I see in the BZ you referenced meanwhile.

Also to be sure I understand correct:

The problem is that you have a group that has the description encoded in base64 and it's not showing correctly in ManageIQ, right? It's showing encoded, not decoded?

Thx!

Comment 5 amogh 2016-11-18 16:35:37 UTC
Martin Povolny,
I think the conversion is happening correctly (check the attached screenshot: ldap_group_retrieve.png), but the description for the group needs to be set automatically when the retrieved group is selected. 

Attached: 
ldap-group.ldif
ldap_group_retrieve.png

Additional info:
We have new issue(https://bugzilla.redhat.com/show_bug.cgi?id=1389359) with group description in recent builds.

but, I observed the current issue with base64 groupnames even when the https://bugzilla.redhat.com/show_bug.cgi?id=1389359 was not introduced.

check the screenshots:
group_description1 & group_description2

Comment 6 amogh 2016-11-18 16:37:13 UTC
Created attachment 1221909 [details]
ldap_group_retrieve

Comment 10 CFME Bot 2016-11-21 17:07:25 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ce7f2a8bb6bb51640175c43ac813126844db1d0f

commit ce7f2a8bb6bb51640175c43ac813126844db1d0f
Author:     Aparna Karve <akarve>
AuthorDate: Fri Nov 18 12:22:34 2016 -0800
Commit:     Aparna Karve <akarve>
CommitDate: Mon Nov 21 07:46:19 2016 -0800

    The URL params should undergo `encodeURLComponent`
    
    to ensure proper URL encoding
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1382764

 app/assets/javascripts/miq_application.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 12 Matt Pusateri 2017-03-23 20:51:38 UTC
Validated that group description is now properly set, see screenshot. And user can login 5.8.0.7

Comment 13 Matt Pusateri 2017-03-23 20:52:48 UTC
Created attachment 1265900 [details]
BZ Validation screenshot

Group description is now properly set.