Should reject rules inserted into datasource driver policies

Bug #1436151 reported by Tim Hinrichs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
congress
Fix Released
Medium
Zhenzan Zhou

Bug Description

Each datasource driver has its own policy in the domain-agnostic policy engine for storing the data from that driver. Currently, the API allows users to add rules to those policies. But this can cause problems when the datasource driver (and therefore the corresponding policy) are deleted. When the congress server starts up, it will fail to start when it tries to load rules into a nonexistent policy. The bug is that rules inserted into system-maintained policies are not rejected.

Revision history for this message
Tim Hinrichs (thinrichs) wrote :

This should be a tiny fix in congress/api/rule_model.py. When a rule is being inserted in the add_item routine, we just need to check if the policy it is being inserted into is one that is maintained by the system, and if so return an error. So I'll mark this as low-hanging-fruit.

tags: added: low-hanging-fruit
Sayaji Patil (sayaji15)
Changed in congress:
assignee: nobody → Sayaji Patil (sayaji15)
Tim Hinrichs (thinrichs)
Changed in congress:
status: New → Confirmed
Revision history for this message
Zhenzan Zhou (zhenzan-zhou) wrote :
Changed in congress:
assignee: Sayaji Patil (sayaji15) → Zhenzan Zhou (zhenzan-zhou)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to congress (master)

Reviewed: https://review.openstack.org/175695
Committed: https://git.openstack.org/cgit/openstack/congress/commit/?id=455492bf906e8f58223b1646692a08a35bc069df
Submitter: Jenkins
Branch: master

commit 455492bf906e8f58223b1646692a08a35bc069df
Author: Zhenzan Zhou <email address hidden>
Date: Tue Apr 21 11:02:45 2015 +0800

    Reject rules inserted into non persisted policies

    This patch rejects rule creation requests that insert rules into
    non persisted policies, i.e. datasource policies with error message
    "Rules not permitted on non persisted policies".

    Change-Id: I35d650a60213a31c090b91b654bb7259b7f03ed0
    Closes-bug: 1436151

Changed in congress:
status: Confirmed → Fix Committed
Tim Hinrichs (thinrichs)
Changed in congress:
milestone: none → kilo-3
status: Fix Committed → Fix Released
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.