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] limit setup options for Agentless CSPM #172562

Merged
merged 39 commits into from
Dec 14, 2023

Conversation

maxcold
Copy link
Contributor

@maxcold maxcold commented Dec 5, 2023

Summary

Follow up after

Closes

Includes:

  • limiting setup options for agentless to only Direct Access Keys and Temporary Keys
  • covering Agentless for edit flow

How to test

Make sure to have the FF in your serverless.security.dev.yml (it's similar to the kibana.dev.yml but specifically for Serverless Security Projects) enabled. Also specify some serverless project id, to enable the logic of isServerlessEnabled

xpack.fleet.enableExperimental: ['agentless']
xpack.cloud.serverless.project_id: 'some_fake_project_id'

The follow the steps from this comment https://github.com/elastic/security-team/issues/7972#issuecomment-1808096052 to have the Agentless artifacts (agent, policy, output, and fleet server host) locally

After that, you should be able to test the flow.

Screencast

screencast-mail.google.com-2023.12.08-16_37_35.webm

Checklist

Delete any items that are not applicable to this PR.

@maxcold maxcold added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Cloud Security Cloud Security team related v8.13.0 labels Dec 5, 2023
@maxcold maxcold force-pushed the csp-agentless-selector branch from dc55d19 to 48b5d37 Compare December 6, 2023 14:49
Base automatically changed from csp-agentless-selector to main December 7, 2023 09:07
@maxcold
Copy link
Contributor Author

maxcold commented Dec 8, 2023

/ci

@maxcold
Copy link
Contributor Author

maxcold commented Dec 8, 2023

/ci

@maxcold maxcold marked this pull request as ready for review December 9, 2023 11:00
@maxcold maxcold requested a review from a team as a code owner December 9, 2023 11:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@maxcold maxcold requested a review from JordanSh December 12, 2023 09:21
Copy link
Contributor

@JordanSh JordanSh left a comment

Choose a reason for hiding this comment

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

LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cloudSecurityPosture 431 433 +2

Async chunks

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

id before after diff
cloudSecurityPosture 447.5KB 451.7KB +4.2KB
Unknown metric groups

ESLint disabled line counts

id before after diff
cloudSecurityPosture 24 25 +1

Total ESLint disabled count

id before after diff
cloudSecurityPosture 24 25 +1

History

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

@maxcold maxcold merged commit 73d0a46 into main Dec 14, 2023
37 checks passed
@maxcold maxcold deleted the csp-agentless-limit-setup-options branch December 14, 2023 16:27
maxcold added a commit that referenced this pull request Dec 27, 2023
…t policy (#173553)

## Summary

Right now every Security project in serverless is created with [an
Agentless
policy](https://github.com/elastic/project-controller/blob/main/internal/project/security/security_kibana_config.go#L80)
(gated be the feature flag based on or org id) and in this policy
`is_managed` set to `false`. We in Cloud Security want to make the
policy managed.

This change is to allow us to do that and still be able to install
integrations on the policy. In a nutshell, the logic is to force install
integration if the agent policy id is `agentless`. If we are not missing
something, it should be safe, as when managed, the agentless agent
policy won't be available in the list of Existing Hosts and the only way
to pick it for installation in the UI is to implement the same logic we
implemented in CSP integration in
- #171671
- #172562

Part of:
- elastic/security-team#8117

## Screencast

https://github.com/elastic/security-team/assets/478762/c41f2f33-0c43-467f-a54a-8710b26a0abc

### Checklist

Delete any items that are not applicable to this PR.

- [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants