-
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
[KPT] Kibana Persistence Toolkit design #102177
Comments
Pinging @elastic/kibana-core (Team:Core) |
cc @elastic/kibana-security @kobelb |
We had some discussion on Slack today about potential "soft deletion" of saved objects. This would allow us to implement a sort of Trash feature where an object gets permanently removed after a period of time (30 days?) A quick search turned up one such existing ER: #89564 |
Given that KPT is supposed to be a lower level wrapper than the SO APIs, I'd say the opposite to be honest 😅 . If I can see such soft deletion being a feature of a high-level API such as SOs, I personally don't think a low level wrapper such as KPT could and/or should hold such responsibilities. @rudolf wdyt? |
I tend to agree with @pgayvallet here: While I'm on board with the idea of soft deletes, and it seems like it would be a useful feature to implement, it does feel like a higher-level concern than the KPT and would probably make more sense as (yet another) addition to the existing SO APIs. But let's see what everyone else thinks 🙂 |
I think the important thing is that nothing in KPT might prevent us from implementing soft-deletes. Architecturally I agree it would be better in a layer higher than KPT. If KPT exposed scripted updates and scripted update by query then we would probably have the required building blocks to create fairly performant soft-deletes. |
This issue is a retranscription of the Kibana Persistence ToolKit (aka
KPT
) proposal that was initially presented during a company event.The main problems KPT is trying to solve are:
Some background
Why does Saved Objects need to restrict access to Elasticsearch features
script
(and others) is scaryThe consequences of having restricted Elasticsearch features
update_by_query
SOC.find
is a very limited/_search
KQL
) & aggregations hard to implementFeatures that could be used on other Kibana app-specific indices
Impacts of the limitations
The Kibana Persistence Toolkit
The goal of KPT is to provide a low level persistence API, that would support RBAC, Spaces and possibly Audit Logging, that would be leveraged by the SO implementation, and could also be used directly with app-specific indices.
Some characteristics of the KPT layer:
@elastic/elasticsearch
client signatures_search
API first, thatSOR.find
will useArchitecture changes
Saved Objects
App-specific indices
What KPT is not
alert.group.id
instead ofalert.attributes.group.id
Usage examples (non-final API)
Creating a scoped KPT client
Creating a custom security filter
During the transition period, an API will be added to allow consumers to create ES filters to apply security and spaces restriction. The API could look like
Note: The example is simplified here, the real API needs to handle a little more than that, such as multi-space support
The text was updated successfully, but these errors were encountered: