elasticfence / elasticsearch-http-user-auth

HTTP Basic Authentication and IP ACL plugin for Elasticsearch :key: (UNMAINTAINED)
http://qxip.net
148 stars 32 forks source link

Failing while creating a new user using elasticsearch-http-user-auth #66

Closed santhoshdevadiga closed 7 years ago

santhoshdevadiga commented 7 years ago

Hi I am not able to create a user using this plugin. I want to create a user per index so that index will be accessible only for that particular user.

Elasticsearch v 5.1.2 Elasticsearch-http-user-auth v5.1.2

Added configuration in elasticsearch.yml

elasticfence.disabled: false
elasticfence.root.password: rootpassword

Ran below commands to get the user list

curl -u root:rootpassword http://localhost:9200/_httpuserauth?mode=list []

For creating a user ran below commands but i got error

curl -u root:rootpassword http://localhost:9200/_httpuserauth?mode=adduser&username=admin&password=somepass [1] 28647 [2] 28648 [vagrant@localhost ~]$ User already exists : null

failure

Please help to solve this issue.

santhoshdevadiga commented 7 years ago

Ran below commands

curl -u root:rootpassword "http://localhost:9200/_httpuserauth?mode=adduser&username=admin&password=somepass"

instead of

curl -u root:rootpassword http://localhost:9200/_httpuserauth?mode=adduser&username=admin&password=somepass