username: username.with.dots is not recognized by internalusers api

Hi,

https://localhost:9200/_searchguard/api/internalusers/x

{

“username”: "pankaj8@gmail.com",

“password”: “pankaj7”,

“roles”: [“sg_own_index”, “sg_monitor”]

}

Gives the following response

{

“status”: “error”,

“reason”: “Invalid configuration”,

“invalid_keys”: {

“keys”: “username”

}

}

We have email id as uuid which is used for login. We would like to create the same username in kibana. How to do it using search-guard? We should be able to modify the roles of that user using the PATCH apis.

Regards,

Pankaj

When asking questions, please provide the following information:

  • Search Guard and Elasticsearch version - ES 6.4.2 SG - 6.4.2-23.2

  • Installed and used enterprise modules, if any

  • JVM version and operating system version 1.8.0_121

  • Search Guard configuration files

  • Elasticsearch log messages on debug level

  • Other installed Elasticsearch or Kibana plugins, if any

You cannot create any tags in the yml file that have dots. There is an option in the internal users section for a “username” field that can.

Thanks Martin for the response. Actually I am following the same documentation as per which I have added a key named “username” in the body of the request. But the response of the api is Invalid key “username” which is contrary to the document. Appreciate your help here.

https://localhost:9200/_searchguard/api/internalusers/x

{

“username”: "pankaj8@gmail.com",

“password”: “pankaj7”,

“roles”: [“sg_own_index”, “sg_monitor”]

}

Response -

{

“status”: “error”,

“reason”: “Invalid configuration”,

“invalid_keys”: {

“keys”: “username”

}

···

On Wednesday, November 21, 2018 at 11:09:00 PM UTC+5:30, martin...@vualto.com wrote:

You cannot create any tags in the yml file that have dots. There is an option in the internal users section for a “username” field that can.

https://docs.search-guard.com/latest/internal-users-database

This indeed seems to be a bug in the REST API. The API should support the username attribute. Can you please open an issue on GitHub for this?

···

On Thursday, November 22, 2018 at 9:05:41 AM UTC+1, pankaj chand wrote:

Thanks Martin for the response. Actually I am following the same documentation as per which I have added a key named “username” in the body of the request. But the response of the api is Invalid key “username” which is contrary to the document. Appreciate your help here.

https://localhost:9200/_searchguard/api/internalusers/x

{

“username”: “pankaj8@gmail.com”,

“password”: “pankaj7”,

“roles”: [“sg_own_index”, “sg_monitor”]

}

Response -

{

“status”: “error”,

“reason”: “Invalid configuration”,

“invalid_keys”: {

“keys”: “username”

}

On Wednesday, November 21, 2018 at 11:09:00 PM UTC+5:30, martin...@vualto.com wrote:

You cannot create any tags in the yml file that have dots. There is an option in the internal users section for a “username” field that can.

https://docs.search-guard.com/latest/internal-users-database