Numeric Domain Names get treated as Domain ID

Bug #2130864 reported by simon stephan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

We are using OpenStack Domains and every client gets a user with a manager role to manage users and projects within its domain.
The manager user has a manager role assigned on its domain.

When i want to create a project i observed the following behavior in the client:

Working as expected when using the Domain ID on the project create command:

openstack --os-username 1234-manager \
          --os-password removed \
          --os-auth-url removed \
          --os-user-domain-name 1234 \
          --os-domain-name 1234 \
          --os-auth-type password \
project create test123 --domain 025a1b9727554eb78aaa8bcb4b3200d5
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | |
| domain_id | 025a1b9727554eb78aaa8bcb4b3200d5 |
| enabled | True |
| id | 97bc5fb9eb4241bdb7c97283af7b1ae8 |
| is_domain | False |
| name | test123 |
| options | {} |
| parent_id | 025a1b9727554eb78aaa8bcb4b3200d5 |
| tags | [] |
+-------------+----------------------------------+

But when using the Domain Name that is numeric in this Case it fails because it treats the domain name as the Domain ID:

openstack --os-username 1234-manager \
          --os-password removed \
          --os-auth-url removed \
          --os-user-domain-name 1234 \
          --os-domain-name 1234 \
          --os-auth-type password \
project create test123 --domain 1234
You are not authorized to perform the requested action: identity:create_project. (HTTP 403) (Request-ID: req-000cb034-ac70-4ab1-849e-0de3888fba09)

The resulting request is:

REQ: curl -g -i -X POST https://<keystone-endpoint>/v3/projects \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "User-Agent: python-keystoneclient" \
  -H "X-Auth-Token: <redacted>" \
  -d '{"project": {"domain_id": "1234", "name": "test123", "enabled": true, "options": {}, "tags": []}}'

I tested this on Version: openstack 8.1.0
Adding a single non-numeric char to the domain Name fixes the issue because its not treated as an id but it seems like a bug to me.

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.