Hello there,
I have problem adding permission to create events in categories to external groups.
I added my ldap directory to indico as described in the manual. Users can successfully login with ldap credentials.
On the ldap server, I created a group “myorg” and added all users to it.
On indico administraation section I search for the “myorg” group, however it lists only users which logged in into indico at least once (maybe, that’s right)
I added permission to group “myorg” to create events in some categories, but the users from that group still have no rights to create any events.
In indico, I created goup “staff”, and added some users to it, then added the same as in (4) permissions to the “staff” group, and the corresponding users from the local group can add events.
Can I give permission to create events to members of external group in some way? Or maybe I did something wrong?
LDAP group membership checks are cached for 30 minutes, so if the user did anything where his group membership was checked then it may take up to 30 minutes for the LDAP update to show up. I recommend you to check the group member list (which you already found) if the user is shown there. And yes, this page only shows people who have an Indico account.
Thank you for your reply.
Yes, the user is in the list of group members.
Yes, I use openldap and have memberOf enabled, and all users have this attribute set (checked with ldapsearch)
Can you test in indico shell what the membership check returns?
from indico.modules.groups import GroupProxy
g = GroupProxy('GROUPNAME', 'ldap')
u = User.get(USERID)
Then check u in g to see if the user is in the group as far as Indico is concerned. If he his, something is wrong with your ACL and LDAP actually works fine. So let’s assume it returns False…
Other things to check: The identifiers the user has as far as group checks are concerned:
[x[1] for x in u.iter_identifiers(check_providers=True, providers={'ldap'})]
Then check the identifiers of the group members:
[x.identifier for x in g.group]
There should be one value that’s in both of these two lists.
In [1]: from indico.modules.groups import GroupProxy
In [2]: g = GroupProxy('imath', 'ldap')
In [3]: u = User.get(2)
In [4]: u in g
Out[4]: False
In [5]: [x[1] for x in u.iter_identifiers(check_providers=True, providers={'ldap'})]
Out[5]: [u'vo']
In [6]: [x.identifier for x in g.group]
Out[6]:
[u'vo',
... all my users ...
]
My username is vo, if you ask, both for local and ldap accounts.
OK, so this means that the group membership check is not working for some reason.
Just to confirm, can you check 'vo' in g.group? If that also returns False, you might want to add some debug prints to the flask-multipass code that handles the actual membership check:
You can trigger the code there using the 'vo' in g.group check. Make sure to restart indico shell after changing the file or your changes won’t be taken into account.
OK, seems that I detected something… user_data in line 128 has value {'memberOf': ['cn=imath,ou=group,dc=XXXX']}, but self_dn in line 137 is equal to cn=imath,ou=Group,dc=XXXX, the latter contains capital G.
I will fix that in my setup, but this looks like a bug, since LDAP must be case insensitive (according to openldap manual at least)
I have the same problem. The self.dn value has a capital letter in Group.
How did you solve de problem?
The only way I see to solve the problem is to set