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

Repeated user creation fails with SQL query error

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • High
    • Resolution: Done
    • Nitrogen-SR1
    • Nitrogen-SR1
    • None

    Description

      While attempting to create user that allready exist trough http://localhost:8181/auth/v1/users

      following is showed

      { "message": "There was an internal error creating the user", "details": "org.opendaylight.aaa.h2.persistence.StoreException: SQL Exception : org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: \"PRIMARY_KEY_4D ON PUBLIC.USERS(USERID) VALUES ('test_user@xy', 3)\"; SQL statement:\ninsert into users (userid,domainid,name,email,password,description,enabled,salt) values(?,?,?,?,?,?,?,?) [23505-191]" }

       

      This is problem for two reasons

      1. This error is not exactly user friendly, all the user needs to know here is "You are attemtping to create allready existing user"
      2. And the more important, it directly exposes which schema/table contains user credentials.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rgoulding Ryan Goulding
            jsrnicek_cisco Jan Srnicek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: