Illegal characters allowed in stack name

Bug #1103447 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Steven Hardy
Grizzly
Fix Released
Medium
Steven Hardy

Bug Description

According to AWS docs for CreateStack, only alphanumeric characters should be allowed for stack names:

http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html

Although this forum post suggests hyphens are also allowed:

https://forums.aws.amazon.com/thread.jspa?threadID=102536

We don't seem to do any validation at present though, so it's possible to pass a stack name containing, for example, a comma character. There are places where we rely on comma-separated lists (e.g autoscaling but I don't think we use the fully-qualified instance resource names including the stack name) so pretty sure it's a bad idea to allow this :)

Perhaps a reasonable compromise would be to allow alphanumeric characters, hyphens, underscores and nothing else?

Steven Hardy (shardy)
Changed in heat:
milestone: none → grizzly-3
Revision history for this message
Zane Bitter (zaneb) wrote :
Steven Hardy (shardy)
Changed in heat:
status: New → Triaged
importance: Undecided → Medium
Steven Hardy (shardy)
Changed in heat:
assignee: nobody → pfreund (pierre-freund)
Changed in heat:
status: Triaged → In Progress
status: In Progress → Fix Committed
Changed in heat:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/21596

Revision history for this message
Steven Hardy (shardy) wrote :

Assuming the assignee is not planning to address the review comments in the review linked above and resubmit?

pfreund - please update this bug or drop into #heat and let us know if you're still working on this, otherwise I'll assign it to myself tomorrow and resubmit such that we fix this for the rc1 milestone

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/24154

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/24154
Committed: http://github.com/openstack/heat/commit/2075f94b56660c97ad6e5c0829687f9d2d1803f1
Submitter: Jenkins
Branch: master

commit 2075f94b56660c97ad6e5c0829687f9d2d1803f1
Author: Steven Hardy <email address hidden>
Date: Tue Mar 12 09:50:33 2013 +0000

    heat engine : Add validation of stack names

    Add regex validation of stack names, aligns us with stack names
    allowed by AWS, with the addition of "." and "_" characters

    fixes bug 1103447

    Change-Id: I8fab0d3ad03379dfc2a18dc016e66ca8fee6cc86

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: grizzly-rc1 → 2013.1
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.