1
votes

I am using openstack api as given below:

curl -i -X GET "https://cloud.lab.fiware.org:5000/v3/users?name=username" -H "X-Auth-token:token"

However, it doesn't return me any result. It gives 403 error code as Forbidden.

Please find the below response

HTTP/1.1 403 Forbidden Server: nginx/1.4.6 (Ubuntu) Date: Wed, 30 Jan 2019 10:55:04 GMT Content-Type: application/json Content-Length: 136 Connection: keep-alive Vary: X-Auth-Token X-Distribution: Ubuntu X-Openstack-Request-Id: req-9948991c-83f2-452b-b942-2ff3d5a9c5eb

{"error": {"message": "You are not authorized to perform the requested action: identity:list_users", "code": 403, "title": "Forbidden"}}

2
Is your system date set correctly? - Murli
Is their any particular format for date to access API's? - Kushagra Srivastava

2 Answers

1
votes

Just admin privilege could get list of users: "As an administrator, you manage projects, users, and roles." ( from https://docs.openstack.org/keystone/pike/admin/cli-manage-projects-users-and-roles.html)

0
votes

I asume that you provided a correct token. What I mean is that this operation has to be launched by an authorised user with enough privileges to get this information. Probably, you requested the API with a token of a normal user and then you cannot get the information for the requested user for security reasons.