LDAP backend should do filtered query instead of getting all data and then filtering

Bug #1398347 reported by Marcin Zbik
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Wishlist
Henry Nash

Bug Description

When I want to find entity (group/user) by name (using /v3/users?name=MyUser or /v3/groups?name=MyGroup) LDAP gets all data associated to entity (for example whole users database) and then filter it.
It should do filtering on query level in my opinion. It is very useful when having huge LDAP catalog.

How it works now:
If I want find user with name: MyUser...
1. Keystone queries LDAP in user_tree_dn for all user_filter matching entities
2. Filters out user (MyUser) I am looking for

How it should work:
If I want find user with name: MyUser...
1. Keystone queries LDAP in user_tree_dn for user matching both user_filter and ({user_name_attribute}=MyUser)

{user_name_attribute} is of course from keystone.conf or keystone.domainName.conf

This approach reduces data downloaded from LDAP and allows to have very large users database without shrinking it down by user_filter (no always possible) or using paging (also not always possible).
I heard that there was some effort to move filtering into query level but status is unknown.

Tags: ldap
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

We have the scaffolding in place for this but haven't extended it to the drivers yet. We may have a bug on this already or at least a blueprint. I'm assigning it over to henrynash to followup.

This is marked as wishlist because it isn't so much a bug as an enhancement.

Changed in keystone:
importance: Undecided → Wishlist
status: New → Confirmed
assignee: nobody → Henry Nash (henry-nash)
Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/147612
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=e12cabba868abd5ffa24c0d71c65c42030190c1b
Submitter: Jenkins
Branch: master

commit e12cabba868abd5ffa24c0d71c65c42030190c1b
Author: Henry Nash <email address hidden>
Date: Wed Jan 14 21:19:31 2015 +0000

    Enable filtering in LDAP backend for listing entities

    Currently only SQL honors our backend filtering scaffolding, this
    patch adds LDAP support.

    Implements blueprint: ldap-filtering
    Closes-bug: 1398347

    Change-Id: I5aa1f041b9ae62ad8e8352bfd3b5117555b8c267

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-3 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.