Skip to content

Identity Management tutorial - Keyrock user creation fails #34

Description

@MNXOnline

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

{
  "user": {
    "username": "admin2",
    "email": "admin2@test.com",
    "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": "admin2@test.com",
        "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 | admin2@test.com | 496e9b2dc2983e7496b541aea626e437cf4184d2 | 2020-09-22 11:49:36 |       1 |     0 | NULL  | NULL  |                   0 | NULL     | 2498261557aed56a |
+--------------------------------------+----------+-------------+---------+---------+----------+-----------------+------------------------------------------+---------------------+---------+-------+-------+-------+---------------------+----------+------------------+

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions