unit tests needed to validate policy exceptions for all available actions

Bug #1262325 reported by Tushar Kalra
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Rohan

Bug Description

We need a suite of unit tests that iterate through each available rule in policy.json, converts them all into admin-only actions, and asserts if a valid policy exception is raised when those actions are performed by a non-admin.

Currently there are tests that validate if policy.enforce enforces fake admin only actions, but it doesn't test for the exceptions raised at the API level for all available actions in policy file.

Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: low-hanging-fruit
Rohan (kanaderohan)
Changed in nova:
assignee: nobody → Rohan (kanaderohan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/76597
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=07af3e4e60f8d58b37ed70e448e0ec90749a8561
Submitter: Jenkins
Branch: master

commit 07af3e4e60f8d58b37ed70e448e0ec90749a8561
Author: Rohan Kanade <email address hidden>
Date: Wed Feb 26 13:35:49 2014 +0100

    Adds unit test for etc/nova/policy.json data

    * Test live etc/nova/policy.json data
    * Convert all actions in policy.json to admin-only actions
    * Check that Policy auth exception is raised when all above actions are
      called using non-admin context

    Change-Id: I1b97987f8e9e3bacc606385a56daad189cf6ce19
    Closes-Bug: #1262325

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
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.