Bug 1079952
| Summary: | Adding a user from a domain via API fails when the ldap provider is IPA | ||
|---|---|---|---|
| Product: | [Retired] oVirt | Reporter: | Yair Zaslavsky <yzaslavs> |
| Component: | ovirt-engine-core | Assignee: | Yair Zaslavsky <yzaslavs> |
| Status: | CLOSED DUPLICATE | QA Contact: | Pavel Stehlik <pstehlik> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.4 | CC: | acathrow, bugs, gklein, iheim, oourfali, s.kieske, yeylon, yzaslavs |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | 3.5.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | infra | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-24 05:04:52 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Yair Zaslavsky
2014-03-24 11:36:28 UTC
When trying to add a user by name the RESTAPI receives a request like this:
<user>
<user_name>name@domain</user_name>
</user>
As a result the RESTAPI generates a engine query like this:
ADUSER@domain: allnames=name@domain
And then it sends this query to the backend for processing. The RESTAPI doesn't do any processing specific to a particular LDAP flavor. The backend in turn translates this engine query into a LDAP query, like this:
(&($USER_ACCOUNT_TYPE) (|($GIVENNAME=name@domain)(sn=name@domain)($USER_ACCOUNT_NAME=name@domain)($PRINCIPAL_NAME=name@domain)))
This is later translated by the backend to the specific schema required by the LDAP flavor, replacing the $WHATEVER with the actual attribute names. In the particular case of IPA the result is this:
(&(&(objectClass=posixAccount)(objectClass=krbPrincipalAux)) (|(givenname=name@domain)(sn=name@domain)(uid=name@domain)(krbPrincipalName=name@domain)))
In an IPA server the only attribute that contains the domain name is krbPrincipalAux, but it contains the domain name in upper case:
krbPrincipalName=name@DOMAIN
The syntax for comparison is case sensitive, so the search will never succeed.
As this lies deep inside the LDAP support of the backend I'm changing the component from RESTAPI to backend.
This is an automated message: This bug has been re-targeted from 3.4.2 to 3.5.0 since neither priority nor severity were high or urgent. Please re-target to 3.4.3 if relevant. The bug was fixed during the effort on BZ1102041 *** This bug has been marked as a duplicate of bug 1102041 *** The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |