-
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
[Cloud Security] Fleet validation using the RequiredVars and CSPM showing validation errors #207130
Conversation
f0ff71d
to
ac695d2
Compare
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
20d2f56
to
1b4b330
Compare
Pinging @elastic/fleet (Team:Fleet) |
x-pack/solutions/security/plugins/cloud_security_posture/common/constants.ts
Outdated
Show resolved
Hide resolved
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.
🚀
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.
Fleet changes LGTM
a11c770
to
9c0eef5
Compare
💔 Build Failed
Failed CI StepsHistory
cc @seanrathier |
9c0eef5
to
647137d
Compare
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/13004762294 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…wing validation errors (elastic#207130) (cherry picked from commit bec72f0) # Conflicts: # x-pack/test/cloud_security_posture_functional/agentless/create_agent.ts
…PM showing validation errors (#207130) (#208545) # Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] Fleet validation using the RequiredVars and CSPM showing validation errors (#207130)](#207130) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"seanrathier","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-28T06:18:50Z","message":"[Cloud Security] Fleet validation using the RequiredVars and CSPM showing validation errors (#207130)","sha":"bec72f00ac2ccb3ee72661cdebbcc180b07f78f8","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v9.0.0","Team:Cloud Security","backport:prev-minor"],"title":"[Cloud Security] Fleet validation using the RequiredVars and CSPM showing validation errors","number":207130,"url":"https://github.com/elastic/kibana/pull/207130","mergeCommit":{"message":"[Cloud Security] Fleet validation using the RequiredVars and CSPM showing validation errors (#207130)","sha":"bec72f00ac2ccb3ee72661cdebbcc180b07f78f8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207130","number":207130,"mergeCommit":{"message":"[Cloud Security] Fleet validation using the RequiredVars and CSPM showing validation errors (#207130)","sha":"bec72f00ac2ccb3ee72661cdebbcc180b07f78f8"}}]}] BACKPORT-->
Summary
This change introduces the ability for integrations to validate dependent fields using the
required_vars
object in thepackage-spec
, for example, a username and password are both required fields. Additionally, we can check for a predetermined value in the required_vars.The validatePackageRequiredVars
validatePackagePolicy
function integrates withvalidatePackagePolicy
functions and adds the invalidrequired_vars
to thevalidationResults
object. Validating the required_vars is all dependent on the inputs.stream being enableWe have enhanced the CSPM integration to support required_vars, as such, since the CSPM integration is a custom Fleet extension and the behaviour is only one package policy stream can be enabled, the CSPM UI only needs to know if there are
required_vars
that are invalid to show the error state.Screen.Recording.2025-01-20.at.5.47.16.PM.mov
Follow Up
This solution primarily addresses the concerns for the CSPM integration and reads the
streams/input/vars
, a follow-up issue has been created to include anyvars
to validate required_vars and introduce Fleet native integration UI to show invalid fieldsDepends On
Related Issues
Checklist