[openstack-dev] [keystone] We still have a not identical HEAD response

Andrea Frittoli andrea.frittoli at gmail.com
Tue Jul 11 15:19:12 UTC 2017


On Tue, Jul 11, 2017 at 12:06 PM Attila Fazekas <afazekas at redhat.com> wrote:

> Hi all,
>
> Long time ago it was discussed to make the keystone HEAD responses
>  right [1] as the RFC [2][3] recommends:
>
> "  A response to the HEAD method is identical to what an equivalent
>    request made with a GET would have been, except it lacks a body. "
>
> So, the status code needs to be identical as well !
>
> Recently  turned out, keystone is still not correct in all cases [4].
>
> 'Get role inference rule' (GET), 'Confirm role inference rule' (HEAD)
>  has the same URL pattern, but they differs in the status code (200/204)
>  which is not allowed! [5]
>
> This is the only documented case where both the HEAD and GET defined and
> the HEAD has a 204 response.
>
> Are you going to fix this [4] as it was fixed before [6] ?
>
> Best Regards,
> Attila
>
> PS.:
>  Here is the tempest change for accepting the right code [7].
>

On Tempest side, adding a new accepted code into the test would open the
doors to an API backward incompatible change on keystone side.
It should be possible for tests (as for a real application) to discover
what kind of behaviour is available on server side, the 204 or the 200
response.
Otherwise any existing code that expects a 204 response will cease to work
against clouds running a new version of keystone with the code change in.
If keystone would use a micro-version for this, Tempest would cap the
existing test to a max micro-version, and develop a new test for the new
behaviour.

andrea


>
> [1]
> http://lists.openstack.org/pipermail/openstack-dev/2014-July/039140.html
> [2] https://tools.ietf.org/html/rfc7231#section-4.3.2
> [3] https://tools.ietf.org/html/rfc7234#section-4.3.5
> [4] https://bugs.launchpad.net/keystone/+bug/1701541
> [5]
> https://developer.openstack.org/api-ref/identity/v3/?expanded=confirm-role-inference-rule-detail,get-role-inference-rule-detail
> [6] https://bugs.launchpad.net/keystone/+bug/1334368
> [7] https://review.openstack.org/#/c/479286/
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170711/07e6a7b2/attachment.html>


More information about the OpenStack-dev mailing list