-
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
[hasDataService] Permissions issue #132478
Comments
Pinging @elastic/kibana-app-services (Team:AppServicesSv) |
Its frustrating that the resolve index api uses the privledges that it does (requiring I'd like to leave this in @shivindera 's hands - let me know if you need anything else to resolve this. |
I will add that check to hasESData service. Also, ES does not return any permission error or anything, it does a 500 (Internal Server Error) |
Looks like es does return permission error. This is how the error from es looks like in case there are no indices with
It seems like for a quick fix, we simply could handle this 403 and return
For a better, but more complex fix, I think we could leave resolveIndices API as the primary check, but we could handle that 403 and then fallback to search or fields caps API. I think on this point it is worse moving that service logic server-side |
|
My concern with using field caps - After mulling this over a bit, aside from how we fix this now I think we should request a change to the permissions for the resolve api. |
Since this is possibly turning into a larger architectural discussion and an issue we had been fighting with in the past, I'd like to put this on @stacey-gammon & @jportner 's radar and hopefully get their input on this as well. |
It seems riskier to switch to field caps, esp given @mattkime's concerns. For an immediate fix to resolve the blocker, I like @Dosant's suggestion of returning |
As for a longer-term solution, I think we should involve the ES team. Give them our requirements and see what they suggest for a solution! |
I am happy to discuss your requirements and get more context on the hasDataService. I agree that using field_caps for lack of a better API that requires the right permissions is not a good solution, or at least that is the mental summary I made while reading this issue and the related slack conversation. |
My concern with returning |
+1 I think we should try to fix this after FF. Thank you, all! |
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
I found this issue in my inbox due to recent notifications. I caught up on what it was about and noticed that the permission issue was fixed in Elasticsearch, see elastic/elasticsearch#87052 . |
Closing based on elastic/elasticsearch#87052 and the large number of changes that have happened to this service since this issue was created. |
Describe the bug:
When testing the new index
hasData
service, I have found two 3 permission issues. Two refer to when a user has no read index privileges.Scenario one:
read
access to 1 of the indices, but not to the other twofalse
and we will show a no data screen, thus blocking access to Discover. The user should be able to see the index they have access to.Scenario two:
false
and will show a no data screen. This is not as severe as a the first part (as from the user's standpoint there really is no data they could see), but it would be nice if the service would throw some sort of an error that we could leverage then to display an appropriate message.The third issue refers to a scenario where the user has
read
access to the index, butno view_index_metadata
privileges. In that case the user has no permissions to view if they have permissions 🤯 I am not sure what the expected scenario here is but apparently this is a valid use-case. It feels like we shouldn't be blocking users from the access to the index they have access to.Can we get the fix for this prioritized for 8.3.0? cc @shivindera
The text was updated successfully, but these errors were encountered: