Skip to content

Allow use of IDs instead of names #6

@sandzwerg

Description

@sandzwerg

It took me quite a while to understand that I couldn't use the image or project/domain ID instead the name. With ID I also got an authentication error even when my password was correct:

2024/02/22 11:50:26 [dst] OpenStack Request URL: POST https://identity-3.eu-de-1.cloud.sap/v3/auth/tokens
2024/02/22 11:50:26 [dst] OpenStack Request Headers:
2024/02/22 11:50:26 [dst] Accept: application/json
2024/02/22 11:50:26 [dst] Content-Type: application/json
2024/02/22 11:50:26 [dst] User-Agent: cyclone/0.3.0 gophercloud/v1.4.0
2024/02/22 11:50:26 [dst] OpenStack Request Body: {
2024/02/22 11:50:26 [dst]   "auth": {
2024/02/22 11:50:26 [dst]     "identity": {
2024/02/22 11:50:26 [dst]       "methods": [
2024/02/22 11:50:26 [dst]         "password"
2024/02/22 11:50:26 [dst]       ],
2024/02/22 11:50:26 [dst]       "password": {
2024/02/22 11:50:26 [dst]         "user": {
2024/02/22 11:50:26 [dst]           "domain": {
2024/02/22 11:50:26 [dst]             "name": "monsoon3"
2024/02/22 11:50:26 [dst]           },
2024/02/22 11:50:26 [dst]           "name": "IXXXXXX",
2024/02/22 11:50:26 [dst]           "password": "***"
2024/02/22 11:50:26 [dst]         }
2024/02/22 11:50:26 [dst]       }
2024/02/22 11:50:26 [dst]     },
2024/02/22 11:50:26 [dst]     "scope": {
2024/02/22 11:50:26 [dst]       "project": {
2024/02/22 11:50:26 [dst]         "domain": {
2024/02/22 11:50:26 [dst]           "name": "monsoon3"
2024/02/22 11:50:26 [dst]         },
2024/02/22 11:50:26 [dst]         "name": "bbd5e2c3a2944f128b3bba616eb18eb6"
2024/02/22 11:50:26 [dst]       }
2024/02/22 11:50:26 [dst]     }
2024/02/22 11:50:26 [dst]   }
2024/02/22 11:50:26 [dst] }
2024/02/22 11:50:26 [dst] OpenStack Response Code: 401
2024/02/22 11:50:26 [dst] OpenStack Response Headers:
2024/02/22 11:50:26 [dst] Content-Length: 109
2024/02/22 11:50:26 [dst] Content-Type: application/json
2024/02/22 11:50:26 [dst] Date: Thu, 22 Feb 2024 10:50:26 GMT
2024/02/22 11:50:26 [dst] Strict-Transport-Security: max-age=15724800; includeSubDomains
2024/02/22 11:50:26 [dst] Vary: X-Auth-Token
2024/02/22 11:50:26 [dst] Www-Authenticate: Keystone uri="https://identity-3.eu-de-1.cloud.sap/v3"
2024/02/22 11:50:26 [dst] X-Openstack-Request-Id: req-142f086a-fda3-4958-8ecd-5bc68803b9a6
2024/02/22 11:50:26 [dst] OpenStack Response Body: {
2024/02/22 11:50:26 [dst]   "error": {
2024/02/22 11:50:26 [dst]     "code": 401,
2024/02/22 11:50:26 [dst]     "message": "The request you have made requires authentication.",
2024/02/22 11:50:26 [dst]     "title": "Unauthorized"
2024/02/22 11:50:26 [dst]   }
2024/02/22 11:50:26 [dst] }
Error: failed to create a destination OpenStack client: Authentication failed
2024/02/22 11:50:26 Error: failed to create a destination OpenStack client: Authentication failed

I needed to check the keystone log to find:

2024-02-22 10:49:07.242457+00:00 - keystone-api - 2024-02-22 10:49:07.242457 16 WARNING keystone.auth.core [req-2fd194cd-6271-4853-9bbf-21105215c36f greq-368cf11c-90e1-b732-6326-1088faa13f16 usr - prj - dom - usr-dom - prj-dom -] Could not find domain: ec213443e8834473b579f7bea9e8c194.: keystone.exception.DomainNotFound: Could not find domain: ec213443e8834473b579f7bea9e8c194.

and the same for the project Could not find project: bbd5e2c3a2944f128b3bba616eb18eb6.: keystone.exception.ProjectNotFound: Could not find project: bbd5e2c3a2944f128b3bba616eb18eb6.

But as the IDs are correct and OpenStack itself should be able to handle IDs I assume that cyclone is not sending them correctly. If IDs are not possible to use, I'd appreciate a notice in the help that only names are allowed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions