[AAA-220] OpenStack Keystone Authentication Fails with 400 Bad Request Error Created: 10/Jan/22  Updated: 03/Apr/22  Resolved: 08/Feb/22

Status: Resolved
Project: aaa
Component/s: None
Affects Version/s: 0.13.0, 0.14.0, 0.14.8, 0.13.11
Fix Version/s: 0.14.9

Type: Bug Priority: Highest
Reporter: Shibu Vijayakumar Assignee: Shibu Vijayakumar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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"
     }
 }

 



 Comments   
Comment by Robert Varga [ 18/Feb/22 ]

Just a note, this was broken way back in https://git.opendaylight.org/gerrit/c/aaa/+/69585

Comment by Shibu Vijayakumar [ 03/Apr/22 ]

Issue Fix -  https://git.opendaylight.org/gerrit/c/aaa/+/99569

 

 

Generated at Wed Feb 07 19:08:57 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.