Comment 0 for bug 1081943

Revision history for this message
anndy (anndymaktub) wrote : Token validation using HEAD method has some bugs

1.Response header should not have Content-Type and Content-Length.

curl -v -X HEAD -H "x-auth-token: ADMIN" http://127.0.0.1:35357/v2.0/tokens/1231231231231123131312

> HEAD /v2.0/tokens/1231231231231123131312 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:35357
> Accept: */*
> x-auth-token: ADMIN
>
< HTTP/1.1 404 Not Found
< Vary: X-Auth-Token
< Content-Type: application/json
< Content-Length: 111
< Date: Thu, 22 Nov 2012 09:09:41 GMT
<

2. 'belongsTo' is not work with uuid token

curl -v -X HEAD -H "x-auth-token: ADMIN" http://127.0.0.1:35357/v2.0/tokens/286dc33e16a242a88bcb29c2b9035e62?belongsTo=openstack
> HEAD /v2.0/tokens/286dc33e16a242a88bcb29c2b9035e62?belongsTo=openstack HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 127.0.0.1:35357
> Accept: */*
> x-auth-token: ADMIN
>
< HTTP/1.1 204 No Content
< Vary: X-Auth-Token
< Content-Length: 0
< Date: Thu, 22 Nov 2012 09:20:08 GMT
<

3. I guess PKI token will get "500 Internal Server Error",
    when tenant id in the PKI token and belongsTo is not the same.