Bug 1147900 - inconsistency in user_name element at /users and /domains/id/users url
Summary: inconsistency in user_name element at /users and /domains/id/users url
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.0
Assignee: Ondra Machacek
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks: oVirt-AAA-rewrite
TreeView+ depends on / blocked
 
Reported: 2014-09-30 09:20 UTC by Ondra Machacek
Modified: 2016-09-27 11:27 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-27 11:27:45 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 1147900 0 None None None Never

Description Ondra Machacek 2014-09-30 09:20:51 UTC
Description of problem:


Version-Release number of selected component (if applicable):
rhevm-restapi-3.5.0-0.13.beta.el6ev.noarch

How reproducible:
always

Actual results:
At /domains/id/users url user_name element is:
<user_name>user3@ldap-authz-ad_ad-w2k12r2</user_name>

At /users url user_name element is:
<user_name>AD-W2K12R2\user3@ldap-authz-ad_ad-w2k12r2</user_name>


Expected results:
Both should be same.

Comment 1 Yair Zaslavsky 2014-10-20 13:24:46 UTC
Do you see the differentiation in names after upgrade from 3.4.x to 3.5, or is it on clean env?
On cleanenv, with the ldap-authz-ad1 it works well, unfortunately, there is some issue with the profile you tested with (I wonder if some setup issue) so I'll need to check it out, but for the meanwhile answering my question can help

thanks!

Comment 2 Ondra Machacek 2014-10-20 18:23:43 UTC
I tested with clean env.

now(vt6) it's:

<user_name>user1FirstName user1LastName@ldap-authz-test_tls</user_name>

vs

<user_name>user1.lab.eng.brq.redhat.com@ldap-authz-test_tls</user_name>

Comment 3 Alon Bar-Lev 2014-11-21 16:20:49 UTC
(In reply to Ondra Machacek from comment #0)
> Description of problem:
> 
> 
> Version-Release number of selected component (if applicable):
> rhevm-restapi-3.5.0-0.13.beta.el6ev.noarch
> 
> How reproducible:
> always
> 
> Actual results:
> At /domains/id/users url user_name element is:
> <user_name>user3@ldap-authz-ad_ad-w2k12r2</user_name>
> 
> At /users url user_name element is:
> <user_name>AD-W2K12R2\user3@ldap-authz-ad_ad-w2k12r2</user_name>
> 
> 
> Expected results:
> Both should be same.

This is correct behavior.

Due to backward compatibility the user name of user at /users should be something that can be used in restapi to perform login for the legacy providers. This is why it contains the principal name and not the user name.

The current behavior is what we expect.

Comment 4 Oved Ourfali 2014-11-21 16:28:51 UTC
Alon, based on your comment, should this one be closed as notabug/wontfix?

Comment 5 Alon Bar-Lev 2014-11-21 17:12:05 UTC
(In reply to Oved Ourfali from comment #4)
> Alon, based on your comment, should this one be closed as notabug/wontfix?

yes, unless anyone think otherwise.

Comment 6 Yair Zaslavsky 2014-11-22 22:11:29 UTC
(In reply to Alon Bar-Lev from comment #5)
> (In reply to Oved Ourfali from comment #4)
> > Alon, based on your comment, should this one be closed as notabug/wontfix?
> 
> yes, unless anyone think otherwise.

Hmm, I had additional thought about it - are you ok with Ondra's comment that it happens on clean envvironment as well, not just upgrade from 3.4?

Comment 7 Alon Bar-Lev 2014-11-22 22:19:33 UTC
(In reply to Yair Zaslavsky from comment #6)
> (In reply to Alon Bar-Lev from comment #5)
> > (In reply to Oved Ourfali from comment #4)
> > > Alon, based on your comment, should this one be closed as notabug/wontfix?
> > 
> > yes, unless anyone think otherwise.
> 
> Hmm, I had additional thought about it - are you ok with Ondra's comment
> that it happens on clean envvironment as well, not just upgrade from 3.4?

it is not matter if it is clean or not... the behavior and we had bug against that is that the user name should be able to login into restapi when using legacy providers (and if also required the new provider if the authz is the profile name).

Comment 8 Yair Zaslavsky 2014-11-23 12:21:34 UTC
(In reply to Alon Bar-Lev from comment #7)
> (In reply to Yair Zaslavsky from comment #6)
> > (In reply to Alon Bar-Lev from comment #5)
> > > (In reply to Oved Ourfali from comment #4)
> > > > Alon, based on your comment, should this one be closed as notabug/wontfix?
> > > 
> > > yes, unless anyone think otherwise.
> > 
> > Hmm, I had additional thought about it - are you ok with Ondra's comment
> > that it happens on clean envvironment as well, not just upgrade from 3.4?
> 
> it is not matter if it is clean or not... the behavior and we had bug
> against that is that the user name should be able to login into restapi when
> using legacy providers (and if also required the new provider if the authz
> is the profile name).

On clean envirionment with paches that were suggested by me:

1. added IPA "domain" using manage-domains
2. searched the domains using /domains/<domain_id>/users
3. found a user I would like to add.
4. added the user to the system, gave system permissions
5. used rest-api to login, worked fine.

So I guess I'm missing here something.

Comment 9 Alon Bar-Lev 2014-11-23 15:42:01 UTC
(In reply to Yair Zaslavsky from comment #8) 
> So I guess I'm missing here something.

I do not think you are missing anything as the principal == user name in the legacy provider.

In new provider and active directory you have difference hence this bug was opened.

At least this is what I understand.

Comment 10 Yair Zaslavsky 2014-11-23 21:46:22 UTC
(In reply to Alon Bar-Lev from comment #9)
> (In reply to Yair Zaslavsky from comment #8) 
> > So I guess I'm missing here something.
> 
> I do not think you are missing anything as the principal == user name in the
> legacy provider.
> 
> In new provider and active directory you have difference hence this bug was
> opened.
> 
> At least this is what I understand.

But I did test the patches with the new provider as well and they work.
So what compatbility issue do we have?

Comment 11 Alon Bar-Lev 2014-11-23 21:52:03 UTC
(In reply to Yair Zaslavsky from comment #10)
> (In reply to Alon Bar-Lev from comment #9)
> > (In reply to Yair Zaslavsky from comment #8) 
> > > So I guess I'm missing here something.
> > 
> > I do not think you are missing anything as the principal == user name in the
> > legacy provider.
> > 
> > In new provider and active directory you have difference hence this bug was
> > opened.
> > 
> > At least this is what I understand.
> 
> But I did test the patches with the new provider as well and they work.
> So what compatbility issue do we have?

not sure how it can work if the @xxx is expected by restapi to be profile name while the @xxx we get is authz name, and if there are two user name user1 within domain and you do not have leading component.

Comment 12 Ondra Machacek 2016-09-22 08:46:44 UTC
I am re-opening just to reconsider since we don't have legacy provider in 4.0 anymore.

Comment 14 Martin Perina 2016-09-27 11:27:45 UTC
Closing again, we will create a new bug to track the change.


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