-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Fleet] Fix package policy validation #123153
[Fleet] Fix package policy validation #123153
Conversation
Pinging @elastic/fleet (Team:Fleet) |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @nchaulet |
I think the API should not accept an invalid policy, are you saying that will be fixed in the next pr? |
Yes I want to add the API validation in a separate PR so it's easily revert-able if this cause new bugs. |
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
(cherry picked from commit e721b2b)
(cherry picked from commit e721b2b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Hi @nchaulet We have attempted to validate above changes using API shared above on 8.0 selfmanged env. On hitting the API, we observed below errors shared in screenshot: Further, when we attempted to add Auditd integration with missing values to default policy, observed only two errors for path and Tags. However, we didn't observed any error on enabling preserve original event as shared in above screenshot in ticket summary. Could you please let us know if we are missing anything. We also observed same behavior on cloud while adding Auditd integration with missing values. Thanks |
Summary
Part of #122679
Improve package policy validation to use variable definition from the package instead of the one provided by the user.
Improve the UI to no crash in case an invalidate package policy is here to allow user to fix it.
In a following PR I will add the package policy validation to the create and update package policy API where we do not validate the user provided info against the package.
How to test