python-openstackclient/releasenotes/notes/bug-1672634-ef754cb5109dd0f2.yaml
Colleen Murphy 853ea5ab59 Narrow expected responses for CheckUserInGroup
When checking whether a given user is in a given group, keystone will
return a 404 Not Found if all went well but the user was not in the
group. It may also return a 403 if the user and the group are in
different backends, which would also mean that the user was not in the
group[1]. Any other 400 response is a client error and any 500 response
is a server error to which the user should be alerted.

Without this patch, openstackclient treats any exception as a valid "not
found" and may end up hiding server errors. This patch reduces the
caught exceptions to 403 and 404 responses and treats everything else as
an error.

[1] https://developer.openstack.org/api-ref/identity/v3/?expanded=check-whether-user-belongs-to-group-detail#check-whether-user-belongs-to-group

Closes-bug: #1672634

Change-Id: Id3f3b2409b7cee480ee3c19b6d6c3070599ffe8f
2017-03-14 09:23:19 +01:00

6 lines
177 B
YAML

---
fixes:
- |
Narrow acceptable negative response codes for ``group contains user``
[Bug `1672634 <https://bugs.launchpad.net/python-openstackclient/+bug/1672634>`_]