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

**URL:** <https://forum.search-guard.com/t/username-username-with-dots-is-not-recognized-by-internalusers-api/1203>\
**Category:** Search Guard\
**Created:** [November 21, 2018, 12:51pm UTC](https://forum.search-guard.com/t/username-username-with-dots-is-not-recognized-by-internalusers-api/1203 "2018-11-21T12:51:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankaj\_chand](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pankaj\_chand](https://forum.search-guard.com/u/pankaj_chand)\
**Post date:** [November 21, 2018, 12:51pm UTC](https://forum.search-guard.com/t/username-username-with-dots-is-not-recognized-by-internalusers-api/1203/1 "2018-11-21T12:51:31Z")

</div>

Hi,

[https://localhost:9200/\_searchguard/api/internalusers/x](https://localhost:9200/_searchguard/api/internalusers/x)

{

“username”: “[pankaj8@gmail.com](mailto: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

---

<div class="post-metadata">

**Author:** ![Martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Martin](https://forum.search-guard.com/u/Martin)\
**Post date:** [November 21, 2018, 5:38pm UTC](https://forum.search-guard.com/t/username-username-with-dots-is-not-recognized-by-internalusers-api/1203/2 "2018-11-21T17:38:59Z")

</div>

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.

> **[Internal users database](https://docs.search-guard.com/latest/internal-users-database)**
>
> How to store and manage Search Guard users directly in Elasticsearch by using the Internal Users Database.

---

<div class="post-metadata">

**Author:** ![pankaj\_chand](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@pankaj\_chand](https://forum.search-guard.com/u/pankaj_chand)\
**Post date:** [November 22, 2018, 8:05am UTC](https://forum.search-guard.com/t/username-username-with-dots-is-not-recognized-by-internalusers-api/1203/3 "2018-11-22T08:05:40Z")

</div>

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](https://localhost:9200/_searchguard/api/internalusers/x)

{

“username”: “[pankaj8@gmail.com](mailto: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](mailto: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](https://docs.search-guard.com/latest/internal-users-database)

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [November 26, 2018, 10:27am UTC](https://forum.search-guard.com/t/username-username-with-dots-is-not-recognized-by-internalusers-api/1203/4 "2018-11-26T10:27:08Z")

</div>

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?

> **[Issues · floragunncom/search-guard](https://github.com/floragunncom/search-guard/issues)**
>
> Search Guard Plugin - Security for Elasticsearch. Contribute to floragunncom/search-guard development by creating an account on GitHub.

> **···**
>
> 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](https://localhost:9200/_searchguard/api/internalusers/x)
> 
> > {
> 
> > “username”: “[pankaj8@gmail.com](mailto: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](mailto: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](https://docs.search-guard.com/latest/internal-users-database)
