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

API to validate user access does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 0.18.0
    • 0.17.6
    • None

      There is an issue with the API used to validate user access in the DomainHandler class. When a correct request is made, the response includes this error message:

      {
          "message": "password does not match for username: admin",
          "details": null,
          "code": 500
      } 

      The problem is that the code is comparing the user's password with an encrypted password. More in attached image.

       

      Steps to reproduce:

      1) Start Karaf with:
      feature:install odl-netconf-topology odl-restconf-nb
      2) Validate default 'admin' user with request:

      curl --request POST 'http://localhost:8181/auth/v1/domains/sdn/users/roles' \
      --header 'Authorization: Basic YWRtaW46YWRtaW4=' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "username": "admin",
          "userpwd": "admin"
      }' 

      IMHO, providing a password for this request is unnecessary.

       

            yaroslav.lastivka Yaroslav Lastivka
            PeterSuna Peter Suna
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: