# Unable to authenticate user \[elastic\] for REST request

**URL:** <https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/323593>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [January 20, 2023, 1:03pm UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/323593 "2023-01-20T13:03:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vidvar](https://avatars.discourse-cdn.com/v4/letter/v/13edae/32.png) [@vidvar](https://discuss.elastic.co/u/vidvar)\
**Post date:** [January 20, 2023, 1:03pm UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/323593/1 "2023-01-20T13:03:56Z")

</div>

Hello @warkolm

Since few weeks, all of sudden, getting below while I am trying to curl to one of my elastic nodes. And latest data is not getting updated in Kibana dashboards.

Elastic search version is 7.8.0.

# curl --user USERNAME:PASSWORD -X GET "[http://localhost:8800/?pretty](http://localhost:8800/?pretty)"

{  
"error" : {  
"root\_cause" : [  
{  
"type" : "security\_exception",  
"reason" : "unable to authenticate user [elastic] for REST request [/?pretty]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type" : "security\_exception",  
"reason" : "**unable to authenticate user [elastic] for REST request** [/?pretty]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
},  
"status" : 401

Could you please suggest me on what should I do now?

Below is the Kibana.yml and elasticsearch.yml configurations.

**kibana.yml**

server.host: "HOSTNAME"  
server.basePath: "/kibana-prod"  
server.rewriteBasePath: true  
elasticsearch.hosts: ["[http://localhost:8800](http://localhost:8800/)", "[http://localhost:8900](http://localhost:8900/)", "[http://localhost:9000](http://localhost:9000/)"]  
path.data: /PATH/kibana/1/data  
logging.dest: /PATH/1/log/kibana.log  
logging.rotate.enabled: true  
logging.quiet: true

elasticsearch.username: "USERNAME"  
elasticsearch.password: "PASSWORD"

**elasticsearch.yml**

cluster.name: CLUSTERNAME  
node.name: prod-node-1  
cluster.initial\_master\_nodes:

- prod-node-1
- prod-node-2
- prod-node-3  
discovery.zen.minimum\_master\_nodes: 2  
node.master: true  
node.data: true  
path.data: /PATH/elasticsearch/1/lib  
path.logs: /PATH/elasticsearch/1/logs  
http.port: 8800  
bootstrap.memory\_lock: true

xpack.security.enabled: true  
xpack.security.authc.realms:  
native.native1:  
order: 0

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 17, 2023, 1:04pm UTC](https://discuss.elastic.co/t/unable-to-authenticate-user-elastic-for-rest-request/323593/2 "2023-02-17T13:04:18Z")

</div>

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