path based attributes/parameters aren't correctly validated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Triaged
|
Medium
|
Unassigned |
Bug Description
I noticed that invalid references to json parameters are allowed via path based parameters/
heat_template_
parameters:
RoleData:
type: json
default:
step1: foo
step3: foo
resources:
value:
type: OS::Heat::Value
properties:
value:
step1: {get_param: [RoleData, step1]}
step2: {get_param: [RoleData, step2]}
step3: {get_param: [RoleData, step3]}
step4: {get_param: [RoleData, step4]}
anything: {get_param: [RoleData, noexist]}
This works, and creates a resource like:
| attributes | { |
| | "value": { |
| | "anything": "", |
| | "step4": "", |
| | "step3": "foo", |
| | "step2": "", |
| | "step1": "foo" |
| | } |
| | } |
We probably can't fix this without a template version bump, as I know some templates (I found this in the tripleo templates, which currently rely on this behavior...) may break if we fix it.
But I wanted to raise the issue as I think this is probably wrong and we should probably consider more correct validation in future.
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → ongoing |