-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DataViews] GetIndices should allow me to get non-hidden indices #191931
Comments
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
I created a hidden index
and removed the when trying out if was not part of the returned list, so it might be sufficient to remove this check to get all non-hidden indices? |
Hmmm this gives me this list @ninoslavmiskovic are these indices safe to suggest? |
@kertal these are not being suggested in the Index management page so I am not expecting them to be suggested, right? |
They might be on Data Streams tab. |
I had another look at it, and it seems most of those are tagged this seems to be an alias for the following index:
which is appears to be a hidden index? I'm not sure if this alias should be displayed? In the Index Management, it is not findable? |
It should not be suggested if it is an alias to a hidden index. Can the api work like that? Display only indices / aliases that are not hidden (exactly as the Index management page behaves when the Include hidden indices switch is off) |
I took a look, but it seems to me, this is currently not supported. If a near term solution is needed a workaround would be for the consumer to filter out those alias to a hidden index. Something like first create a list of not-alias indices, then add alias that point to indices that can be found in the non-alias indices list |
@kertal I would like to avoid this in the client side, the api should handle this for performance reasons. So I will wait for this to be prioritized cc @ninoslavmiskovic |
I do agree that a server side solution is preferable 👍 |
++ on not doing it on the client side. I don't believe it is possible in ES to directly prevent users from creating aliases on hidden indices. However, as a user, it is possible to be able to control access to hidden indices and alias creation through role-based access control (RBAC). E.g Restrict Index Access:, Aliases Privilege (https://www.elastic.co/guide/en/elasticsearch/reference/current/securing-aliases.html#index-alias-privileges), Custom Roles, Index-Level Security: Especially the aliases' privileges are interesting I guess you are a super user @stratoula - perhaps that is why you are able to create aliases with hidden indices.? |
That is correct, we return all indices or datastreams and the pagination happens client side based on the |
@sabarasaba thx, this is very helpful! |
No 100% sure, but it might be the case that we are already using the same code under the hood, so in theory the hidden property "just" needs to be made available to the consumers in UI kibana/src/plugins/data_views/public/services/get_indices.ts Lines 43 to 60 in 628994e
FYI @mattkime (once back from PTO) |
No, thats not how it works and it seems rather purposeful. Our overall state of appropriately marking indices as hidden isn't very thorough - at this point we should be to rely on being marked hidden instead of the leading If aliases to hidden indices aren't hidden and should be, then the alias should be fixed. Aliases can be marked hidden independent of their underlying indices. |
End of the year, finally time to have a closer look here I did a quick POC how to simply filter out dot prefixed indices that are This would enable the selection of dot prefixed indices, that ain't alias, and can be tested here https://kertal-pr-205276-discover-esql-make-use-of-dot-prefixed-ind.kbndev.co/app/r/s/vFXr6 However this is just a workaround and I agree with @mattkime
So I think we should remove code that checks |
Describe the feature:
Not sure if this is a bug or a feature but is important for ES|QL.
We are suggestiing indices in the from command using this api
and then we mark them as hidden
if index.name.startsWith('.')
but this is wrong. Not all the indices starting with . are hidden so we need a way to receive all the non-hidden (system indices) and remove the wrong check for the dot.The text was updated successfully, but these errors were encountered: