Admin can update metadata of a deleted image

Bug #1060930 reported by Rohit Karajgi
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Unmesh Gurjar
Folsom
Fix Released
Medium
Brian Waldon
Grizzly
Fix Released
Medium
Unmesh Gurjar
glance (Ubuntu)
Fix Released
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

An admin user has the right to see deleted images. However he does not need to update image metadata
of a deleted image. Currently this is possible, and I think it should be disabled.

Steps to Reproduce:
1. Delete an Image
2. Update the image's metadata as an admin.

Expected result:
403 Forbidden or an appropriate response.
404 NotFound could be returned but an admin can see deleted images so it may be inappropriate.

Actual result:
200 OK, and the image's metadata can get updated.

Rohit Karajgi (rohitk)
summary: - Admin can perform operations on a deleted image
+ Admin can update metadata of a deleted image
Changed in glance:
assignee: nobody → Unmesh Gurjar (unmesh-gurjar)
Brian Waldon (bcwaldon)
Changed in glance:
status: New → Triaged
importance: Undecided → Medium
milestone: none → grizzly-1
Changed in glance:
assignee: Unmesh Gurjar (unmesh-gurjar) → nobody
Changed in glance:
assignee: nobody → Chetan Kumar (chetan-kumar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
assignee: Chetan Kumar (chetan-kumar) → Unmesh Gurjar (unmesh-gurjar)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/14604
Committed: http://github.com/openstack/glance/commit/6eb54489fb4f82285bd6e29efca09333eee93516
Submitter: Jenkins
Branch: master

commit 6eb54489fb4f82285bd6e29efca09333eee93516
Author: Unmesh Gurjar <email address hidden>
Date: Mon Oct 22 07:38:33 2012 -0700

    Disallow updating deleted images.

    1. Return a 403 Forbidden error when an admin user tries to update a deleted
    image.
    2. Also added unit test coverage.

    Fixes LP: #1060930

    Change-Id: I8290c8c9f1bcbbfbff7d54f141bdcfa1c40aab6f

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/15149

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/folsom)

Reviewed: https://review.openstack.org/15149
Committed: http://github.com/openstack/glance/commit/3e58a6a6658f0e9a1e1f167f8b9cec4e9f32b3e4
Submitter: Jenkins
Branch: stable/folsom

commit 3e58a6a6658f0e9a1e1f167f8b9cec4e9f32b3e4
Author: Unmesh Gurjar <email address hidden>
Date: Mon Oct 22 07:38:33 2012 -0700

    Disallow updating deleted images.

    1. Return a 403 Forbidden error when an admin user tries to update a deleted
    image.
    2. Also added unit test coverage.

    Fixes LP: #1060930

    Change-Id: I8290c8c9f1bcbbfbff7d54f141bdcfa1c40aab6f

Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Changed in glance (Ubuntu):
status: New → Fix Released
Changed in glance (Ubuntu Quantal):
status: New → Confirmed
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Rohit, or anyone else affected,

Accepted glance into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/glance/2012.2.1-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in glance (Ubuntu Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glance - 2012.2.1-0ubuntu1

---------------
glance (2012.2.1-0ubuntu1) quantal-proposed; urgency=low

  * Dropped patches, applied upstream:
    - debian/patches/CVE-2012-4573.patch
    - debian/patches/CVE-2012-4573b.patch
  * Resynchronize with stable/folsom (199783ce) (LP: #1085255):
    - [49408e9] Glance image-delete HTTPInternalServerError HTTP 500
      (LP: #1075580)
    - [91aaa48] Image fails to upload to swift: TypeError: object of type
      'CooperativeReader' has no len( (LP: #1057322)
    - [a296a5b] Return 403 when admin deletes a deleted image (LP: #1060944)
    - [3e58a6a] Disallow updating deleted images. (LP: #1060930)
    - [26c8085] admins can see deleted images in v2 api (LP: #1071446)
    - [8321ca6] No exclude option to skip tests in run_tests.sh (LP: #1065758)
    - [c3bea11] Badly named stable/folsom Glance tarballs (LP: #1059634)
    - [fc0ee76] Non-admin users can cause public glance images to be deleted
      from the backend storage repository in the v2 api (LP: #1076506)
    - [90bcdc5] Non-admin users can cause public glance images to be deleted
      from the backend storage repository (LP: #1065187)
    - [7841cc9] FakeAuth not always admin
    - [ddad275] Jenkins jobs fail because of incompatibility between sqlalchemy-
      migrate and the newest sqlalchemy-0.8.0b1 (LP: #1073569)
    - [1d5c651] nosetest options cause no such option errors (LP: #1056420)
    - [ac223e2] Set defaultbranch in .gitreview to stable/folsom
 -- Adam Gandelman <email address hidden> Tue, 04 Dec 2012 09:19:35 -0800

Changed in glance (Ubuntu Quantal):
status: Fix Committed → Fix Released
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.