Limited authority viewer unable to see image details without location field

Bug #1245373 reported by Feilong Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Triaged
Wishlist
Feilong Wang

Bug Description

Actually, it's an improvement of bug https://bugs.launchpad.net/glance/+bug/1231255. Though we have fix 1231255, I think there is remaining concern like below:

1. OpenStack has CONF.show_image_direct_url or CONF.show_multiple_locations enabled because it needs it for some Glance-Nova setup.
2. OpenStack also has users with viewer only authority that are not to be allowed to see the location. Viewer has these policy grants: "get_images", "get_image" to access image details, but does not have "get_image_location" to protect the security sensitive details in the location field.

To allow for this, could the code be changed to put this except around the location access like this:
         try:
            if CONF.show_multiple_locations and image.locations:
                image_view['locations'] = list(image.locations)
            if CONF.show_image_direct_url and image.locations:
                image_view['direct_url'] = image.locations[0]['url']
        except exception.Forbidden:
            # log exception as warning

This would allow the 'viewer' to get list of images and image details but would not let them see the location that they are not allowed to view. TBH, I'm not really sure if it's a good idea to swallow the Forbidden exception. But obviously, it's breaking user's capability of image list.

Feilong Wang (flwang)
Changed in glance:
assignee: nobody → Fei Long Wang (flwang)
Feilong Wang (flwang)
Changed in glance:
status: New → Triaged
importance: Undecided → Wishlist
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.