Uploaded image for project: 'OpenStack as Infra'
  1. OpenStack as Infra
  2. OSASINFRA-3927

GH-orc-459: Project Import: support for non-admin credentials

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • ORC
    • None
    • False
    • Hide

      None

      Show
      None
    • 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/

      {ID}

      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

              Unassigned Unassigned
              shiftstack OpenShift On OpenStack
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: