elasticsearch添加自定义用户

添加用户和角色

curl  --insecure -u elastic:Transfar@2022 -XPOST 'https://192.168.30.149:9200/_security/user/esuer?pretty' -H 'Content-Type: application/json' -d '
{
    "password":"Transfar@2023",
    "roles" : ["superuser"]
}'


curl --insecure -u esuer:Transfar@2023 -XGET 'https://192.168.30.149:9200/_cat/indices?v&pretty'


curl --insecure -XGET -H 'Content-type: application/json' -u elastic:Transfar@2022 'https://192.168.30.149:9200/_xpack/security/role/superuser?pretty'
View Code

  kibana页面添加

     

      

      

       API创建用户

         

         

posted @ 2023-02-07 11:31  不懂123  阅读(252)  评论(0编辑  收藏  举报