-
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
Research approach for event log when making rules and connectors share-capable #100666
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Marking as blocked until the research in #100067 confirms this is still necessary and with what requirements. |
The event log stores saved object ids in two ways:
Since the event log is probably our largest index, it doesn't seem feasible to do anything about the unstructured usage, as attempting to read each document individually, parse the ids out of the string, run the The structured usage is more feasible, but still doesn't seem possible at scale to run a single sweep migration across the entire index. The update_by_query api is a nice option to perform bulk updates, but I'm not sure we can use it as we'd need to know the resolved ID before running the query which we wouldn't know without running the Now, assuming it's not feasible to mass update/migrate the entire event log at startup, we might have other options. Outside of any external index searching, the only use case for the index is three separate internal calls to a single API endpoint:
It seems feasible to ensure those calls still work, even if provided an unresolved saved object id. The Overall, it seems we should focus on resolving structured ids at read time versus performing any kind of bulk migration of the entire index. If we wanted to pursue that though, perhaps it could be in the form of a one-off script to run versus anything that runs in Kibana automatically. For future writes, I don't we need to do much because #107070 should entail converting all |
Note: When resolving the saved object from the structured location, be sure to use the namespace field appropriately |
As a result of the research, I opened: |
I just happened to think - I wonder if we would want to resolve the id's of the SO's that are being returned from the event log queries. For example, a query could return events for a single rule, whose id changed over time. So the results would contain different SO id values, but they're really the same rule. Seems like a nice-to-have, if nothing else, just to provide a consistent response. But also sounds expensive, since we'd have to resolve each SO id available in the query results. So currently thinking no, we don't want to do that now - but we probably want to document this behavior in the event log "docs". |
Thanks for the thoughts @pmuellr. Do you think we should close both issues then as not something we're going to do? Or do you think there is any value in resolving the ids for the |
I'm reopening this as the original research needs to be adjusted based on some recent conversations between our team and the security team. |
We recently opened #108077 to address concerns around using the event log with both legacy and migrated saved object IDs. As a result, I don't know if we need to do anything here as a result. The event log, as is, should work if both sets of IDs are provided. I don't think we're providing much support for resolving IDs in public HTTP APIs so I don't think there is any work there either. @pmuellr WDYT? |
I think #108077 covers the event log aspects, so ya, think we're done. |
++! |
Event log research issue for #100067.
In 8.0, we plan to run a migration that removes the namespace from the saved-object serialized ID. To do so, new rule and connector IDs will be generated. With this issue, we should research the impacts this will have on the event log when documents reference old rule or connector IDs, draft a proposal and work / discuss with the @elastic/kibana-security if we need anything further from them to support this.
Note: We should also consider the data indices from RAC when coming up with a proposal. The implementation may be similar where one saved object relates to one or many documents. Here is a ticket for their work: #107161
The text was updated successfully, but these errors were encountered: