Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1136708

Summary: [AAA] Add rfc2307 profile
Product: [oVirt] ovirt-engine-extension-aaa-ldap Reporter: Michal Skrivanek <michal.skrivanek>
Component: Profile.rfc2307Assignee: Alon Bar-Lev <alonbl>
Status: CLOSED CURRENTRELEASE QA Contact: Ondra Machacek <omachace>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: alonbl, bazulay, bugs, ecohen, gklein, iheim, jhrozek, oourfali, pspacek, rbalakri, yeylon, yzaslavs
Target Milestone: ---Keywords: Improvement
Target Release: 1.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:32:33 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:
Bug Depends On:    
Bug Blocks: 1063095    

Description Michal Skrivanek 2014-09-03 06:46:03 UTC
we currently support groupOfUniqueNames and LDAP groups using posixGroup are not being recognized/found in any oVirt search. posixGroup is another way how to define groups and many LDAP providers are using it

possibly a simple change in LdapQueryMedataFactoryImpl.java

Change  

dsSearchSyntaxMap.put(SearchLangageLDAPTokens.$LDAP_GROUP_CATEGORY, "objectClass=groupOfUniqueNames");

to:


dsSearchSyntaxMap.put(SearchLangageLDAPTokens.$LDAP_GROUP_CATEGORY, "(|(objectClass=groupOfUniqueNames)(objectClass=posixGroup))");

Comment 1 Alon Bar-Lev 2014-09-03 08:00:52 UTC
Hi,

I do not mind supporting one, both or any, I just need a reference.
So far I did not find one[1]...

In the new provider there is no problem to customize by:
---
redhat.properties
---
include = <rhds.properties>
sequence-init.init.999-redhat-init-vars = redhat-init-vars
sequence.redhat-init-vars.010.type = var-set
sequence.redhat-init-vars.010.var-set.variable = simple_filterGroupObject
sequence.redhat-init-vars.010.var-set.value = (objectClass=posixGroup)
---

So it is not that of a problem.

Not sure why this is z-stream as it is not a new issue.

Regards,
Alon

[1] http://onemoretech.wordpress.com/2011/11/23/389rhds-memberof-plugin/

Comment 2 Petr Spacek 2014-09-03 08:14:23 UTC
posixGroup is defined in:
http://tools.ietf.org/html/rfc2307#section-4

... and widely used in existing deployments with unix machines.

AFAIK there is RFC 2307bis which contains alternative definition of member/memberUid attribute.

I'm sure that SSSD guys can add more details on this matter.

Comment 3 Jakub Hrozek 2014-09-03 09:56:20 UTC
(In reply to Petr Spacek from comment #2)
> posixGroup is defined in:
> http://tools.ietf.org/html/rfc2307#section-4
> 
> ... and widely used in existing deployments with unix machines.
> 
> AFAIK there is RFC 2307bis which contains alternative definition of
> member/memberUid attribute.
> 
> I'm sure that SSSD guys can add more details on this matter.

RFC2307bis (and its derivatives like the schema Active Directory uses) use a full DN for a group member. Unlike plain RFC2307 which uses a username in the memberUid attribute. The net effect is that the bis schema also allows you to nest groups as the member can also be another group.

I hope this helps.

Comment 4 Jakub Hrozek 2014-09-03 09:58:57 UTC
btw notably ActiveDirectory doesn't use the posixGroup OC by default at all, so I guess some schema configuration is the best approach..

Comment 5 Yair Zaslavsky 2014-09-03 10:35:56 UTC
(In reply to Jakub Hrozek from comment #4)
> btw notably ActiveDirectory doesn't use the posixGroup OC by default at all,
> so I guess some schema configuration is the best approach..

At version 3.4 we distinguish between different LDAP vendors using hard coded data structure, with version 3.5 , and the generic-ldap extension we are suppporting this by configuration files.

Comment 6 Alon Bar-Lev 2014-09-03 13:21:52 UTC
However, to support memberUid which contains user name instead of DN - it requires work - a new driver in the new provider.

Maybe easier to just activate the plugin/feature that provides memberOf.

Comment 7 Alon Bar-Lev 2014-09-03 20:52:32 UTC
another note: this model differ from standard ldap, the group refer to users instead of user refer to group.

Comment 8 Jakub Hrozek 2014-09-04 07:43:32 UTC
(In reply to Alon Bar-Lev from comment #7)
> another note: this model differ from standard ldap, the group refer to users
> instead of user refer to group.

User referring to group is not really as standardized. MS AD does that with memberof attribute, which is non-transitive, so this setup:

user -- group1 -- group2
     -- group3

would only list group1 and group3 in the memberof attribute. On the other hand, IPA 'unrolls' the nested group membership, so the above setup would list all three groups in memberof. Traditional RFC2307bis setups often have no memberof attribute at all.

Bottom line, retrieving group memberships might sound easy at first but the devil is in the details :-) Might I suggest something like SSSD and the modules Jan Pazdziora is working on to solve the problem for you?

Comment 9 Alon Bar-Lev 2014-09-04 08:01:43 UTC
The posix extensions are later addition to the ldap scheme, all implementations do support the memberOf to be able to derive  user permissions (recursively) from user as root entity.

Otherwise the entire directory should be searched, especially in multi-domain setup.

Having directory that does not populate the information into memberOf was not considered, I will work something out that is specific to single namespace interaction.

Comment 10 Thierry Kauffmann 2014-09-08 15:03:45 UTC
(In reply to Alon Bar-Lev from comment #6)
> However, to support memberUid which contains user name instead of DN - it
> requires work - a new driver in the new provider.
> 
> Maybe easier to just activate the plugin/feature that provides memberOf.

The openLDAP "memberOf" overlay only works with groupOfNames group types. It is NOT compatible with PosixGroups group types. So enabling that overlay in OpenLDAP won't help.

Group search requires a second ldap query after user's memberUid was first retrieved.

As an example, this is how we retrieve groups on our openldap server :

ldapsearch -x  -b 'ou=Groups,dc=info-ufr,dc=univ-montp2,dc=fr' '(&(objectClass=posixGroup)(memberUid=tkauffmann))' cn

Comment 11 Sandro Bonazzola 2014-10-17 12:32:33 UTC
oVirt 3.5 has been released and should include the fix for this issue.