role (Identity) can be just white character

Bug #1519580 reported by Martin Pavlásek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Confirmed
Undecided
Unassigned
OpenStack Identity (keystone)
Confirmed
Wishlist
Deliang Fan

Bug Description

Admin - Identity - Roles, Create role page:

The form allows to create role that contains just one space. if I've tried to create role with name ' some spaces in the end ', the my input was truncated by whitespaces from both sides - as I expected, but as I realized, it wasn't applied in case just one space.

Tags: validation
Revision history for this message
Itxaka Serrano (itxaka) wrote :

Seems to be the same hitting keystone directly

keystone role-create --name " "
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| id | 711cef7a1baa4f5e84e8ba0b73fa698c |
| name | |
+----------+----------------------------------+

Changed in horizon:
status: New → Confirmed
Revision history for this message
Steve Martinelli (stevemar) wrote :

so keystone server does validation of role name, but only for v3 calls, not v2.

https://github.com/openstack/keystone/blob/master/keystone/assignment/controllers.py#L289

even though we will be deprecating v2, maybe we should look into adding it since it's not much effort.

Changed in keystone:
status: New → Confirmed
importance: Undecided → Wishlist
Changed in keystone:
assignee: nobody → Deliang Fan (vanderliang)
space (fengzhr)
Changed in horizon:
assignee: nobody → space (fengzhr)
Revision history for this message
space (fengzhr) wrote :

A new bug,perhaps more comprehensive. https://bugs.launchpad.net/keystone/+bug/1537697

Changed in horizon:
assignee: space (fengzhr) → nobody
tags: added: validation
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.