Create new Index Pattern from console

I use the Kibana API for this: https://www.elastic.co/guide/en/kibana/master/saved-objects-api-create.html
And it wok. But after installing plugin Searchguard , it don't work. Need autorization.
I try:

1)Authenticate against Kibana:

$ curl -XPOST -D- 'http://localhost:5601/api/v1/auth/login'
-c /tmp/sg_cookies
-H 'Content-Type: application/json'
-H 'kbn-xsrf: true'
-d '{"username":"user","password":"password"}'

2)Create an index pattern via the Kibana API:

$ curl -XPOST -D- 'http://localhost:5601/api/saved_objects/index-pattern'
-b /tmp/sg_cookies
-H 'Content-Type: application/json'
-H 'kbn-xsrf: true'
-d '{"attributes":{"title":"logstash-*","timeFieldName":"@timestamp"}}'

But Authenticate don't work(

Help me please, what am I doing wrong?

SearchGuard is not an Elastic-supported plugin. If you need support with SearchGuard you may want to post in their Google Group.

Ok, Thank you!

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