remove keystone/clean.py

Bug #1387607 reported by wanghong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Wishlist
Unassigned

Bug Description

clean.py should be removed and everything should move to jsonschema validation.

This requires extra work because v2 api still utilizes clean.py for validation/sanitization of objects/refs.

wanghong (w-wanghong)
Changed in keystone:
assignee: nobody → wanghong (w-wanghong)
Revision history for this message
Lance Bragstad (lbragstad) wrote :

some of these calls are made in the backends. I'm in the process of removing them and running the test to see if we have any failures.

Revision history for this message
Lance Bragstad (lbragstad) wrote :

I removed all the calls to the clean.py module and ran the tests. I ended up with 134 failures. Looks like there are some validation tests that are made against the backend specifically. These could probably be pruned since we have keystone/tests/test_validation.py.

Revision history for this message
Lance Bragstad (lbragstad) wrote :

The statement about keystone/clean.py not being needed anymore is only partly true. While the v3 API doesn't rely on keystone/clean.py for validation, there are several calls for the v2.0 API that test it [1]. Here, I think we have a couple of options.

1.) If we want to remove keystone/clean.py completely we will need to propose a v2.0 schema and use jsonschema to validate the v2.0 the same way we do for the v3 API.

2.) We can keep keystone/clean.py around but move the validation calls out of the backends [2] and into the controllers, or managers for v2.0.

We can't remove keystone/clean.py without having some sort of validation in place.

[1] https://github.com/openstack/keystone/blob/3d9184b6f5860f0b56091a326ed41d2a4c29fbe4/keystone/tests/test_content_types.py#L1676-L1695
[2] https://github.com/openstack/keystone/blob/3d9184b6f5860f0b56091a326ed41d2a4c29fbe4/keystone/assignment/backends/ldap.py#L72

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/132095

Revision history for this message
wanghong (w-wanghong) wrote :

I prefer the second option.

Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

This is not really a bug. This is (if anything) a Blueprint (and likely does not require a spec).

Changed in keystone:
importance: Undecided → Wishlist
status: New → Confirmed
description: updated
Revision history for this message
Dolph Mathews (dolph) wrote :

Morgan: a blueprint that doesn't require a spec sounds like a wishlist bug to me :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on keystone (master)

Change abandoned by Morgan Fainberg (<email address hidden>) on branch: master
Review: https://review.openstack.org/132095
Reason: Abandoning this administratively. Please feel free to restore when/if there is still interest in this specific patchset.

Revision history for this message
Steve Martinelli (stevemar) wrote :

removing assignee due to inactivity

Changed in keystone:
assignee: wanghong (w-wanghong) → nobody
Revision history for this message
Steve Martinelli (stevemar) wrote :

this is a refactoring, not a bug. marking this as invalid. no need to create bugs for code refactoring. reserve bugs for real issues

Changed in keystone:
status: Confirmed → Invalid
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.