Skip to content

Identity v3: role assignments list doesn't contain an info about the user/project/group domains #2234

@kayrus

Description

@kayrus

Keystone V3 user, project and a group are per-domain resources: https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=list-role-assignments-detail#list-role-assignments

Currently gophercloud returns only ID and Name, but it also must to expose the domain name and ID info. Here is an example response:

URL: GET http://identity:5000/v3/role_assignments?effective=true&include_names=true&scope.project.id=357f04391d4a41f9ae18f65e8c909df0&user.id=185e1278fa0f430bba5f1787264d3f36
Headers:
Accept: application/json
User-Agent: gophercloud/2.0.0
X-Auth-Token: ***
Code: 200
Headers:
Connection: keep-alive
Content-Type: application/json
Strict-Transport-Security: max-age=15724800; includeSubDomains
Vary: Accept-Encoding X-Auth-Token
X-Openstack-Request-Id: req-aa5f8425-2928-4872-a479-89c9234bc0f7
Body: {
  "links": {
    "next": null,
    "previous": null,
    "self": "http://identity:5000/v3/role_assignments?effective=true\u0026include_names=true\u0026scope.project.id=357f04391d4a41f9ae18f65e8c909df0\u0026user.id=185e1278fa0f430bba5f1787264d3f36"
  },
  "role_assignments": [
    {
      "links": {
        "assignment": "http://identity:5000/v3/projects/357f04391d4a41f9ae18f65e8c909df0/groups/cd62eb6d338e4f7f946564db7b1e9aef/roles/a22f1c14945043b38e956f298d63dc38",
        "membership": "http://identity:5000/v3/groups/cd62eb6d338e4f7f946564db7b1e9aef/users/185e1278fa0f430bba5f1787264d3f36"
      },
      "role": {
        "id": "a22f1c14945043b38e956f298d63dc38",
        "name": "member"
      },
      "scope": {
        "project": {
          "domain": {
            "id": "678228eaff424d57a7518d8ae8dc91c7",
            "name": "test"
          },
          "id": "357f04391d4a41f9ae18f65e8c909df0",
          "name": "demo"
        }
      },
      "user": {
        "domain": {
          "id": "678228eaff424d57a7518d8ae8dc91c7",
          "name": "test"
        },
        "id": "185e1278fa0f430bba5f1787264d3f36",
        "name": "sad-user"
      }
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    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