Abandon/adopt don't consider project

Bug #1301314 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Triaged
Medium
Vijendar Komalla

Bug Description

We don't include the project ID in the abandon data, but all resources being abandoned exist in a specific tenant/project, so while heat will allow you to adopt resources from another project, and the stack ends up ADOPT_COMPLETE, everything will break if you then try to do anything with the stack.

This is one aspect of the complete lack of data validation on adopt which we need to fix.

I've not found a specific exploit, but clearly this behaviour is undesirable and could be open to abuse. IMO we should restrict abandon/adopt to include the project_id and validate the scope of the request on adopt matches the project_id in the abandon data.

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

An additional side-effect of this is if you adopt a stack with resources from another project, you can't delete it - you have to do stack-abandon to remove it from the DB.

That actually turns out to be a nicer way for folks to recover from the occasional DELETE_FAILED states which have occurred in the past due to bugs (e.g instead of having to fixup in the DB or drop everything)

Changed in heat:
status: New → Triaged
importance: Undecided → Medium
milestone: none → juno-1
tags: added: icehouse-rc-potential
tags: removed: icehouse-rc-potential
Changed in heat:
assignee: nobody → Vijendar Komalla (vijendar-komalla)
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-1 → juno-2
Revision history for this message
Steven Hardy (shardy) wrote :

Bumping to J3 as no fix proposed.

Vijendar can you provide a status update on this please?

FWIW, part of proposing new features is sticking around to maintain them, which IMO has not happened in this case, which is pretty disappointing :(

Changed in heat:
milestone: juno-2 → juno-3
Revision history for this message
Vijendar Komalla (vijendar-komalla) wrote :

sorry Steve, I did not get a chance to work on this. I will spend some time on this bug this week and update the status.

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/110713

Changed in heat:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/110713
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=b27840a45dece1a9b58c2977a8bf6a1acec9002f
Submitter: Jenkins
Branch: master

commit b27840a45dece1a9b58c2977a8bf6a1acec9002f
Author: Vijendar Komalla <email address hidden>
Date: Tue Jul 29 13:57:16 2014 -0500

    Include project ID in stack abandon data

    This change adds stack project_id and stack_user_project_id to
    the stack abandon data, so that stack-adopt can check if
    the project_id provided in abandon data matches the tenant_id
    of the current user.

    Change-Id: If98db0a4a210965209d50f1b04208677f63c418d
    Partial-Bug: #1301314

Thierry Carrez (ttx)
Changed in heat:
milestone: juno-3 → juno-rc1
Revision history for this message
Zane Bitter (zaneb) wrote :

Bumping from juno-rc1 in favour of bug 1375879.

Changed in heat:
milestone: juno-rc1 → kilo-1
Zane Bitter (zaneb)
tags: added: abandon-adopt
Angus Salkeld (asalkeld)
Changed in heat:
milestone: kilo-1 → kilo-2
status: In Progress → Triaged
Angus Salkeld (asalkeld)
Changed in heat:
milestone: kilo-2 → next
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Steve Baker (<email address hidden>) on branch: master
Review: https://review.openstack.org/110714
Reason: This is a very old review which has unaddressed review feedback, failing tests, or merge conflicts.

For this reason it is being abandoned to make the review queue more maintainable. It can be restored and refreshed at any time.

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.