Saved Object API calls that search for aliases can result in unhandled error #128282
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Saved Objects
Feature:Security/Sharing Saved Objects
Platform Security - Sharing Saved Objects feature
impact:needs-assessment
Product and/or Engineering needs to evaluate the impact of the change.
Team:Security
Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Kibana version:
8.0.0 - 8.1.1
Describe the bug:
This bug was introduced in #116007.
There are three occasions we search for legacy URL aliases of an object:
*
(all current and future spaces)We search for aliases in the first two situations to prevent a "legacy URL alias conflict" scenario.
We use KQL to search for aliases with a matching
sourceId
in this situation:kibana/src/core/server/saved_objects/service/lib/legacy_url_aliases/find_legacy_url_aliases.ts
Lines 69 to 82 in d8a1827
We also use KQL to search for aliases with a matching
targetId
when deleting a saved object that exists in*
(all current and future spaces):kibana/src/core/server/saved_objects/service/lib/legacy_url_aliases/delete_legacy_url_aliases.ts
Lines 65 to 68 in 4920ace
I discovered that the
buildNode
function throws an error when parsing any values that contain a:
character:This is a problem because saved object IDs can contain
:
characters, we have almost no validation on saved object IDs (see #105039)Steps to reproduce:
*
(all current and future spaces):The third scenario (deleting an object) is a bit different, the server catches and swallows the error so the client doesn't see it:
Expected behavior:
Searching for aliases shouldn't result in an error.
Any additional context:
This bug doesn't affect users because we don't have anything consumers that use these code paths in 8.0/8.1. But we need to get this fixed for 8.2 because data views are now shareable.
The text was updated successfully, but these errors were encountered: