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

[Cloud Security] Agentless integration deletion flow #191557

Conversation

Omolola-Akinleye
Copy link
Contributor

@Omolola-Akinleye Omolola-Akinleye commented Aug 27, 2024

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.
This PR is completes the deletion flow for Agentless CSPM.

Current Agentless Integraton deletion flow:

  1. Successfully delete integration policy
  2. Successfully unenrolls agent from agent policy
  3. Successfully revokes enrollment token
  4. Successfully deletes agentless deployment
  5. Successfully deletes agent policy
  6. Successful notification shows when deleted integration policy is successful

Agentless Agent API

  • Unenrolls agent and revokes token first to avoid 404 save object client error.
  • Update is_managed property to no longer check for agentPolicy.supports_agentless. Agentless policies will now be a regular policy.
  • Adds logging for DELETE agentless Agent API endpoint
  • Adds agentless API deleteendpoint using try & catch. No errors will be thrown. Agent status will become offline after deployment deletion
  • If agentless deployment api fails, then we will continue to delete the agent policy

UI Changes

CSPM Integration

  • Updates Agent Policy Error toast notification title
  • Updates Agent Policy Error toast notification message
image

Edit Mode

  • Adds back the Agentless selector in Edit Integration
image

Integration Policies Page

  • Removes automatic navigation to agent policies page when deleting an integration. In 8.17, we have a ticket to hide the agentless agent policies.
  • Enables delete button when deleting package policy with agents for agentless policies
  • Disables Upgrade Action
  • Removes Add Agent Action
image image

Agent Policies Page

  • Updates messaging when deleting the agentless policy from agent policy page. Warning users that deleting agentless policy will also delete the integration and unenroll agent.
  • Enables delete button when deleting agentless policy with agents for agentless policies
  • Removes Add agent menu action
  • Removes Upgrade policy menu action
  • Removes Uninstall agent action
  • Removes Copy policy menu action
image image

Agent Policy Settings
For agent policy that are agentless, we disabled the following fleet actions:

  • Disables Agent monitoring
  • Disables Inactivity timeout
  • Disables Fleet Server
  • Disables Output for integrations
  • Disables Output for agent monitoring
  • Disables Agent binary download
  • Disables Host name format
  • Disables Inactive agent unenrollment timeout
  • Disables Advanced Settings - Limit CPU usage
  • Disables HTTP monitoring endpoint
  • Disables Agent Logging
image image

Agents Page

  • Disables Assign to Policy action
  • Disables Upgrade Policy action
  • Removes Unassign agent action
  • Removes agentless policies where user can add agent to agentless policy
image image

How to test in Serverless

Use vault access and open the security Project in [build
](Buildkite Build)

Checklist

@Omolola-Akinleye Omolola-Akinleye self-assigned this Aug 27, 2024
@Omolola-Akinleye Omolola-Akinleye added v8.16.0 ci:cloud-deploy Create or update a Cloud deployment labels Aug 27, 2024
@Omolola-Akinleye Omolola-Akinleye linked an issue Aug 27, 2024 that may be closed by this pull request
1 task
@opauloh
Copy link
Contributor

opauloh commented Aug 28, 2024

/ci

@opauloh opauloh added the ci:project-deploy-security Create a Security Serverless Project label Aug 28, 2024
@Omolola-Akinleye Omolola-Akinleye added ci:project-deploy-security Create a Security Serverless Project and removed ci:project-redeploy Always create a new Cloud project labels Sep 24, 2024
Copy link
Contributor

@seanrathier seanrathier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! This was more challenging than I thought it would be.

@Omolola-Akinleye Omolola-Akinleye changed the title [Cloud Security] Agentless integration deletion flow [Cloud Security] Agentless integration deletion flow Sep 26, 2024
{agentPolicy?.supports_agentless ? (
<FormattedMessage
id="xpack.fleet.deleteAgentPolicy.confirmModal.affectedAgentlessMessage"
defaultMessage="Deleting this agent policy will automatically delete integrations assign to {name} and unenroll elastic agent."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
defaultMessage="Deleting this agent policy will automatically delete integrations assign to {name} and unenroll elastic agent."
defaultMessage="Deleting this agent policy will automatically delete integrations assigned to {name} and unenroll elastic agent."

!packagePolicy.hasUpgrade ||
!canWriteIntegrationPolicies ||
!upgradePackagePolicyHref ||
agentPolicy?.supports_agentless === true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning behind disabling upgrade action for agentless?

Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@criamico criamico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small comment, otherwise LGTM

@@ -57,6 +57,12 @@ export class AgentlessAgentCreateError extends FleetError {
}
}

export class AgentlessPackagePolicyRequestError extends FleetError {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: FleetError usually represents a 500. Since this error is used in the agent policy service, shouldn't be a different error? Maybe a 409 conflict. We usually define them here

@kibana-ci
Copy link
Collaborator

kibana-ci commented Oct 1, 2024

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.7MB 1.7MB +2.1KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 171.2KB 171.3KB +63.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @Omolola-Akinleye

@Omolola-Akinleye Omolola-Akinleye merged commit 6742f77 into elastic:main Oct 1, 2024
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11131418584

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 1, 2024
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
This PR is completes the deletion flow for  Agentless CSPM.

**Current Agentless Integraton deletion flow**:

1. Successfully delete integration policy
2. Successfully unenrolls agent from agent policy
3. Successfully revokes enrollment token
4. Successfully deletes agentless deployment
5. Successfully deletes agent policy
6. Successful notification shows when deleted integration policy is
successful

## Agentless Agent API
- Unenrolls agent and revokes token first to avoid 404 save object
client error.
- Update `is_managed` property to no longer check for
`agentPolicy.supports_agentless`. Agentless policies will now be a
regular policy.
- Adds logging for DELETE  agentless Agent API endpoint
- Adds agentless API deleteendpoint using try & catch. No errors will be
thrown. Agent status will become offline after deployment deletion
- If agentless deployment api fails, then we will continue to delete the
agent policy

## UI Changes

**CSPM Integration**
- Updates  Agent Policy Error toast notification title
- Updates Agent Policy Error toast notification message

<img width="1612" alt="image"
src="https://github.com/user-attachments/assets/0003ce04-c53c-4e11-8363-ddc25ba342a7">

**Edit Mode**
- Adds back the Agentless selector in Edit Integration

<img width="1316" alt="image"
src="https://github.com/user-attachments/assets/0d2f20ce-32fc-421c-a15a-48ca6226b67f">

**Integration Policies Page**
- Removes automatic navigation to agent policies page when deleting an
integration. In 8.17, we have a ticket to [hide the agentless agent
policies.](elastic/security-team#9857)
- Enables delete button when deleting package policy with agents for
agentless policies
- Disables Upgrade Action
- Removes Add Agent Action

<img width="1717" alt="image"
src="https://github.com/user-attachments/assets/1b7ac4c7-e8bc-41b8-836f-4d3c79a449dd">

<img width="670" alt="image"
src="https://github.com/user-attachments/assets/0ab6a4c4-d7c6-43ea-9537-67e7fbcca2b0">

**Agent Policies Page**
- Updates messaging when deleting the agentless policy from agent policy
page. Warning users that deleting agentless policy will also delete the
integration and unenroll agent.
- Enables delete button when deleting agentless policy with agents for
agentless policies
- Removes Add agent menu action
- Removes Upgrade  policy menu action
- Removes Uninstall agent action
- Removes Copy policy menu action

<img width="1595" alt="image"
src="https://github.com/user-attachments/assets/2f195da2-4594-4f54-8f8d-7995e829a5ac">
<img width="1365" alt="image"
src="https://github.com/user-attachments/assets/4915642d-41e8-4e83-80f9-f334cb879506">

**Agent Policy Settings**
For agent policy that are agentless, we disabled the following [fleet
actions:](https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-types)
- Disables Agent monitoring
- Disables Inactivity timeout
- Disables Fleet Server
- Disables Output for integrations
- Disables Output for agent monitoring
- Disables Agent binary download
- Disables Host name format
- Disables Inactive agent unenrollment timeout
- Disables Advanced Settings  - Limit CPU usage
- Disables HTTP monitoring endpoint
- Disables Agent Logging

<img width="1569" alt="image"
src="https://github.com/user-attachments/assets/2639be9f-ea10-4d42-b379-a13c4c2b08a1">
<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/ae6f3e10-8c2b-42fe-8f27-7e8621d373c0">

**Agents Page**

- Disables Assign to Policy action
- Disables Upgrade Policy action
- Removes Unassign agent action
- Removes agentless policies where user can add agent to agentless
policy

<img width="1710" alt="image"
src="https://github.com/user-attachments/assets/61bf2d06-d337-45dd-8255-499db1e1ed42">
<img width="1723" alt="image"
src="https://github.com/user-attachments/assets/cc76787f-d6a2-44fb-9289-7f1f643620ec">

### How to test in Serverless
 Use vault access and open the security Project in [build
]([Buildkite
Build](https://buildkite.com/elastic/kibana-pull-request/builds/234438))

### Checklist
- [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

(cherry picked from commit 6742f77)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 1, 2024
…194629)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] Agentless integration deletion flow
(#191557)](#191557)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT
[{"author":{"name":"Lola","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-01T18:38:07Z","message":"[Cloud
Security] Agentless integration deletion flow (#191557)\n\n##
Summary\r\n\r\nSummarize your PR. If it involves visual changes include
a screenshot or\r\ngif.\r\nThis PR is completes the deletion flow for
Agentless CSPM.\r\n\r\n**Current Agentless Integraton deletion flow**:
\r\n\r\n1. Successfully delete integration policy\r\n2. Successfully
unenrolls agent from agent policy \r\n3. Successfully revokes enrollment
token\r\n4. Successfully deletes agentless deployment\r\n5. Successfully
deletes agent policy \r\n6. Successful notification shows when deleted
integration policy is\r\nsuccessful\r\n\r\n\r\n## Agentless Agent API
\r\n- Unenrolls agent and revokes token first to avoid 404 save
object\r\nclient error.\r\n- Update `is_managed` property to no longer
check for\r\n`agentPolicy.supports_agentless`. Agentless policies will
now be a\r\nregular policy.\r\n- Adds logging for DELETE agentless Agent
API endpoint \r\n- Adds agentless API deleteendpoint using try & catch.
No errors will be\r\nthrown. Agent status will become offline after
deployment deletion\r\n- If agentless deployment api fails, then we will
continue to delete the\r\nagent policy\r\n\r\n## UI
Changes\r\n\r\n**CSPM Integration** \r\n- Updates Agent Policy Error
toast notification title \r\n- Updates Agent Policy Error toast
notification message \r\n\r\n<img width=\"1612\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0003ce04-c53c-4e11-8363-ddc25ba342a7\">\r\n\r\n**Edit
Mode**\r\n- Adds back the Agentless selector in Edit
Integration\r\n\r\n<img width=\"1316\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0d2f20ce-32fc-421c-a15a-48ca6226b67f\">\r\n\r\n**Integration
Policies Page**\r\n- Removes automatic navigation to agent policies page
when deleting an\r\nintegration. In 8.17, we have a ticket to [hide the
agentless
agent\r\npolicies.](https://github.com/elastic/security-team/issues/9857)\r\n-
Enables delete button when deleting package policy with agents
for\r\nagentless policies\r\n- Disables Upgrade Action\r\n- Removes Add
Agent Action\r\n\r\n<img width=\"1717\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1b7ac4c7-e8bc-41b8-836f-4d3c79a449dd\">\r\n\r\n<img
width=\"670\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0ab6a4c4-d7c6-43ea-9537-67e7fbcca2b0\">\r\n\r\n\r\n**Agent
Policies Page**\r\n- Updates messaging when deleting the agentless
policy from agent policy\r\npage. Warning users that deleting agentless
policy will also delete the\r\nintegration and unenroll agent.\r\n-
Enables delete button when deleting agentless policy with agents
for\r\nagentless policies\r\n- Removes Add agent menu action\r\n-
Removes Upgrade policy menu action\r\n- Removes Uninstall agent
action\r\n- Removes Copy policy menu action\r\n\r\n<img width=\"1595\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2f195da2-4594-4f54-8f8d-7995e829a5ac\">\r\n<img
width=\"1365\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/4915642d-41e8-4e83-80f9-f334cb879506\">\r\n\r\n\r\n**Agent
Policy Settings**\r\nFor agent policy that are agentless, we disabled
the following
[fleet\r\nactions:](https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-types)\r\n-
Disables Agent monitoring\r\n- Disables Inactivity timeout\r\n- Disables
Fleet Server\r\n- Disables Output for integrations\r\n- Disables Output
for agent monitoring\r\n- Disables Agent binary download\r\n- Disables
Host name format\r\n- Disables Inactive agent unenrollment timeout \r\n-
Disables Advanced Settings - Limit CPU usage\r\n- Disables HTTP
monitoring endpoint\r\n- Disables Agent Logging\r\n\r\n<img
width=\"1569\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2639be9f-ea10-4d42-b379-a13c4c2b08a1\">\r\n<img
width=\"1517\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ae6f3e10-8c2b-42fe-8f27-7e8621d373c0\">\r\n\r\n**Agents
Page**\r\n\r\n- Disables Assign to Policy action\r\n- Disables Upgrade
Policy action\r\n- Removes Unassign agent action\r\n- Removes agentless
policies where user can add agent to agentless\r\npolicy\r\n\r\n<img
width=\"1710\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/61bf2d06-d337-45dd-8255-499db1e1ed42\">\r\n<img
width=\"1723\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/cc76787f-d6a2-44fb-9289-7f1f643620ec\">\r\n\r\n\r\n###
How to test in Serverless\r\n Use vault access and open the security
Project in
[build\r\n]([Buildkite\r\nBuild](https://buildkite.com/elastic/kibana-pull-request/builds/234438))\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"6742f770497a946de2d21aa39985243eec2b9f7b","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Fleet","v9.0.0","release_note:feature","Team:Cloud
Security","backport:prev-minor","ci:build-cloud-image","ci:cloud-redeploy","ci:project-deploy-security","v8.16.0"],"title":"[Cloud
Security] Agentless integration deletion
flow","number":191557,"url":"https://github.com/elastic/kibana/pull/191557","mergeCommit":{"message":"[Cloud
Security] Agentless integration deletion flow (#191557)\n\n##
Summary\r\n\r\nSummarize your PR. If it involves visual changes include
a screenshot or\r\ngif.\r\nThis PR is completes the deletion flow for
Agentless CSPM.\r\n\r\n**Current Agentless Integraton deletion flow**:
\r\n\r\n1. Successfully delete integration policy\r\n2. Successfully
unenrolls agent from agent policy \r\n3. Successfully revokes enrollment
token\r\n4. Successfully deletes agentless deployment\r\n5. Successfully
deletes agent policy \r\n6. Successful notification shows when deleted
integration policy is\r\nsuccessful\r\n\r\n\r\n## Agentless Agent API
\r\n- Unenrolls agent and revokes token first to avoid 404 save
object\r\nclient error.\r\n- Update `is_managed` property to no longer
check for\r\n`agentPolicy.supports_agentless`. Agentless policies will
now be a\r\nregular policy.\r\n- Adds logging for DELETE agentless Agent
API endpoint \r\n- Adds agentless API deleteendpoint using try & catch.
No errors will be\r\nthrown. Agent status will become offline after
deployment deletion\r\n- If agentless deployment api fails, then we will
continue to delete the\r\nagent policy\r\n\r\n## UI
Changes\r\n\r\n**CSPM Integration** \r\n- Updates Agent Policy Error
toast notification title \r\n- Updates Agent Policy Error toast
notification message \r\n\r\n<img width=\"1612\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0003ce04-c53c-4e11-8363-ddc25ba342a7\">\r\n\r\n**Edit
Mode**\r\n- Adds back the Agentless selector in Edit
Integration\r\n\r\n<img width=\"1316\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0d2f20ce-32fc-421c-a15a-48ca6226b67f\">\r\n\r\n**Integration
Policies Page**\r\n- Removes automatic navigation to agent policies page
when deleting an\r\nintegration. In 8.17, we have a ticket to [hide the
agentless
agent\r\npolicies.](https://github.com/elastic/security-team/issues/9857)\r\n-
Enables delete button when deleting package policy with agents
for\r\nagentless policies\r\n- Disables Upgrade Action\r\n- Removes Add
Agent Action\r\n\r\n<img width=\"1717\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1b7ac4c7-e8bc-41b8-836f-4d3c79a449dd\">\r\n\r\n<img
width=\"670\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0ab6a4c4-d7c6-43ea-9537-67e7fbcca2b0\">\r\n\r\n\r\n**Agent
Policies Page**\r\n- Updates messaging when deleting the agentless
policy from agent policy\r\npage. Warning users that deleting agentless
policy will also delete the\r\nintegration and unenroll agent.\r\n-
Enables delete button when deleting agentless policy with agents
for\r\nagentless policies\r\n- Removes Add agent menu action\r\n-
Removes Upgrade policy menu action\r\n- Removes Uninstall agent
action\r\n- Removes Copy policy menu action\r\n\r\n<img width=\"1595\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2f195da2-4594-4f54-8f8d-7995e829a5ac\">\r\n<img
width=\"1365\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/4915642d-41e8-4e83-80f9-f334cb879506\">\r\n\r\n\r\n**Agent
Policy Settings**\r\nFor agent policy that are agentless, we disabled
the following
[fleet\r\nactions:](https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-types)\r\n-
Disables Agent monitoring\r\n- Disables Inactivity timeout\r\n- Disables
Fleet Server\r\n- Disables Output for integrations\r\n- Disables Output
for agent monitoring\r\n- Disables Agent binary download\r\n- Disables
Host name format\r\n- Disables Inactive agent unenrollment timeout \r\n-
Disables Advanced Settings - Limit CPU usage\r\n- Disables HTTP
monitoring endpoint\r\n- Disables Agent Logging\r\n\r\n<img
width=\"1569\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2639be9f-ea10-4d42-b379-a13c4c2b08a1\">\r\n<img
width=\"1517\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ae6f3e10-8c2b-42fe-8f27-7e8621d373c0\">\r\n\r\n**Agents
Page**\r\n\r\n- Disables Assign to Policy action\r\n- Disables Upgrade
Policy action\r\n- Removes Unassign agent action\r\n- Removes agentless
policies where user can add agent to agentless\r\npolicy\r\n\r\n<img
width=\"1710\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/61bf2d06-d337-45dd-8255-499db1e1ed42\">\r\n<img
width=\"1723\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/cc76787f-d6a2-44fb-9289-7f1f643620ec\">\r\n\r\n\r\n###
How to test in Serverless\r\n Use vault access and open the security
Project in
[build\r\n]([Buildkite\r\nBuild](https://buildkite.com/elastic/kibana-pull-request/builds/234438))\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"6742f770497a946de2d21aa39985243eec2b9f7b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191557","number":191557,"mergeCommit":{"message":"[Cloud
Security] Agentless integration deletion flow (#191557)\n\n##
Summary\r\n\r\nSummarize your PR. If it involves visual changes include
a screenshot or\r\ngif.\r\nThis PR is completes the deletion flow for
Agentless CSPM.\r\n\r\n**Current Agentless Integraton deletion flow**:
\r\n\r\n1. Successfully delete integration policy\r\n2. Successfully
unenrolls agent from agent policy \r\n3. Successfully revokes enrollment
token\r\n4. Successfully deletes agentless deployment\r\n5. Successfully
deletes agent policy \r\n6. Successful notification shows when deleted
integration policy is\r\nsuccessful\r\n\r\n\r\n## Agentless Agent API
\r\n- Unenrolls agent and revokes token first to avoid 404 save
object\r\nclient error.\r\n- Update `is_managed` property to no longer
check for\r\n`agentPolicy.supports_agentless`. Agentless policies will
now be a\r\nregular policy.\r\n- Adds logging for DELETE agentless Agent
API endpoint \r\n- Adds agentless API deleteendpoint using try & catch.
No errors will be\r\nthrown. Agent status will become offline after
deployment deletion\r\n- If agentless deployment api fails, then we will
continue to delete the\r\nagent policy\r\n\r\n## UI
Changes\r\n\r\n**CSPM Integration** \r\n- Updates Agent Policy Error
toast notification title \r\n- Updates Agent Policy Error toast
notification message \r\n\r\n<img width=\"1612\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0003ce04-c53c-4e11-8363-ddc25ba342a7\">\r\n\r\n**Edit
Mode**\r\n- Adds back the Agentless selector in Edit
Integration\r\n\r\n<img width=\"1316\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0d2f20ce-32fc-421c-a15a-48ca6226b67f\">\r\n\r\n**Integration
Policies Page**\r\n- Removes automatic navigation to agent policies page
when deleting an\r\nintegration. In 8.17, we have a ticket to [hide the
agentless
agent\r\npolicies.](https://github.com/elastic/security-team/issues/9857)\r\n-
Enables delete button when deleting package policy with agents
for\r\nagentless policies\r\n- Disables Upgrade Action\r\n- Removes Add
Agent Action\r\n\r\n<img width=\"1717\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1b7ac4c7-e8bc-41b8-836f-4d3c79a449dd\">\r\n\r\n<img
width=\"670\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0ab6a4c4-d7c6-43ea-9537-67e7fbcca2b0\">\r\n\r\n\r\n**Agent
Policies Page**\r\n- Updates messaging when deleting the agentless
policy from agent policy\r\npage. Warning users that deleting agentless
policy will also delete the\r\nintegration and unenroll agent.\r\n-
Enables delete button when deleting agentless policy with agents
for\r\nagentless policies\r\n- Removes Add agent menu action\r\n-
Removes Upgrade policy menu action\r\n- Removes Uninstall agent
action\r\n- Removes Copy policy menu action\r\n\r\n<img width=\"1595\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2f195da2-4594-4f54-8f8d-7995e829a5ac\">\r\n<img
width=\"1365\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/4915642d-41e8-4e83-80f9-f334cb879506\">\r\n\r\n\r\n**Agent
Policy Settings**\r\nFor agent policy that are agentless, we disabled
the following
[fleet\r\nactions:](https://www.elastic.co/guide/en/fleet/current/agent-policy.html#agent-policy-types)\r\n-
Disables Agent monitoring\r\n- Disables Inactivity timeout\r\n- Disables
Fleet Server\r\n- Disables Output for integrations\r\n- Disables Output
for agent monitoring\r\n- Disables Agent binary download\r\n- Disables
Host name format\r\n- Disables Inactive agent unenrollment timeout \r\n-
Disables Advanced Settings - Limit CPU usage\r\n- Disables HTTP
monitoring endpoint\r\n- Disables Agent Logging\r\n\r\n<img
width=\"1569\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/2639be9f-ea10-4d42-b379-a13c4c2b08a1\">\r\n<img
width=\"1517\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/ae6f3e10-8c2b-42fe-8f27-7e8621d373c0\">\r\n\r\n**Agents
Page**\r\n\r\n- Disables Assign to Policy action\r\n- Disables Upgrade
Policy action\r\n- Removes Unassign agent action\r\n- Removes agentless
policies where user can add agent to agentless\r\npolicy\r\n\r\n<img
width=\"1710\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/61bf2d06-d337-45dd-8255-499db1e1ed42\">\r\n<img
width=\"1723\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/cc76787f-d6a2-44fb-9289-7f1f643620ec\">\r\n\r\n\r\n###
How to test in Serverless\r\n Use vault access and open the security
Project in
[build\r\n]([Buildkite\r\nBuild](https://buildkite.com/elastic/kibana-pull-request/builds/234438))\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"6742f770497a946de2d21aa39985243eec2b9f7b"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Lola <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:build-cloud-image ci:cloud-redeploy Always create a new Cloud deployment ci:project-deploy-security Create a Security Serverless Project release_note:feature Makes this part of the condensed release notes Team:Cloud Security Cloud Security team related Team:Fleet Team label for Observability Data Collection Fleet team v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow deleting integration from Agentless policy
8 participants