Input Validation

Registered by Kurt Griffiths

Ideally do this as a sort of middleware between transport and storage drivers, to ensure that the ball doesn't get dropped by either of those once we start to have multiple drivers for operators to choose from.

Blueprint information

Status:
Complete
Approver:
None
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
Zhihao Yuan
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon havana-2
Started by
Kurt Griffiths
Completed by
Kurt Griffiths

Related branches

Sprints

Whiteboard

DESIGN/IMPLEMENTATION GOALS

-*- Single DRY approach for validation of semantic limits that are common to all drivers (e.g., max length for queue metadata, etc.). Driver-specific validation (e.g., stuff specific to WSGI) can be done within the drivers themselves.

-*- Validation that "just happens" (or can't be forgotten) when new drivers are created.

-*- Minimal performance impact. Ideally, performing a validation doesn't introduce an extra unpacking or parsing of message payloads.

OPTIONS

--1-- Introduce validation into Controller base classes

Pros: Seems to be the logical place for this to happen.

Cons: Compromises the "abstractness" of these classes, and requires descendant classes to call the super-class (a step which can be forgotten)

--2-- Introduce Validation Drivers as middleware in-between Storage and Transport. Storage drivers hand their controllers to a Validation driver, and the Validation driver hands a validator to Transport.

Pros: Enforces the validation step, and puts the logic all in one place.

Cons: Requires the validator to wrap each and every controller call, even if validation isn't required.

--3-- Instantiate Controllers with some sort of Validation mix-in class.

(I haven't really thought this one through yet).

Gerrit topic: https://review.openstack.org/#q,topic:bp/input-validation,n,z

Addressed by: https://review.openstack.org/36572
    Adds a framework for input-validation

Gerrit topic: https://review.openstack.org/#q,topic:input-validation,n,z

Addressed by: https://review.openstack.org/38588
    WIP(validation): validate user input

Addressed by: https://review.openstack.org/42012
    Update Tests for Input Validation

Gerrit topic: https://review.openstack.org/#q,topic:bug/1212389,n,z

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.