-
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
[saved objects][pit finder] Add support for multiple namespaces. #99044
Comments
Pinging @elastic/kibana-core (Team:Core) |
You lost me. How is that specific to the multi-namespaces enhancement? |
It's not just you. I typed this issue up very quickly earlier as I was moving on to something else, and now I'm re-reading and the wording doesn't make sense to me either. 😂 The problem I had in mind was around any authz issues that could arise from the relationship between types & namespaces ( These are questions that could be resolved in a PR w/ the security team's input, just wanted to mention them here as I haven't yet thought through all of the possible implications. I'll update the issue description to be a bit clearer. |
I see the concerns with querying different Maybe that's changed since the last time I checked? |
kibana/src/core/server/saved_objects/service/lib/search_dsl/query_params.test.ts Lines 387 to 405 in 4584a8b
So the question I had in mind was, would it be possible for the I think as long as someone is using the PIT finder, the answer to this is "no" as it requires the same configuration to be passed which is used in both opening the PIT and calling But if someone isn't using the PIT finder and is directly using The possible answers I see to this are:
Option 2 feels simplest to me, but there may be a gaping hole in my understanding here, so I'd defer to @elastic/kibana-security for input and clarification 🙂 |
From a security standpoint, To me the real question comes down to: do we want to open a PIT against types the user isn't authorized to query? Ideally no, as I expect there is overhead involved in doing so on the ES side. If I'm thinking about this correctly, all we'd have to do to support Option 1 above is to open the PIT against only those types which appear in the |
@legrego That makes sense, so in secure SOC wrapper we'd need to build the I think that's pretty straightforward then, as namespace support would really just happen as a side effect. EDIT: Issue description updated to reflect this approach. Folks feel free to chime in if anything seems amiss. |
This is also a blocker for the multi-NS export (#91615), as |
When we originally added support for using
savedObjectsClient.find
with an Elasticsearch point-in-time (PIT), we decided to defer adding support for multiple namespaces until we had a concrete need for it.With some of the recent refactoring around visualization usage collectors, this need has come up again.
To do this, we'd need to:
soRepository.openPointInTimeForType
to handlenamespaces
andtypeToNamespacesMap
in the same way asfind
(including the runtime checks for making sure you don't try to provide both)openPointInTimeForType
to perform a privilege check and build the namespaces map to provide to the base repositorypit
withnamespaces
from secure SOC wrapperfind
soClient.createPointInTimeFinder
will need to ensure thetypeToNamespacesMap
is handed off when callingopenPointInTimeForType
createPointInTimeFinder
Blocks #99031, #99023, #98914, #98903, #91615
The text was updated successfully, but these errors were encountered: