Hi, I am running an Elasticsearch cluster with a Search Guard Scientific license.
The cluster is primarily used for log events. Up to now, daily indices were created like SERVICE-%{+YYYY.MM.dd} for example. Recently I converted all indices to data streams.
After migrating the existing indices to data streams, the existing Search Guard roles seem to be incompatible with the data streams.
On a test cluster, I have recreated following scenario for debugging purposes.
Despite this role a user can access both data streams with the following index pattern logstash-*.
Even an exclude_index_permissions setting for the data stream logstash-SERVICE2-default does not prevent this.
Also, without any configured index permissions (includes and excludes) I can access both data stream in Kibana and via the Elasticsearch REST APIs.
Is Search Guard unable to handle data streams?
I have not found anything about this in the documentation pages.
Hi, we have analyzed the issue. Since data streams are an X-Pack feature in Elasticsearch 7.x, we did not officially support them. However, we already changed the implementation for Search Guard FLX, so the behavior you are describing is not present anymore in FLX, which is available for 7.17.x and the upcoming FLX for 8.x (Latest Releases | Security for Elasticsearch | Search Guard).
Having said that, we are looking into ways to mitigate the behavior also for older versions of Search Guard and will keep you posted.
Hi, thank you for your reply! I didn’t know that data streams are a X-Pack feature. Where did you get that information from? I don’t see any hints on this on the documentation sites.
I’ve updated our dev cluster to Search Guard FLX and I can happily confirm that the update fixes the security problem. Once I finished testing all features I will migrate our prod cluster, so we can safely use data streams again.
One more small hint, after upgrading to FLX the built-in admin user is unable to see the data streams in the ‚Index Management‘ → ‚Data Streams‘ view in Kibana. There is no error messages, it simply says that there are no existing data streams. Calling the GET /_data_stream/ API also results in an empty response, but fetching a specific existing stream like GET /_data_stream/logstash-SERVICE1-default works. This is only a small problem, but it would simplify the handling of the data streams.