Role name is not required

Bug #997725 reported by Chris Fattarsi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Mohammed Naser

Bug Description

The keystone client requires a name when creating a role, but curling with an empty name field will create a role. The client and the back end should be consistent.

curl -i -X POST -d '{"role":{"name": ""}}' -H 'x-auth-token: this-is-my-token' -H 'Content-type: application/json' http://localhost:35357/v2.0/OS-KSADM/roles

HTTP/1.1 200 OK
Content-Type: application/json
Vary: X-Auth-Token
Content-Length: 64
Date: Thu, 10 May 2012 17:35:58 GMT

{"role": {"name": "", "id": "a7873cd5ca6e4a799ddb8aedcb3d4881"}}

Yaguang Tang (heut2008)
Changed in keystone:
status: New → Confirmed
assignee: nobody → Yaguang Tang (heut2008)
Yaguang Tang (heut2008)
Changed in keystone:
assignee: Yaguang Tang (heut2008) → nobody
Revision history for this message
Mohammed Naser (mnaser) wrote :

I would like to fix this however can anyone comment from core team on how to perform validation?

It seems that you can create empty usernames, role names and tenants too (can't find any validation).

Mohammed Naser (mnaser)
Changed in keystone:
assignee: nobody → Mohammed Naser (mnaser)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: Confirmed → In Progress
Joseph Heck (heckj)
Changed in keystone:
milestone: none → folsom-1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/7464
Committed: http://github.com/openstack/keystone/commit/19b6076869f6e177febc559b191f4ef9c352e55b
Submitter: Jenkins
Branch: master

commit 19b6076869f6e177febc559b191f4ef9c352e55b
Author: Mohammed Naser <email address hidden>
Date: Tue May 15 17:43:50 2012 -0400

    Add validations of 'name' field for roles, users and tenants.

    Fixes LP Bug #997725

    Change-Id: I2759d21bed3c0e42642de96184844e1b9e795bb6

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: folsom-1 → 2012.2
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.