homeassistant-elasticsearch icon indicating copy to clipboard operation
homeassistant-elasticsearch copied to clipboard

add elastic api key authentication

Open erikveg opened this issue 4 years ago • 3 comments

My elastic cloud requires an api key authentication.

Could you add this to the configuration and supply the elastic client with the api_key authentication header.

Thanks

erikveg avatar Aug 24 '21 13:08 erikveg

Thanks @erikveg I agree this would be useful. From a security perspective I think we should prefer an API Key over traditional username/password

legrego avatar Sep 02 '21 00:09 legrego

@erikveg,

Thinking about this a bit more: would you prefer to create the API Key yourself, and store that within this component (like we do with username/password today), or would you like this component to create one automatically, using the configured username/password?

I'm leaning towards the latter, as that, IMO, provides a superior user experience. This way we can automatically create an API Key with a minimal privilege set, which improves security and reduces the chance of user error.

legrego avatar Apr 27 '22 19:04 legrego

An automatically created api key is fine by me.

Thanks!

erikveg avatar Apr 28 '22 08:04 erikveg