RuntimeTools / appmetrics-elk

A connector that collects data using 'appmetrics' and sends it to ElasticSearch for use with Kibana
Apache License 2.0
29 stars 12 forks source link

working with ES Shield #21

Closed benyamindfring closed 7 years ago

benyamindfring commented 8 years ago

how can we make this work when Shield is enabled on ES?

tobespc commented 8 years ago

Hi @benyamindfring, we'll look in to that this week for you but just out of curiosity, are you using Shield with ES now and want to use appmetrics or is this something you are looking to move towards in the future ?

benyamindfring commented 8 years ago

Hi @tobespc ,thanks for the reply. I have several ES clusters. some are older (and without shield), and I use appmetrics-elk over there (and very happy with it!), and some already were upgraded to newer versions where we started to use Shield, thus getting an error from appmetric-elk as follows:

Error doing bulk update [security_exception] missing authentication token for REST request [/appmetrics/_bulk], with { header= } :: {"path":"/appmetrics/_bulk","query":{}, DATA_FOO_DATA_FOO_DATA_FOO_DATA_FOO\n","statusCode":401,"response":"{\"error\":{\"root_cause\":[{\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/appmetrics/_bulk]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\"shield\"\"}}],\"type\":\"security_exception\",\"reason\":\"missing authentication token for REST request [/appmetrics/_bulk]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\"shield\"\"}},\"status\":401}","wwwAuthenticateDirective":"Basic realm=\"shield\""}

tobespc commented 8 years ago

It looks like you can just configure your shield authentication as part of the elastic search configuration object that we already accept. https://www.elastic.co/guide/en/shield/current/reference.html