When service catalog does not include tenant_id in token validation response, users cannot upload images to glance

Bug #927870 reported by Gabe Westmaas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned

Bug Description

While tenant_id *can* be included in the validate token response according to the , it does not need to be. In the case where it isn't, glance cannot identify the tenant and so cannot set the owner correctly, and image upload fails.

Revision history for this message
Dolph Mathews (dolph) wrote :

I believe this is by design -- **unless** a global (tenant-less) administrative role is provided -- if no tenant ID is included in the validation response, that's because the token is not scoped to a tenant, and should not be authorized to act upon a tenant. In that case, the user needs to authenticate with keystone for a specific tenant, receive a scoped token, and provide *that* token to glance.

However, if glance is failing to authorize a global admin role, I believe that's a bug in glance, although I'm not sure how it should be resolved.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Gabriel: were you using a scoped token?

Revision history for this message
Gabe Westmaas (westmaas) wrote :

Sorry should have closed this as invalid earlier. It was in fact an unscoped token.

Changed in glance:
status: New → Invalid
Changed in keystone:
status: New → Invalid
Revision history for this message
Brian Waldon (bcwaldon) wrote :

Do you not think that's a valid use case, for an admin to upload an image? Maybe we could handle the error more gracefully?

Revision history for this message
Gabe Westmaas (westmaas) wrote :

It may be, but that wasn't the case in what I was testing - and may have worked fine. The reason it didn't work for me was that when it initially registered there was no user associated with the image, so the subsequent upload failed as the owner didn't match and it wasn't public. In the case of an admin it may not matter if the owner matches? Haven't tried it yet.

I guess it would have been good if the image didn't sit in "queued" status and instead errored when the request was made or more obviously.

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.