~ubuntu-cloud-archive/ubuntu/precise/glance/folsom

« back to all changes in this revision

Viewing changes to doc/source/policies.rst

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Soren Hansen
  • Date: 2012-09-07 12:17:46 UTC
  • mfrom: (1.1.42)
  • Revision ID: package-import@ubuntu.com-20120907121746-a4i0aewhlzb7vw31
Tags: 2012.2~rc1~20120907.129.f0bd856-0ubuntu1
[ Chuck Short ]
* New upstream version.
* drop debian/patches/fix-docs-build.patch. 
* debian/rules: Re-activate tests.
* debain/control: Add depends on python-swiftclient.
* debian/*.usptart: make glance start from runlevel 1 to runlevel
  2. (LP: #820688)

[ Soren Hansen ]
* Update debian/watch to account for symbolically named tarballs and
  use newer URL.
* New snapshot.
* Refresh disable-network-for-docs.patch
* Fix Launchpad URLs in debian/watch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
Policies
18
18
========
19
19
 
20
 
Glance's API calls may be restricted to certain sets of users using
21
 
a Policy configuration file.
22
 
 
23
 
This document explains exactly how policies work and how the policy
24
 
configuration file is constructed.
25
 
 
26
 
Basics
27
 
------
28
 
 
29
 
A policy is composed of a set of rules that are used by the Policy "Brain"
30
 
in determining if a particular action may be performed by a particular
31
 
role.
 
20
Glance's public API calls may be restricted to certain sets of users using a 
 
21
policy configuration file. This document explains exactly how policies are
 
22
configured and what they apply to. 
 
23
 
 
24
A policy is composed of a set of rules that are used by the policy "Brain" in 
 
25
determining if a particular action may be performed by the authorized tenant.
32
26
 
33
27
Constructing a Policy Configuration File
34
28
----------------------------------------
35
29
 
36
 
Policy configuration files are simply serialized JSON dictionaries that
37
 
contain sets of rules. Each top-level key is the name of a rule. Each rule
 
30
A policy configuration file is a simply JSON object that contain sets of 
 
31
rules. Each top-level key is the name of a rule. Each rule
38
32
is a string that describes an action that may be performed in the Glance API.
39
33
 
40
34
The actions that may have a rule enforced on them are:
41
35
 
42
 
* ``get_images`` - Allowed to call the ``GET /images`` and
43
 
  ``GET /images/detail`` API calls
44
 
 
45
 
* ``get_image`` - Allowed to call the ``HEAD /images/<IMAGE_ID>`` and
46
 
  ``GET /images/<IMAGE_ID>`` API calls
47
 
 
48
 
* ``add_image`` - Allowed to call the ``POST /images`` API call
49
 
 
50
 
* ``modify_image`` - Allowed to call the ``PUT /images/<IMAGE_ID>`` API call
51
 
 
52
 
* ``publicize_image`` - Allowed to create or update images with attribute ``is_public=true``
53
 
 
54
 
* ``delete_image`` - Allowed to call the ``DELETE /images/<IMAGE_ID>`` API call
 
36
* ``get_images`` - List available image entities
 
37
  
 
38
  * ``GET /v1/images``
 
39
  * ``GET /v1/images/detail``
 
40
  * ``GET /v2/images``
 
41
 
 
42
* ``get_image`` - Retrieve a specific image entity
 
43
  
 
44
  * ``HEAD /v1/images/<IMAGE_ID>``
 
45
  * ``GET /v1/images/<IMAGE_ID>``
 
46
  * ``GET /v2/images/<IMAGE_ID>``
 
47
 
 
48
* ``download_image`` - Download binary image data
 
49
  
 
50
  * ``GET /v1/images/<IMAGE_ID>``
 
51
  * ``GET /v2/images/<IMAGE_ID>/file``
 
52
 
 
53
* ``add_image`` - Create an image entity
 
54
  
 
55
  * ``POST /v1/images``
 
56
  * ``POST /v2/images``
 
57
 
 
58
* ``modify_image`` - Update an image entity
 
59
 
 
60
  * ``PUT /v1/images/<IMAGE_ID>``
 
61
  * ``PUT /v2/images/<IMAGE_ID>``
 
62
 
 
63
* ``publicize_image`` - Create or update images with attribute
 
64
 
 
65
  * ``POST /v1/images`` with attribute ``is_public`` = ``true``
 
66
  * ``PUT /v1/images/<IMAGE_ID>`` with attribute ``is_public`` = ``true``
 
67
  * ``POST /v2/images`` with attribute ``visibility`` = ``public``
 
68
  * ``PUT /v2/images/<IMAGE_ID>`` with attribute ``visibility`` = ``public``
 
69
 
 
70
* ``delete_image`` - Delete an image entity and associated binary data
 
71
 
 
72
  * ``DELETE /v1/images/<IMAGE_ID>``
 
73
  * ``DELETE /v2/images/<IMAGE_ID>``
55
74
 
56
75
* ``manage_image_cache`` - Allowed to use the image cache management API
57
76