Add a policy to control copy-from functionality
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Glance |
Medium
|
John Bresnahan | ||
Bug Description
It might be useful to have a policy to control whether the copy-from functionality can be used or not, eg:
$ cat /etc/glance/
{
"default": "",
"manage_
"publicize_
"copy_from": "role:admin" <<<
}
this would allow an operator to enable/disable the copy-from functionality for regular users, and if desired, prevent data being copied from 'external' sources.
| Changed in glance: | |
| milestone: | none → havana-1 |
| importance: | Undecided → Medium |
| status: | New → Triaged |
| Changed in glance: | |
| assignee: | nobody → John Bresnahan (jbresnah) |
| Changed in glance: | |
| status: | Triaged → In Progress |
| Mark Washenberger (markwash) wrote : | #2 |
Is there ever a reason to have "copy_from" restrict differently than "image_upload"? I suspect the answer is yes, but I want to understand why.
| John Bresnahan (jbresnah) wrote : | #3 |
Mark, here are a couple of reasons that I thought of (tho none come from a real world scenario that I have seen):
A malicious user could use copy_from functionality to use Glance to download data and avoid having their IP address known/logged/
Host based authentication could be put in place by a repository such that the Glance server is the only endpoint allowed to download data, thus copy_from (or --location) would be the only way for users to access it. An admin may want to limit what users could access it.
This question dovetails into another that I had. Should there be a whitelist or blacklist of host/urls with which Glance will allow the use of copy_from or location?
| Stuart McLaren (stuart-mclaren) wrote : | #4 |
Hi Mark,
The copy_from policy could be considered one of the pieces required to support an implied policy: only allow data upload/download via the API endpoint. ie if you combine it with set_image_location and also pare down the 'known_stores'
store types this is the behaviour you get.
Why might you want to turn off copy_from?
1) Network hardware: you may want all data to be pushed through your load balancers/rate limiters. The copy from means uploaded data would go straight to your server, bypassing the usual upload path
2) Secure sites: You may have a site policy mandating that all traffic uses SSL. If the swift store is enabled you could copy from a plain http swift store .
Reviewed: https:/
Committed: http://
Submitter: Jenkins
Branch: master
commit b1ac90f7914d91b
Author: John Bresnahan <email address hidden>
Date: Wed Mar 27 14:03:38 2013 -1000
Add a policy handler to control copy-from functionality
This patch adds the ability to set a policy handler to control what
users can use the 'copy_from' feature in the v1 API.
Fixes bug: 1153614
Change-Id: Ie194979a2aa66c
| Changed in glance: | |
| status: | In Progress → Fix Committed |
| Changed in glance: | |
| status: | Fix Committed → Fix Released |
| Changed in glance: | |
| milestone: | havana-1 → 2013.2 |


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