legrego / homeassistant-elasticsearch

Publish Home-Assistant events to Elasticsearch
https://legrego.github.io/homeassistant-elasticsearch/
MIT License
143 stars 38 forks source link

We do not properly check for datastream write permissions #254

Closed strawgate closed 1 month ago

strawgate commented 1 month ago

We verify that the provided user can write to legacy index but not to the modern data stream.

If we simply update the check, it will break existing users until they update their API key or user role.

We previously could not split the check so it only checked for indices that would be in use because the authentication check happened before the user picked the indexing mode.

Now that we default to datastreams we can correctly check the users permissions so let's do that.