← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1479154] [NEW] Invalid X-Subject-Token used to return 404 in uuid but now fernet respond with 401 error

 

Public bug reported:

v3:
{code}
stack@hLinux:~/helion/hlm/ansible$  curl -X GET -k -H "X-Subject-Token:$v3Token" -H "X-Auth-Token:admintoken" http://localhost:35357/v3/auth/tokens |python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   296  100   296    0     0   4175      0 --:--:-- --:--:-- --:--:--  4228
{
    "token": {
        "audit_ids": [
            "YxQb86AXSAaUUItKvbVJaA"
        ],
        "expires_at": "2015-07-29T02:56:03.000000Z",
        "extras": {},
        "issued_at": "2015-07-28T22:56:03.000000Z",
        "methods": [
            "password"
        ],
        "user": {
            "domain": {
                "id": "default",
                "name": "Default"
            },
            "id": "ad6769d740614259aafec4e0c16d5bc4",
            "name": "test"
        }
    }
}
stack@hLinux:~/helion/hlm/ansible$ echo $v3Token
gAAAAABVuAiDlGMBkqlrXQ1tl0Eg1lMQkm3ufCR2rtEKUb3EgqIEu9XebXdy1Xzj5CV9vj4Kc9aBm0Yhecuiyen0oHNa7o67BMb1_8bk6yLDOtnrGP8ZieX5B1Ug2xLDTS-mrBzmt_JY
stack@hLinux:~/helion/hlm/ansible$ curl -X GET -k -H "X-Subject-Token:111wrong$v3Token" -H "X-Auth-Token:admintoken" http://localhost:35357/v3/auth/tokens |python -mjson.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   114  100   114    0     0   6311      0 --:--:-- --:--:-- --:--:--  6705
{
    "error": {
        "code": 401,
        "message": "The request you have made requires authentication.",
        "title": "Unauthorized"
    }
}
stack@hLinux:~/helion/hlm/ansible$
{code}

v2:
{code}
Fernet token:
stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Subject-Token:$T" -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/token                        {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$
{code}


Test wtih UUID token:
{code}
stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
{"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$
{code}

** Affects: keystone
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1479154

Title:
  Invalid X-Subject-Token used to return 404 in uuid but now fernet
  respond with 401 error

Status in Keystone:
  New

Bug description:
  v3:
  {code}
  stack@hLinux:~/helion/hlm/ansible$  curl -X GET -k -H "X-Subject-Token:$v3Token" -H "X-Auth-Token:admintoken" http://localhost:35357/v3/auth/tokens |python -mjson.tool
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   296  100   296    0     0   4175      0 --:--:-- --:--:-- --:--:--  4228
  {
      "token": {
          "audit_ids": [
              "YxQb86AXSAaUUItKvbVJaA"
          ],
          "expires_at": "2015-07-29T02:56:03.000000Z",
          "extras": {},
          "issued_at": "2015-07-28T22:56:03.000000Z",
          "methods": [
              "password"
          ],
          "user": {
              "domain": {
                  "id": "default",
                  "name": "Default"
              },
              "id": "ad6769d740614259aafec4e0c16d5bc4",
              "name": "test"
          }
      }
  }
  stack@hLinux:~/helion/hlm/ansible$ echo $v3Token
  gAAAAABVuAiDlGMBkqlrXQ1tl0Eg1lMQkm3ufCR2rtEKUb3EgqIEu9XebXdy1Xzj5CV9vj4Kc9aBm0Yhecuiyen0oHNa7o67BMb1_8bk6yLDOtnrGP8ZieX5B1Ug2xLDTS-mrBzmt_JY
  stack@hLinux:~/helion/hlm/ansible$ curl -X GET -k -H "X-Subject-Token:111wrong$v3Token" -H "X-Auth-Token:admintoken" http://localhost:35357/v3/auth/tokens |python -mjson.tool
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
  100   114  100   114    0     0   6311      0 --:--:-- --:--:-- --:--:--  6705
  {
      "error": {
          "code": 401,
          "message": "The request you have made requires authentication.",
          "title": "Unauthorized"
      }
  }
  stack@hLinux:~/helion/hlm/ansible$
  {code}

  v2:
  {code}
  Fernet token:
  stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Subject-Token:$T" -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/token                        {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:/etc/init.d$
  {code}

  
  Test wtih UUID token:
  {code}
  stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$ curl -X GET -k -H "X-Auth-Token:admintoken" http://localhost:35357/v2.0/tokens/abbae8f2ca0a4ab0a58d545f84380518
  {"error": {"message": "Could not find token: abbae8f2ca0a4ab0a58d545f84380518", "code": 404, "title": "Not Found"}}stack@PADAWANBASE-CCP-T1-M1-NETCLM:~$
  {code}

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1479154/+subscriptions