Description of problem:
Keystone should not allow creating user with zero length name.
keystone should not truncate silently the more than 64 bytes names on creation.
Version-Release number of selected component (if applicable):
openstack-keystone-2012.1.2-4.el6.noarch
How reproducible: Always
Steps to Reproduce:
1.
$ keystone user-create --name ""
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 04af88f1dbe84e4eade92f0bfc73dd87 |
| name | |
| password | None |
| tenantId | None |
+----------+----------------------------------+
2.
$ keystone user-create --name "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdefMORE"
+----------+----------------------------------------------------------------------+
| Property | Value |
+----------+----------------------------------------------------------------------+
| email | None |
| enabled | True |
| id | c53e5c0d118f417faa6819e7b0eea11a |
| name | 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdefMORE |
| password | None |
| tenantId | None |
+----------+----------------------------------------------------------------------+
$ keystone user-list
+----------------------------------+---------+--------------------+------------------------------------------------------------------+
| id | enabled | email | name |
+----------------------------------+---------+--------------------+------------------------------------------------------------------+
| c53e5c0d118f417faa6819e7b0eea11a | True | None | 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef |
+----------------------------------+---------+--------------------+------------------------------------------------------------------+
Actual results:
1. User created with "" name.
2. User Name truncated to 64 byte. The keystone user-create command reports back the requested user name, but the user-list contains the truncated name.
Expected results:
Rejecting user creation.
Additional info:
The byte size limited to 64 byte by the DB.
Less than 64 UTF-8 character can reach the limit.
for osp6 Juno Beta:
* user create does not work (as expected) attempt returns -->
"Name field is required and cannot be empty (HTTP 400)"
...although i am not positive it is because of a sql setting; i found no matching STRICT*TABLES settings in the my.cnf or in the running instance of mysql.
* truncation in the user-list does NOT occur; still shows full 69 character ID.