Bug 1055881

Summary: REST API: Search for an user in active directory by upn doesn't return any results (search by user name returns result)
Product: [Retired] oVirt Reporter: Ilia Meerovich <iliam>
Component: ovirt-engine-apiAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Ilia Meerovich <iliam>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.4CC: acathrow, eedri, gklein, iheim, juan.hernandez, obasan, omachace, oramraz, sbonazzo, yeylon
Target Milestone: ---Keywords: AutomationBlocker, TestBlocker
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: ovirt-3.4.0-rc Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-31 12:26: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: 1024889    

Description Ilia Meerovich 2014-01-21 07:12:24 UTC
such query:
https://ilia-rhevm.qa.lab.tlv.redhat.com/api/users?search=usrname%3Dvdcadmin
will return result:
<users><user href="/api/users/9b9002d1-ec33-4083-8a7b-31f6b8931648" id="9b9002d1-ec33-4083-8a7b-31f6b8931648"><name>vdcadmin</name><link href="/api/users/9b9002d1-ec33-4083-8a7b-31f6b8931648/permissions" rel="permissions"/><link href="/api/users/9b9002d1-ec33-4083-8a7b-31f6b8931648/roles" rel="roles"/><link href="/api/users/9b9002d1-ec33-4083-8a7b-31f6b8931648/tags" rel="tags"/><domain href="/api/domains/71612e6c-6162-2e74-6c76-2e7265646861" id="71612e6c-6162-2e74-6c76-2e7265646861"/><user_name>vdcadmin</user_name><groups><group><name>qa.lab.tlv.redhat.com/QA-All-Users/testGroup</name></group><group><name>qa.lab.tlv.redhat.com/frodo1-id-21324444</name></group><group><name>dc.eng.lab.tlv.redhat.com/Users/universe</name></group><group><name>qa.lab.tlv.redhat.com/Builtin/Administrators</name></group></groups></user></users>

But this query (correct one):
https://ilia-rhevm.qa.lab.tlv.redhat.com/api/users?search=usrname%3Dvdcadmin%40qa.lab.tlv.redhat.com
will return:
<users/>

Comment 3 Ondra Machacek 2014-01-23 14:06:16 UTC
The problem is that users has incorrect user_name, when user is added
via RESTAPI or via webadmin. The user_name has not @domain part.
Even in /users url even in /domains/domain_id/users url.

Only when user is added via engine-manage-domains with -addPermissions parametr
then this user has correct @domain part but only at users tab(/users url in API).

Comment 4 Itamar Heim 2014-01-26 08:11:27 UTC
Setting target release to current version for consideration and review. please
do not push non-RFE bugs to an undefined target release to make sure bugs are
reviewed for relevancy, fix, closure, etc.

Comment 5 Sandro Bonazzola 2014-02-24 08:18:38 UTC
This bug is blocking 3.4.0 final release. ETA for fixing it?

Comment 6 Juan Hernández 2014-02-25 12:40:32 UTC
The fix is waiting for review, and verified, I can't provide any ETA.

Comment 7 Sandro Bonazzola 2014-03-03 14:40:19 UTC
This BZ should be fixed in oVirt 3.4.0 RC

Comment 8 Ilia Meerovich 2014-03-04 15:19:20 UTC
verified with downstream build rhevm-3.4.0-0.3

Comment 9 Sandro Bonazzola 2014-03-31 12:26:56 UTC
this is an automated message: moving to Closed CURRENT RELEASE since oVirt 3.4.0 has been released