GetDataStreamAction with verbose: true
fails with an error that it tries to access .security
when executed as superuser
#117993
Labels
>bug
:Data Management/Data streams
Data streams and their lifecycles
Team:Data Management
Meta label for data/management team
v8.16.0
v9.0.0
Elasticsearch Version
8.16.0+
Problem Description
With #112973 we introduce the possibility to request a more verbose version of
GET _data_stream
. However, in certain cases it throws an authorisation error.The problem appears when:
GET _data_stream
request.security-7
The problem appears to be that using the wide access of the superuser, the resource resolution is very wide as well, including also the
.security-7
index which the_xpack
internal user does not have access.A potential fix could be to pass in the stats request the requested data stream names
getDataStreams(state, indexNameExpressionResolver, request)
, this does appear to work.Steps to Reproduce
Run elasticsearch with security enabled.
Ensure you have the
.security-7
index available.security*
indices exist, execute the "troubled" requestThe text was updated successfully, but these errors were encountered: