Skip to content
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] Support is_default property for deployment_modes dropdown in agentless integrations #205761

Closed
kpollich opened this issue Jan 7, 2025 · 2 comments · Fixed by #208284
Closed
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@kpollich
Copy link
Member

kpollich commented Jan 7, 2025

Blocked by elastic/package-spec#850
Blocked by elastic/package-registry#1263

Use the is_default property for a given deployment_mode in a package manifest to determine which deployment mode option should be selected by default in the "setup technology selector" dropdown when configuring an agentless integration.

See elastic/package-spec#850 (comment) for more context.

@botelastic botelastic bot added the needs-team Issues missing a team label label Jan 7, 2025
@kpollich kpollich added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 7, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 7, 2025
@kpollich kpollich assigned kpollich and unassigned kpollich Jan 7, 2025
@seanrathier
Copy link
Contributor

I implemented the solution for defaulting to agentless in our CSPM Fleet extension. To minimize drift between the Fleet platform and Fleet extensions, I designed a solution that should require minimal functional changes. We should only need to check if the integration package has the is_default deployment here 🤞.

jen-huang added a commit to jen-huang/kibana that referenced this issue Jan 28, 2025
…08284)

## Summary

Resolves elastic#205761
Resolves elastic/security-team#10712

This PR adds support for `is_default` property for integration
deployment modes, so that if an integration declares agentless to be the
default deployment mode, the policy editor will select `Agentless` by
default when adding it:

<img width="1422" alt="image"
src="https://github.com/user-attachments/assets/74c7c8fa-2df9-4e03-bb2b-aa192927aa6d"
/>

## Testing

1. Check out `integrations` repo
2. Apply
[cspm-patch.diff](https://gist.github.com/jen-huang/8574262ea2e5fb8b1c3a134d2b4263d5)
3. In `packages/cloud_security_posture/`, run `elastic-package build`
(or ask Jen for the built .zip if you have trouble 😉)
4. Upload the built package in Kibana at
`/app/integrations/create/upload`
5. Go to Integrations > search for CSPM > Add integration
6. Observe that Advanced options > Setup technology dropdown defaults to
Agentless and agent policy selection is not offered
7. Go back to Integrations > search for Security Posture Management
(parent of CSPM) > Add integration
8. Observe that CSPM is selected by default with Agentless mode selected
by default as well

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

(cherry picked from commit 2d3fc93)

# Conflicts:
#	x-pack/platform/plugins/shared/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.ts
jen-huang added a commit that referenced this issue Jan 29, 2025
…8284) (#208599)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[UII] Support &#x60;is_default&#x60; on integration deployment modes
(#208284)](#208284)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jen
Huang","email":"its.jenetic@gmail.com"},"sourceCommit":{"committedDate":"2025-01-28T08:26:03Z","message":"[UII]
Support `is_default` on integration deployment modes (#208284)\n\n##
Summary\n\nResolves #205761\nResolves
https://github.com/elastic/security-team/issues/10712\n\nThis PR adds
support for `is_default` property for integration\ndeployment modes, so
that if an integration declares agentless to be the\ndefault deployment
mode, the policy editor will select `Agentless` by\ndefault when adding
it:\n\n<img width=\"1422\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/74c7c8fa-2df9-4e03-bb2b-aa192927aa6d\"\n/>\n\n##
Testing\n\n1. Check out `integrations` repo\n2.
Apply\n[cspm-patch.diff](https://gist.github.com/jen-huang/8574262ea2e5fb8b1c3a134d2b4263d5)\n3.
In `packages/cloud_security_posture/`, run `elastic-package build`\n(or
ask Jen for the built .zip if you have trouble 😉)\n4. Upload the built
package in Kibana at\n`/app/integrations/create/upload`\n5. Go to
Integrations > search for CSPM > Add integration\n6. Observe that
Advanced options > Setup technology dropdown defaults to\nAgentless and
agent policy selection is not offered\n7. Go back to Integrations >
search for Security Posture Management\n(parent of CSPM) > Add
integration\n8. Observe that CSPM is selected by default with Agentless
mode selected\nby default as well\n\n### Checklist\n\nCheck the PR
satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"2d3fc93e74880728a86063884ab6949353b08dca","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","v9.0.0","backport:prev-minor"],"title":"[UII]
Support `is_default` on integration deployment
modes","number":208284,"url":"https://github.com/elastic/kibana/pull/208284","mergeCommit":{"message":"[UII]
Support `is_default` on integration deployment modes (#208284)\n\n##
Summary\n\nResolves #205761\nResolves
https://github.com/elastic/security-team/issues/10712\n\nThis PR adds
support for `is_default` property for integration\ndeployment modes, so
that if an integration declares agentless to be the\ndefault deployment
mode, the policy editor will select `Agentless` by\ndefault when adding
it:\n\n<img width=\"1422\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/74c7c8fa-2df9-4e03-bb2b-aa192927aa6d\"\n/>\n\n##
Testing\n\n1. Check out `integrations` repo\n2.
Apply\n[cspm-patch.diff](https://gist.github.com/jen-huang/8574262ea2e5fb8b1c3a134d2b4263d5)\n3.
In `packages/cloud_security_posture/`, run `elastic-package build`\n(or
ask Jen for the built .zip if you have trouble 😉)\n4. Upload the built
package in Kibana at\n`/app/integrations/create/upload`\n5. Go to
Integrations > search for CSPM > Add integration\n6. Observe that
Advanced options > Setup technology dropdown defaults to\nAgentless and
agent policy selection is not offered\n7. Go back to Integrations >
search for Security Posture Management\n(parent of CSPM) > Add
integration\n8. Observe that CSPM is selected by default with Agentless
mode selected\nby default as well\n\n### Checklist\n\nCheck the PR
satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"2d3fc93e74880728a86063884ab6949353b08dca"}},"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/208284","number":208284,"mergeCommit":{"message":"[UII]
Support `is_default` on integration deployment modes (#208284)\n\n##
Summary\n\nResolves #205761\nResolves
https://github.com/elastic/security-team/issues/10712\n\nThis PR adds
support for `is_default` property for integration\ndeployment modes, so
that if an integration declares agentless to be the\ndefault deployment
mode, the policy editor will select `Agentless` by\ndefault when adding
it:\n\n<img width=\"1422\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/74c7c8fa-2df9-4e03-bb2b-aa192927aa6d\"\n/>\n\n##
Testing\n\n1. Check out `integrations` repo\n2.
Apply\n[cspm-patch.diff](https://gist.github.com/jen-huang/8574262ea2e5fb8b1c3a134d2b4263d5)\n3.
In `packages/cloud_security_posture/`, run `elastic-package build`\n(or
ask Jen for the built .zip if you have trouble 😉)\n4. Upload the built
package in Kibana at\n`/app/integrations/create/upload`\n5. Go to
Integrations > search for CSPM > Add integration\n6. Observe that
Advanced options > Setup technology dropdown defaults to\nAgentless and
agent policy selection is not offered\n7. Go back to Integrations >
search for Security Posture Management\n(parent of CSPM) > Add
integration\n8. Observe that CSPM is selected by default with Agentless
mode selected\nby default as well\n\n### Checklist\n\nCheck the PR
satisfies following conditions. \n\nReviewers should verify this PR
satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"2d3fc93e74880728a86063884ab6949353b08dca"}}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants