Return 400 for invalid filter combinations on /role_assignments API

Bug #1406667 reported by Samuel de Medeiros Queiroz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Samuel de Medeiros Queiroz

Bug Description

On /v3/role_assignments API, there are two types of invalid filter combinations:

1) Can't combine actors or targets:
- (domain_id, project_id)
- (user_id, group_id)

2) Can't filter results by something that is never returned in effective mode:
- (effective, group)
- (effecitve, inherited, domain)

We need to raise an exception, returning 400 status code when those parameters are provided.

Changed in keystone:
assignee: nobody → Samuel de Medeiros Queiroz (samuel-z)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: New → In Progress
description: updated
Changed in keystone:
assignee: Samuel de Medeiros Queiroz (samueldmq) → Henry Nash (henry-nash)
Changed in keystone:
assignee: Henry Nash (henry-nash) → Samuel de Medeiros Queiroz (samueldmq)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

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

commit 569a42b3a140b0310e7d28ceb5ea8281febc4096
Author: Samuel de Medeiros Queiroz <email address hidden>
Date: Thu Jan 1 14:30:32 2015 -0300

    Check for invalid filtering on v3/role_assignments

    HTTP 400 is returned for invalid filters:
    - domain and project
    - user and group
    - effective and group
    - effective, domain and inherited

    Closes-Bug: 1406667

    Change-Id: Iac64856424a80935d34631e2243da4fc329ab2a0

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Medium
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.