-
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
[Security Solution] Remove index false from artifact saved objects mappings #155204
[Security Solution] Remove index false from artifact saved objects mappings #155204
Conversation
Pinging @elastic/security-defend-workflows (Team:Defend Workflows) |
@kevinlog if none of these fields were being indexed previously, I suspect that mapping most of them is unnecessary. Ideally, all of these fields would be removed from the mapping declaration entirely, and reflected in a schema elsewhere, but the tricky part of this issue is determining which fields are actively used, or may be used in the future (since the whole point is to prevent any non-additive changes in the future). For AET we're effectively removing all the |
Makes sense. I want @dasansol92 and @paul-tavares to take a look first before removing anything else. I ran a smoke test and it looked OK. Tests are running now. It looks like we have these represented in a schema here: https://github.com/elastic/kibana/blob/main/x-pack/plugins/security_solution/common/endpoint/schema/common.ts#L10 |
@@ -14,36 +14,31 @@ export const exceptionsArtifactSavedObjectType = ArtifactConstants.SAVED_OBJECT_ | |||
export const manifestSavedObjectType = ManifestConstants.SAVED_OBJECT_TYPE; | |||
|
|||
export const exceptionsArtifactSavedObjectMappings: SavedObjectsType['mappings'] = { | |||
dynamic: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this SO type (endpoint:user-artifact
) is actually one we no longer use and have an issue open to remove it (team issue 6214), so whatever changes you want to do here, you can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paul-tavares I went ahead and removed the SO here: 19d06c7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…-ref HEAD~1..HEAD --fix'
properties: { | ||
created: { | ||
type: 'date', | ||
index: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't see an explanation in the comments/PR so I'll ask here: why are we adding mappings for these fields, when they previously weren't needed? These mappings can be added at any point in the future, but this is our last opportunity to remove anything unnecessarily indexed (or specified to not be indexed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rylnd apologies - I was doing some smoke testing locally with the fields removed first. All looks OK, so I pushed up the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats Awesome - Thanks @kevinlog for removing that type.
…evinlog/kibana into task/remove-enabled-index-false-fields
Hi @TinaHeiligers - could I get one more review from kibana-core on this? I made some changes involving removing an SO since your initial review. Apologies for the changes, this went through a couple rounds of discussion with the team. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated code LGTM.
Thanks for cleaning up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes in saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces/mappings.json
LGTM
💚 Build Succeeded
Metrics [docs]Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Updates the mappings for the artifact saved objects
This effort is part of https://github.com/elastic/security-team/issues/6268 and https://github.com/elastic/dev/issues/2189