Elasticsearch unable to parse query when using non-admin user

Bug #1484285 reported by Travis Tripp
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Searchlight
Fix Released
Critical
Steve McLellan

Bug Description

After implementing the fix for authentication (https://review.openstack.org/#/c/211047/)

500 Errors are reported when querying for a non-admin user. The query filtering being sent in is failing.

Query and response from admin user:

   http://paste.openstack.org/show/412793/

Query and response from demo user:

   http://paste.openstack.org/show/412791/

Revision history for this message
Steve McLellan (sjmc7) wrote :

'index' isn't a valid filter. I think the correct approach is to use an 'indices' filter (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-indices-filter.html) with the 'and' inside it. I've got a patch, will fix up unit tests and submit it.

Changed in searchlight:
assignee: nobody → Steve McLellan (sjmc7)
status: New → In Progress
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to searchlight (master)

Fix proposed to branch: master
Review: https://review.openstack.org/212563

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to searchlight (master)

Reviewed: https://review.openstack.org/212563
Committed: https://git.openstack.org/cgit/openstack/searchlight/commit/?id=9de60b3ddcea69a013a2c907ecebe2d1ffa359b4
Submitter: Jenkins
Branch: master

commit 9de60b3ddcea69a013a2c907ecebe2d1ffa359b4
Author: Steve McLellan <email address hidden>
Date: Thu Aug 13 09:54:02 2015 -0500

    Fix RBAC filters

    'index' isn't a valid filter term, and both the glance plugins try to
    use it as one, which causes queries to fail for non-admin users. Patch
    changes the RBAC filters to use an 'indices' filter which first
    restricts on index and then applies the rbac filters and the query.

    Change-Id: I35d2703fbb84e1b89e76dee842bb2416a90a999d
    Closes-Bug: #1484285

Changed in searchlight:
status: In Progress → Fix Committed
Changed in searchlight:
milestone: none → liberty-rc1
Changed in searchlight:
status: Fix Committed → Fix Released
Changed in searchlight:
milestone: liberty-rc1 → 0.1.0.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.