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

Add SentinelOne connector #159157

Merged

Conversation

patrykkopycinski
Copy link
Contributor

@patrykkopycinski patrykkopycinski commented Jun 6, 2023

Summary

Adds new connector type to support https://www.sentinelone.com/

The scope of this PR was limited to the Connector logic, schemas, and types to make PR more digestible.
In the current PR, the connector is NOT registered, so it's not going to be available to the users.
In the follow-up PR I'm going to improve the UX of Param's form and then enable the connector

Zrzut ekranu 2023-08-3 o 11 18 54 visual changes include a screenshot or gif. image image

@patrykkopycinski patrykkopycinski force-pushed the feat/sentinel-one-connector branch from ce54dd2 to a29c934 Compare August 2, 2023 20:04
@patrykkopycinski patrykkopycinski marked this pull request as ready for review August 3, 2023 09:23
@patrykkopycinski patrykkopycinski requested review from a team as code owners August 3, 2023 09:23
@patrykkopycinski patrykkopycinski changed the title Feat/sentinel one connector SentinelOne connector Aug 3, 2023
@patrykkopycinski patrykkopycinski changed the title SentinelOne connector Add SentinelOne connector Aug 3, 2023
@patrykkopycinski patrykkopycinski self-assigned this Aug 3, 2023
@patrykkopycinski patrykkopycinski added the release_note:skip Skip the PR/issue when compiling release notes label Aug 3, 2023
Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

LGTM, added a note about updating CODEOWNERS, and a brief note on schema.nullable() vs schema.maybe() usage

@@ -0,0 +1,21 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Can you add the sentinelone directories to the CODEOWNERS file, like we did with the gen_ai connector?

kibana/.github/CODEOWNERS

Lines 1143 to 1146 in a42df25

## Explore owner connectors
/x-pack/plugins/stack_connectors/public/connector_types/gen_ai @elastic/security-threat-hunting-explore
/x-pack/plugins/stack_connectors/server/connector_types/gen_ai @elastic/security-threat-hunting-explore
/x-pack/plugins/stack_connectors/common/gen_ai @elastic/security-threat-hunting-explore

That way, we'll only get pinged for review when the framework code changes ...

inputInstructions: schema.nullable(schema.string()),
signature: schema.string(),
createdByUser: schema.string(),
requiresApproval: schema.maybe(schema.boolean()),
Copy link
Member

Choose a reason for hiding this comment

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

I always check connector schema for uses of schema.maybe(). You can't use it in connector config or secrets, but it can be used in params, and I don't think we have requirements on the "response" of a connector, since we generally throw it away, only not throwing it away for http invocations (where we return it in the response body).

The usage looks ok here, but thought I'd just double-check that's your understanding as well.

Besides that, these few uses of schema.maybe() look almost out-of-place, with everything else using schema.nullable(). So just thought I'd note that, in case you intended these to be schema.nullable() instead.

@patrykkopycinski patrykkopycinski requested review from a team as code owners August 8, 2023 19:50
@patrykkopycinski patrykkopycinski force-pushed the feat/sentinel-one-connector branch from 7481ce1 to 752c441 Compare August 8, 2023 20:57
@patrykkopycinski
Copy link
Contributor Author

buildkite test this

@patrykkopycinski patrykkopycinski enabled auto-merge (squash) August 8, 2023 22:51
@patrykkopycinski
Copy link
Contributor Author

buildkite test this

@patrykkopycinski patrykkopycinski removed request for a team August 9, 2023 08:45
@patrykkopycinski patrykkopycinski added the Team:Defend Workflows “EDR Workflows” sub-team of Security Solution label Aug 9, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@patrykkopycinski
Copy link
Contributor Author

buildkite test this

@patrykkopycinski patrykkopycinski merged commit 4637b74 into elastic:main Aug 9, 2023
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
triggersActionsUi 538 544 +6

Page load bundle

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

id before after diff
triggersActionsUi 88.9KB 89.0KB +106.0B
Unknown metric groups

API count

id before after diff
triggersActionsUi 564 570 +6

ESLint disabled in files

id before after diff
stackConnectors 4 5 +1

ESLint disabled line counts

id before after diff
stackConnectors 90 93 +3

Total ESLint disabled count

id before after diff
stackConnectors 94 98 +4

History

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

cc @patrykkopycinski

@kibanamachine kibanamachine added v8.10.0 backport:skip This commit does not require backporting labels Aug 9, 2023
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Aug 9, 2023
## Summary

Adds new connector type to support https://www.sentinelone.com/

The scope of this PR was limited to the Connector logic, schemas, and
types to make PR more digestible.
In the current PR, the connector is NOT registered, so it's not going to
be available to the users.
In the follow-up PR I'm going to improve the UX of Param's form and then
enable the connector

<img width="1685" alt="Zrzut ekranu 2023-08-3 o 11 18 54"
src="https://github.com/elastic/kibana/assets/5188868/965ef8ef-497f-42a8-983e-38fd0370cba8">
 visual changes include a screenshot or gif.

<img width="1685" alt="image"
src="https://github.com/elastic/kibana/assets/5188868/119d2255-ed9f-4923-886d-eb139223a47d">

<img width="1690" alt="image"
src="https://github.com/elastic/kibana/assets/5188868/e2c569d2-b497-4641-a6a6-454494223ffc">
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:Defend Workflows “EDR Workflows” sub-team of Security Solution v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants