NS Integrations results provider: avoid throwing when the user does not have superuser permissions #111094
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Navigational Search
Global search bar
Team:Fleet
Team label for Observability Data Collection Fleet team
In #110778 we discovered that when a plain user is using the navigational search, the
integrations
result provider throws an error, resulting on all the results not being displayed (effectively breaking the whole NS feature)#111093 addressed it, by catching potential errors from providers to allow the results from other providers to be properly returned.
However, in theory, this shouldn't be necessary. a NS result provider is supposed to work correctly for any kind of user. Potential ACL checks must remains an implementation detail, and not surface by throwing errors from the result observable.
We need to fix the
integrations
result provider to not emit errors when the user is not a superuser, either by performing a client-side authz check, or by catching the potential 403 returned by the server.Second thing is, this provider is performing an HTTP call to the backend.
It's stated in the plugin's readme that when possible, a server-side provider should be favored
Did we have any valid reason to implement a client-side provider instead of a server-side for
integrations
? From a quick look, it doesn't seem the case. If nothing blocks it, the provider should be migrated to the server-side.The text was updated successfully, but these errors were encountered: