glance member-add doesn't validate input

Bug #1131235 reported by Flavio Percoco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
Undecided
Unassigned

Bug Description

Glance currently doesn't validates inputs for this command which makes it possible to add un-existing members to an image.

[root@ykaul-os-horizon ~(keystone_admin)]$ glance member-list --image-id a92439a6-5923-4ca8-98ae-ceabe3c164f6
+--------------------------------------+----------------------------------+-----------+
| Image ID | Member ID | Can Share |
+--------------------------------------+----------------------------------+-----------+
| a92439a6-5923-4ca8-98ae-ceabe3c164f6 | 32af8050fbc247fd9ab9b0dc67237fcc | True |
+--------------------------------------+----------------------------------+-----------+

Now adding with a non-existent ID (similar to above, only with '1' at the end of the ID):

[root@ykaul-os-horizon ~(keystone_admin)]$ glance member-create a92439a6-5923-4ca8-98ae-ceabe3c164f6 32af8050fbc247fd9ab9b0dc67237fc1 --can-share
[root@ykaul-os-horizon ~(keystone_admin)]$ echo $?
0
[root@ykaul-os-horizon ~(keystone_admin)]$ glance member-list --image-id a92439a6-5923-4ca8-98ae-ceabe3c164f6
+--------------------------------------+----------------------------------+-----------+
| Image ID | Member ID | Can Share |
+--------------------------------------+----------------------------------+-----------+
| a92439a6-5923-4ca8-98ae-ceabe3c164f6 | 32af8050fbc247fd9ab9b0dc67237fc1 | True |
| a92439a6-5923-4ca8-98ae-ceabe3c164f6 | 32af8050fbc247fd9ab9b0dc67237fcc | True |
+--------------------------------------+----------------------------------+-----------+

Revision history for this message
Jay Pipes (jaypipes) wrote :

This is the expected behaviour. The decision was made to not do a round trip to the Keystone service to determine if the user ID was valid or not.

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.