-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
Originally posted on Github: https://github.com/k-orc/openstack-resource-controller/issues/459
What would you like to see implemented?
Openstack's identity API supports listing own projects using a non-admin account. Making Project actuator able to use both endpoints to produce a list of projects would enable importing projects without using admin credentials (similar to what openstack-cli does).
Currently, ORC uses /v3/projects?filters... when trying to import by filters, and /v3/projects/
when trying to import by ID. If I use non-admin account, only import by ID works; importing by name or other filters will stay forever in "Waiting" status (IMO it should be failing after keystone responds with 403, but maybe this is a bug in gophercloud).
This feature request is for making ORC fallback to listing own projects after an unauthorized (or empty) response.
Additional information
I believe this would require extending provider's scope with UserID (now it has ProjectID only) and retrieving the UserID the same way as the project (from the AuthResult). The drawback is that currently gophercloud's implementation of users.ListProjects does not accept ListOptions, even though the endpoint does, so it should be added to gophercloud too.
Link to reference documentation
https://github.com/gophercloud/gophercloud/blob/main/openstack/identity/v3/users/requests.go#L324