tutorials.Step-by-Step icon indicating copy to clipboard operation
tutorials.Step-by-Step copied to clipboard

Identity Management tutorial - Keyrock user creation fails

Open MNXOnline opened this issue 5 years ago β€’ 0 comments

When creating a user with the following postman collecion payload in Keyrock:

{
  "user": {
    "username": "admin2",
    "email": "[email protected]",
    "password": "test",
    **"admin": true**
  }
}

the response received with status 201 Created is:

{
    "user": {
        "id": "f074c4d0-5b72-4155-9d12-34d92e6960b2",
        "image": "default",
        "gravatar": false,
        "enabled": true,
        "starters_tour_ended": false,
        "eidas_id": null,
        "username": "admin2",
        "email": "[email protected]",
        "salt": "2498261557aed56a",
        **"admin": true**,
        "date_password": "2020-09-22T11:49:36.932Z"
    }
}

but it is not stored in database as an sql query shows a 0 on that column:

| id                                   | username | description | website | image   | gravatar | email           | password                                 | date_password       | enabled | admin | extra | scope | starters_tour_ended | eidas_id | salt             |
+--------------------------------------+----------+-------------+---------+---------+----------+-----------------+------------------------------------------+---------------------+---------+-------+-------+-------+---------------------+----------+------------------+
| f074c4d0-5b72-4155-9d12-34d92e6960b2 | admin2   | NULL        | NULL    | default |        0 | [email protected] | 496e9b2dc2983e7496b541aea626e437cf4184d2 | 2020-09-22 11:49:36 |       1 |     0 | NULL  | NULL  |                   0 | NULL     | 2498261557aed56a |
+--------------------------------------+----------+-------------+---------+---------+----------+-----------------+------------------------------------------+---------------------+---------+-------+-------+-------+---------------------+----------+------------------+

MNXOnline avatar Sep 22 '20 11:09 MNXOnline