Tenant ID is a required parameter of user-role-add, but this command display is optional parameter.

Bug #1074215 reported by ryuta sekine
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Invalid
High
Andre Naehring

Bug Description

Tenant ID is a required parameter of user-role-add, but command display is optional parameter.

The following is the display of when the keystone user-role-add command is executed.

usage: keystone user-role-add --user-id <user-id> --role-id <role-id>
                              [--tenant-id <tenant-id>]
keystone user-role-add: error: argument --user-id/--user_id is required

In /opt/stack/keystone/keystone/identity/core.py

    def add_role_to_user(self, context, user_id, role_id, tenant_id=None):
        """Add a role to a user and tenant pair.

        Since we're trying to ignore the idea of user-only roles we're
        not implementing them in hopes that the idea will die off.

        """
        self.assert_admin(context)
        if tenant_id is None:
            raise exception.NotImplemented(message='User roles not supported: '
                                                   'tenant_id required')

Because not yet implemented it return an error if you do not specify tenant ID.
This case tenant ID should fix to a required parameter display.

ryuta sekine (r-sekine)
description: updated
ryuta sekine (r-sekine)
description: updated
Joseph Heck (heckj)
Changed in python-keystoneclient:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-keystoneclient (master)

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

Changed in python-keystoneclient:
assignee: nobody → Andre Naehring (naehring)
status: Triaged → In Progress
Changed in python-keystoneclient:
status: In Progress → Fix Committed
status: Fix Committed → In Progress
Revision history for this message
Dolph Mathews (dolph) wrote :

Tenant ID is **not** a required parameter according to the spec; this would break keystoneclient against other identity service implementations.

Changed in python-keystoneclient:
status: In Progress → Invalid
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.