openstack project commands fail with permissions error

Bug #2146461 reported by Michael Ward
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Unassigned

Bug Description

Hi,

we've used old versions of openstack-cli in our automation for a while and have upgraded to v9.0.0 but these commands are now failing:
```
openstack project list
openstack project show PROJECT_NAME
openstack project show --children PROJECT_NAME
```
with the following errors:
```
ForbiddenException: 403: Client Error for url: https://XXX/v3/projects, You are not authorized to perform the requested action: identity:list_projects.
ForbiddenException: 403: Client Error for url: https://XXX/v3/projects?name=PROJECT_NAME, You are not authorized to perform the requested action: identity:list_projects.
ForbiddenException: 403: Client Error for url: https://XXX/v3/projects?name=PROJECT_NAME, You are not authorized to perform the requested action: identity:list_projects.
```

The same commands work in v8.3.0 so I think there's been a change/regression between this version and v9.0.0.

I'm guessing it could be something to do with this line or a related change where it now queries an api for the project id but our user doesn't have the identity:list_projects permission:
https://github.com/openstack/python-openstackclient/blob/8668f2632a3de46d1d8f69c2749d1e498bb5c7e3/openstackclient/identity/v3/project.py#L525

Note that the following fields are set as env variables:
export OS_REGION_NAME=""
export OS_AUTH_URL=https://
export OS_IDENTITY_API_VERSION=3
export OS_PROJECT_NAME=""
export OS_PROJECT_DOMAIN_NAME=""
export OS_USER_DOMAIN_NAME=""
export OS_USERNAME=""

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.