|
| 1 | +OpenStack Identity API v3 OS-ENDPOINT-POLICY Extension |
| 2 | +====================================================== |
| 3 | + |
| 4 | +This extension provides associations between service endpoints and |
| 5 | +policies that are already stored in the Identity server and referenced |
| 6 | +by policy ID. Such associations enable an endpoint to request the |
| 7 | +appropriate policy for itself. Three types of association are supported: |
| 8 | + |
| 9 | +- A policy associated to a specific endpoint |
| 10 | +- A policy associated to any endpoint of a given service type in a |
| 11 | + given region |
| 12 | +- A policy associated to any endpoint of a given service type |
| 13 | + |
| 14 | +When an endpoint requests the appropriate policy for itself, the |
| 15 | +extension will look for an association *in the order given above* (which |
| 16 | +is essentially in order from most specific to least specific) and select |
| 17 | +the first one it finds. For region associations, any parent regions will |
| 18 | +also be examined in ascending order. No combination of polices will |
| 19 | +occur. |
| 20 | + |
| 21 | +Policy-Endpoint Associations |
| 22 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 23 | + |
| 24 | +Create association with endpoint |
| 25 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 26 | + |
| 27 | +:: |
| 28 | + |
| 29 | + PUT /policies/{policy_id}/OS-ENDPOINT-POLICY/endpoints/{endpoint_id} |
| 30 | + |
| 31 | +Creates an association between the policy and the endpoint. If another |
| 32 | +association already existed for the specified endpoint, this will |
| 33 | +replace that association. Any body supplied with this API will be |
| 34 | +ignored. |
| 35 | + |
| 36 | +Response: |
| 37 | + |
| 38 | +:: |
| 39 | + |
| 40 | + Status: 204 No Content |
| 41 | + |
| 42 | +Check association with endpoint |
| 43 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | + |
| 45 | +:: |
| 46 | + |
| 47 | + GET /policies/{policy_id}/OS-ENDPOINT-POLICY/endpoints/{endpoint_id} |
| 48 | + |
| 49 | +Verifies the existence of an association between a policy and an |
| 50 | +endpoint. A HEAD version of this API is also supported. |
| 51 | + |
| 52 | +Response: |
| 53 | + |
| 54 | +:: |
| 55 | + |
| 56 | + Status: 204 No Content |
| 57 | + |
| 58 | +Delete association with endpoint |
| 59 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 60 | + |
| 61 | +:: |
| 62 | + |
| 63 | + DELETE /policies/{policy_id}/OS-ENDPOINT-POLICY/endpoints/{endpoint_id} |
| 64 | + |
| 65 | +Deletes an association between the policy and the endpoint. |
| 66 | + |
| 67 | +Response: |
| 68 | + |
| 69 | +:: |
| 70 | + |
| 71 | + Status: 204 No Content |
| 72 | + |
| 73 | +Create association with service |
| 74 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 75 | + |
| 76 | +:: |
| 77 | + |
| 78 | + PUT /policies/{policy_id}/OS-ENDPOINT-POLICY/services/{service_id} |
| 79 | + |
| 80 | +Creates an association between the policy and the service. If another |
| 81 | +association already existed for the specified service, this will replace |
| 82 | +that association. Any body supplied with this API will be ignored. |
| 83 | + |
| 84 | +Response: |
| 85 | + |
| 86 | +:: |
| 87 | + |
| 88 | + Status: 204 No Content |
| 89 | + |
| 90 | +Check association with service |
| 91 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 92 | + |
| 93 | +:: |
| 94 | + |
| 95 | + GET /policies/{policy_id}/OS-ENDPOINT-POLICY/services/{service_id} |
| 96 | + |
| 97 | +Verifies the existence of an association between a policy and a service. |
| 98 | +A HEAD version of this API is also supported. |
| 99 | + |
| 100 | +Response: |
| 101 | + |
| 102 | +:: |
| 103 | + |
| 104 | + Status: 204 No Content |
| 105 | + |
| 106 | +Delete association with service |
| 107 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 108 | + |
| 109 | +:: |
| 110 | + |
| 111 | + DELETE /policies/{policy_id}/OS-ENDPOINT-POLICY/services/{service_id} |
| 112 | + |
| 113 | +Deletes an association between the policy and the service. |
| 114 | + |
| 115 | +Response: |
| 116 | + |
| 117 | +:: |
| 118 | + |
| 119 | + Status: 204 No Content |
| 120 | + |
| 121 | +Create association with service in a region |
| 122 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 123 | + |
| 124 | +:: |
| 125 | + |
| 126 | + PUT /policies/{policy_id}/OS-ENDPOINT-POLICY/services/{service_id}/regions/{region_id} |
| 127 | + |
| 128 | +Creates an association between the policy and the service in the given |
| 129 | +region. If another association already existed for the specified service |
| 130 | +and region, this will replace that association. Any body supplied with |
| 131 | +this API will be ignored. |
| 132 | + |
| 133 | +Response: |
| 134 | + |
| 135 | +:: |
| 136 | + |
| 137 | + Status: 204 No Content |
| 138 | + |
| 139 | +Check association with service in a region |
| 140 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 141 | + |
| 142 | +:: |
| 143 | + |
| 144 | + GET /policies/{policy_id}/OS-ENDPOINT-POLICY/services/{service_id}/regions/{region_id} |
| 145 | + |
| 146 | +Verifies the existence of an association between a policy and a service |
| 147 | +in the given region. A HEAD version of this API is also supported. |
| 148 | + |
| 149 | +Response: |
| 150 | + |
| 151 | +:: |
| 152 | + |
| 153 | + Status: 204 No Content |
| 154 | + |
| 155 | +Delete association with service in a region |
| 156 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 157 | + |
| 158 | +:: |
| 159 | + |
| 160 | + DELETE /policies/{policy_id}/OS-ENDPOINT-POLICY/services/{service_id}/regions/{region_id} |
| 161 | + |
| 162 | +Deletes an association between the policy and the service in the given |
| 163 | +region. |
| 164 | + |
| 165 | +Response: |
| 166 | + |
| 167 | +:: |
| 168 | + |
| 169 | + Status: 204 No Content |
| 170 | + |
| 171 | +List effective endpoint associations for policy |
| 172 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 173 | + |
| 174 | +:: |
| 175 | + |
| 176 | + GET /policies/{policy_id}/OS-ENDPOINT-POLICY/endpoints |
| 177 | + |
| 178 | +Returns all the endpoints that are currently associated with a specific |
| 179 | +policy via any of the association methods. |
| 180 | + |
| 181 | +Response: |
| 182 | + |
| 183 | +:: |
| 184 | + |
| 185 | + Status: 200 OK |
| 186 | + |
| 187 | + { |
| 188 | + "endpoints": [ |
| 189 | + { |
| 190 | + "id": "--endpoint-id--", |
| 191 | + "interface": "public", |
| 192 | + "links": { |
| 193 | + "self": "http://identity:35357/v3/endpoints/--endpoint-id--" |
| 194 | + }, |
| 195 | + "region": "north", |
| 196 | + "service_id": "--service-id--", |
| 197 | + "url": "http://identity:35357/" |
| 198 | + }, |
| 199 | + { |
| 200 | + "id": "--endpoint-id--", |
| 201 | + "interface": "internal", |
| 202 | + "links": { |
| 203 | + "self": "http://identity:35357/v3/endpoints/--endpoint-id--" |
| 204 | + }, |
| 205 | + "region": "south", |
| 206 | + "service_id": "--service-id--", |
| 207 | + "url": "http://identity:35357/" |
| 208 | + } |
| 209 | + ], |
| 210 | + "links": { |
| 211 | + "next": null, |
| 212 | + "previous": null, |
| 213 | + "self": "http://identity:35357/v3/OS-ENDPOINT-POLICY/policies/{policy_id}/endpoints" |
| 214 | + } |
| 215 | + } |
| 216 | + |
| 217 | +Get effective policy associated with endpoint |
| 218 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 219 | + |
| 220 | +:: |
| 221 | + |
| 222 | + GET /endpoints/{endpoint_id}/OS-ENDPOINT-POLICY/policy |
| 223 | + |
| 224 | +Returns the policy that is currently associated with the given endpoint, |
| 225 | +by working through the ordered sequence of methods of association. The |
| 226 | +first association that is found will be returned. If the region of the |
| 227 | +endpoint has a parent, then region associations will be examined up the |
| 228 | +region tree in ascending order. |
| 229 | + |
| 230 | +Response: |
| 231 | + |
| 232 | +:: |
| 233 | + |
| 234 | + Status: 200 OK |
| 235 | + |
| 236 | + { |
| 237 | + "policy": { |
| 238 | + "blob": "--serialized-blob--", |
| 239 | + "id": "--policy-id--", |
| 240 | + "links": { |
| 241 | + "self": "http://identity:35357/v3/policies/--policy-id--" |
| 242 | + }, |
| 243 | + "type": "--serialization-mime-type--" |
| 244 | + } |
| 245 | + } |
| 246 | + |
| 247 | +Check if a policy is associated with endpoint |
| 248 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 249 | + |
| 250 | +:: |
| 251 | + |
| 252 | + HEAD /endpoints/{endpoint_id}/OS-ENDPOINT-POLICY/policy |
| 253 | + |
| 254 | +Checks if a policy is currently associated with the given endpoint. |
| 255 | + |
| 256 | +Response: |
| 257 | + |
| 258 | +:: |
| 259 | + |
| 260 | + Status: 200 OK |
| 261 | + |
0 commit comments