OpenStack Image Management (Glance)
Go to file
Stuart McLaren 9beca533f4 Prevent image status being directly modified via v1
Users shouldn't be able to change an image's status directly via the
v1 API.

Some existing consumers of Glance set the x-image-meta-status header in
requests to the Glance API, eg:

https://github.com/openstack/nova/blob/master/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance#L184

We should try to prevent users setting 'status' via v1, but without breaking
existing benign API calls such as these.

I've adopted the following approach (which has some prior art in 'protected properties').

If a PUT request is received which contains an x-image-meta-status header:

* The user provided status is ignored if it matches the current image
  status (this prevents benign calls such as the nova one above from
  breaking). The usual code (eg 200) will be returned.

* If the user provided status doesn't match the current image status (ie
  there is a real attempt to change the value) 403 will be returned. This
  will break any calls which currently intentionally change the status.

APIImpact

Closes-bug: 1482371

Change-Id: I44fadf32abb57c962b67467091c3f51c1ccc25e6
(cherry picked from commit 4d08db5b6d42323ac1958ef3b7417d875e7bea8c)
2015-09-14 16:45:55 +02:00
doc/source Add client_socket_timeout option 2015-06-19 08:51:43 -07:00
etc Allow ramdisk_id, kernel_id to be null on schema 2015-07-24 10:28:09 +02:00
glance Prevent image status being directly modified via v1 2015-09-14 16:45:55 +02:00
rally-jobs Update rally-jobs files 2014-11-25 01:18:12 +04:00
tools Merge "Fix missing translations for error and info" 2015-03-13 20:32:44 +00:00
.coveragerc Update .coveragerc 2013-02-06 16:47:06 +02:00
.gitignore Prevents swap files from being found by Git 2015-02-19 07:59:34 -08:00
.gitreview update .gitreview for stable/kilo 2015-04-17 10:26:36 +02:00
.mailmap Add a mailmap entry for myself 2014-02-11 12:00:44 +08:00
.testr.conf Switch to testrepository for running tests 2014-01-29 08:30:55 +08:00
babel.cfg Added first step of babel-based translations. 2012-02-28 02:00:37 -08:00
CONTRIBUTING.rst Workflow documentation is now in infra-manual 2014-12-05 03:30:36 +00:00
HACKING.rst Remove use of contextlib.nested 2015-03-18 20:20:33 +08:00
LICENSE Add a LICENSE file. 2012-01-03 10:14:01 -05:00
MANIFEST.in Update version code from oslo. 2013-01-13 14:27:48 -08:00
openstack-common.conf Use graduated oslo.policy 2015-03-17 23:50:02 -05:00
pylintrc Typo in pylintrc file 2015-03-25 11:21:16 +01:00
README.rst Fix rendering of readme document 2015-01-07 11:07:06 +00:00
requirements.txt Updated from global requirements 2015-09-01 00:51:19 +00:00
run_tests.sh Provide a quick way to run flake8 2014-12-29 02:15:36 -05:00
setup.cfg Bump stable/kilo next version to 2015.1.2 2015-07-28 21:37:55 +02:00
setup.py Updated from global requirements 2015-07-13 14:58:57 +00:00
test-requirements.txt Updated from global requirements 2015-08-14 18:20:30 +00:00
tox.ini Catalog Index Service 2015-03-26 10:12:27 -07:00

Glance

Glance is a project that defines services for discovering, registering, retrieving and storing virtual machine images.

Use the following resources to learn more: