create user returns 400 without a password, which should be optional

Bug #1245342 reported by Zhang Yun
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Juan Manuel Ollé

Bug Description

Recreate the problem steps:
1. Install OSEE using install scripts.
2. Create a new user for keystone:
2.1 Running "help" to get the parameter list:
[root@localhost init.d]# keystone help user-create
usage: keystone user-create --name <user-name> [--tenant <tenant>]
                            [--pass <pass>] [--email <email>]
                            [--enabled <true|false>]

From the result, the "user-name" is mandatory, others are optional.

2.2 But when only setting username in command, it prompts below error:
[root@localhost init.d]# keystone user-create --name test1
KS-B7349D8 Expecting to find string in password. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400)

So I must also set password at the same time.
[root@localhost init.d]# keystone user-create --name test1 --pass passw0rd
+----------+----------------------------------+
| Property | Value |
+----------+----------------------------------+
| email | |
| enabled | True |
| id | 23c5ca72fdb54e3a89d19261fd5ac669 |
| name | test1 |
+----------+----------------------------------+

Revision history for this message
Dolph Mathews (dolph) wrote :

These are actually two very different issues. I reduced the scope of this issue and filed the second bug against keystoneclient: see bug 1246335.

In this bug, the server shouldn't be expecting a password on user-create (in v2 or v3). Not all deployments use passwords for authentication.

summary: - Not accurate usage prompts for "keystone user-create " CLI
+ create user returns 400 without a password, which should be optional
Changed in keystone:
status: New → Triaged
importance: Undecided → Medium
Dolph Mathews (dolph)
tags: added: havana-backport-potential
description: updated
Changed in keystone:
assignee: nobody → Juan Manuel Ollé (juan-m-olle)
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/59232

Changed in keystone:
status: Triaged → In Progress
Dolph Mathews (dolph)
Changed in keystone:
status: In Progress → Triaged
Changed in keystone:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/59232
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=a05f30d76a0481f00a3ee6e90dfee8c0578291a2
Submitter: Jenkins
Branch: master

commit a05f30d76a0481f00a3ee6e90dfee8c0578291a2
Author: Juan Manuel Olle <email address hidden>
Date: Fri Nov 29 17:29:12 2013 -0300

    Create user returns 400 without a password

    If it is intended to create a new user without password (is optional)
    keystone user-create --name <name>
    keystone fails returning error 400.

    The change consist in checking if the request has password: None
    don't make the password hash

    Co-Authored-By: huangtianhua<email address hidden>
    Closes-Bug: #1245342
    Change-Id: If6f5789dcec0610a237f286d0d17ad4b100ef5f3

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.