-
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
[Security Solution] add blocklist list #126390
Conversation
ac9430d
to
bca3591
Compare
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
x-pack/plugins/security_solution/common/endpoint/data_generators/blocklist_generator.ts
Outdated
Show resolved
Hide resolved
.../plugins/security_solution/common/endpoint/data_generators/exceptions_list_item_generator.ts
Outdated
Show resolved
Hide resolved
9b4f5ea
to
0e629bd
Compare
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
History
To update your PR or re-run it, just comment with: |
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.
Left a few comments, but nothing that needs to be done in this PR since we're trying to get this in so others are unblocked. You can address it in a subsequent one
🚢 it
return this.generate({ | ||
name: `Blocklist ${this.randomString(5)}`, | ||
list_id: ENDPOINT_BLOCKLISTS_LIST_ID, | ||
item_id: `generator_endpoint_blocklist_${this.randomUUID()}`, |
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.
can you use the .seededUUIDv4()
method instead so that we get deterministic output based on the seed used to insatiate the class instance
@@ -39,7 +39,7 @@ const BLOCKLIST_PAGE_LABELS: ArtifactListPageProps['labels'] = { | |||
defaultMessage: 'Blocklist', | |||
}), | |||
pageAboutInfo: i18n.translate('xpack.securitySolution.blocklist.pageAboutInfo', { | |||
defaultMessage: '(DEV: temporarily using isolation exception api)', // FIXME: need wording from PM | |||
defaultMessage: 'Add a blocklist to block applications or files from running.', |
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.
Maybe add endpoint
to the end of this sentence?
defaultMessage: 'Add a blocklist to block applications or files from running.', | |
defaultMessage: 'Add a blocklist to block applications or files from running on the endpoint.', |
|
||
export const BLOCKLISTS_LIST_TYPE: ExceptionListType = ExceptionListTypeEnum.ENDPOINT_BLOCKLISTS; | ||
|
||
export const BLOCKLISTS_LIST_DEFINITION: CreateExceptionListSchema = { |
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 is one (maybe two) more places that need to be updated with the list id. Please add it to: ALL_ENDPOINT_ARTIFACT_LIST_IDS
const in x-pack/plugins/security_solution/common/endpoint/service/artifacts/constants.ts:18
.
@dasansol92 I think there is a place on the server side too that needs updating for the "delete" policy use case (fleet server extension) ??
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.
Right, it's in x-pack/plugins/security_solution/server/fleet_integration/handlers/remove_policy_from_artifacts.ts:18
but I think we can import there the one in x-pack/plugins/security_solution/common/endpoint/service/artifacts/constants.ts
and remove the duplication
* 2.0. | ||
*/ | ||
|
||
export * from './blocklists_api_client'; |
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.
Maybe I'm wrong but I think we had some issues with the wildcard export in the past, if it's not needed (I don't think so), can we export just what we want?
💔 Backport failedThe pull request could not be backported due to the following error: How to fixRe-run the backport manually:
Questions ?Please refer to the Backport tool documentation |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
* Generate blocklist artifacts fixes elastic/security-team/issues/2783 * update tests to include event filters, host isolation exceptions and blocklists fixes elastic/security-team/issues/2783 * todo comment * fix typo * Unify artifact kuery method into one Since the os specific filter and policy filter strings are same for trusted apps, event filters, host isolation exceptions and blocklists, it makes sense to unify these into a single method that accepts a listId param to distinguish each artifact. Morever, since endpoint list does not need specific policy id for a policy filter, this can also be unified into the same method. fixes elastic/security-team/issues/2783 * update blocklist generator to add random os entry refs /pull/126390 * Move entries back in `ExceptionsListItemGenerator` review changes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
2 similar comments
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Add blocklist list
![Screen Shot 2022-02-24 at 5 30 22 PM](https://user-images.githubusercontent.com/11009772/155624871-ad912547-e9e8-4249-9157-6964f9191873.png)
For maintainers