Unable to log in kibana with the created user

I followed the doc to create a new user: configuring-security
and I performed the following two requests

curl -XPOST -u elastic 'localhost:9200/_security/role/events_admin' -H "Content-Type: application/json" -d '{
 "indices" : [
{
  "names" : [ "events*" ],
  "privileges" : [ "all" ]
},
{
  "names" : [ ".kibana*" ],
  "privileges" : [ "manage", "read", "index" ]
}
]
}'

curl -XPOST -u elastic 'localhost:9200/_security/user/johndoe' -H "Content-Type: application/json" -d '
{
"password" : "userpassword",
"full_name" : "John Doe",
"email" : "john.doe@anony.mous",
"roles" : [ "events_admin" ]
}'

then I use it to login kibana,kibana display json info

 {
    statusCode: 403,
    error: "Forbidden",
    message: "Forbidden"
}

my question is why I could not log in kibana with this new user, What have I done less?

Similarly,I create another user by kibana interface


but the same error occured

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.