Should reject rules inserted into datasource driver policies
Bug #1436151 reported by
Tim Hinrichs
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.
Changed in congress: | |
assignee: | nobody → Sayaji Patil (sayaji15) |
Changed in congress: | |
status: | New → Confirmed |
Changed in congress: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.