Uploaded image for project: 'aaa'
  1. aaa
  2. AAA-220

OpenStack Keystone Authentication Fails with 400 Bad Request Error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Highest Highest
    • 0.14.9
    • 0.13.0, 0.14.0, 0.14.8, 0.13.11
    • None
    • None

      OpenStack Keystone Authentication Fails with 400 Bad Request Error

      ODL fails to send correct Request payload, 

      parameter: 
      "methods": ["password"],
      is missing in the payload generated by ODL code
       
      Class to be Fixed: aaa\aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/keystone/domain/KeystoneAuth.java

      Keystone API EndPoint:  /v3/auth/tokens [POST]

      Expected Payload:

       {
          "auth":{
             "identity":{
                "methods": ["password"],
                "password":{
                   "user":{
                      "name":"admin",
                      "password":"admin",
                      "domain":{
                         "name":"Domain"
                      }
                  }
                }
             },
             "scope":{
                "domain":{
                   "name":"Domain"
                }
            }
          }
       }
      

      Request Send From ODL:

       {
          "auth":{
             "identity":{
                "password":{
                   "user":{
                      "name":"admin",
                      "password":"admin",
                      "domain":{
                         "name":"Domain"
                      }
                  }
                }
             },
             "scope":{
                "domain":{
                   "name":"Domain"
                }
            }
          }
       }
      

       
      Error: 

       {
           "error": {
               "code": 400,
               "message": "Invalid input for field 'identity''methods' is a required property\n\nFailed validating 'required' in schema['properties']['identity']:\n    {'properties': {'methods': {'items': 
      
      {'type''string'}
      
      ,\n                                'type''array'},\n                    'password': {'properties': {'user': {'properties': {'domain': {'properties': {'id': 
      
      {'type''string'}
      
      ,\n                                                                                                  'name': \{'type''string'}},\n                                                                                   'type''object'},\n                                                                        'id': \{'type''string'},\n                                                                        'name': \{'type''string'},\n                                                                        'password': \{'type''string'}},\n                                                         'type''object'}},\n                                 'type''object'},\n                    'token': \{'properties': {'id': {'type''string'}},\n                              'required': ['id'],\n                              'type''object'}},\n     'required': ['methods'],\n     'type''object'}\n\nOn instance['identity']:\n    {'password': {'user': {'domain': 
      
      {'name''Domain'}
      
      ,\n                           'name''admin',\n                           'password''admin'}}}",
               "title""Bad Request"
           }
       }
      

       

            shibu.vijayakumar Shibu Vijayakumar
            shibu.vijay Shibu Vijayakumar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: