-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[EDR Workflows][Endpoint Exception move] Opt-in mechanism for per-policy Endpoint Exceptions #259598
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
[EDR Workflows][Endpoint Exception move] Opt-in mechanism for per-policy Endpoint Exceptions #259598
Changes from all commits
d91c36f
65b207f
130a7a4
3cc05d6
a99ddc0
5e2e906
88289fa
41c6e06
b5a1c8e
bfdc38a
9f4d87f
7d97b5a
0664591
9127f15
fc92314
a897bea
eb3ea95
5f02fd9
82412cf
ca628fb
2165f67
018ee4c
81e24a7
9947fb8
c5bd1f8
fe9997a
af8240e
5e68004
f1e9dd6
fb4c09d
1a80187
bfc3c44
c09b717
f1b4c5d
e9c1531
681aadc
3e40722
4feb866
6c59790
adf803f
53185e4
95f0db6
b221241
0989562
49010a4
dd8cf08
37a2094
0c64ee5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the Elastic License | ||
| * 2.0; you may not use this file except in compliance with the Elastic License | ||
| * 2.0. | ||
| */ | ||
|
|
||
| /* | ||
| * NOTICE: Do not edit this file manually. | ||
| * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. | ||
| * | ||
| * info: | ||
| * title: Endpoint Exceptions Per Policy Opt-In API | ||
| * version: 1 | ||
| */ | ||
|
|
||
| import { z } from '@kbn/zod/v4'; | ||
|
|
||
| export type GetEndpointExceptionsPerPolicyOptInResponse = z.infer< | ||
| typeof GetEndpointExceptionsPerPolicyOptInResponse | ||
| >; | ||
| export const GetEndpointExceptionsPerPolicyOptInResponse = z.object({ | ||
| status: z.boolean(), | ||
| reason: z.enum(['newDeployment', 'userOptedIn']).optional(), | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| openapi: 3.0.0 | ||
| info: | ||
| title: Endpoint Exceptions Per Policy Opt-In API | ||
| version: '1' | ||
| paths: | ||
| /internal/api/endpoint/endpoint_exceptions_per_policy_opt_in: | ||
| get: | ||
| summary: Retrieve endpoint exceptions per policy opt-in | ||
| operationId: GetEndpointExceptionsPerPolicyOptIn | ||
| x-codegen-enabled: true | ||
| x-labels: [] | ||
| # TODO: When the feature flag `endpointExceptionsMovedUnderManagement` is enabled, remove empty `x-labels` and un-comment the line below. | ||
| # x-labels: [ ess, serverless ] | ||
| x-internal: true | ||
| responses: | ||
| '200': | ||
| description: OK | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| required: | ||
| - status | ||
| properties: | ||
| status: | ||
| type: boolean | ||
| reason: | ||
| type: string | ||
| enum: [newDeployment, userOptedIn] | ||
|
|
||
| post: | ||
| summary: Opt-in to endpoint exceptions per policy | ||
| operationId: PerformEndpointExceptionsPerPolicyOptIn | ||
| x-codegen-enabled: true | ||
| x-labels: [] | ||
| # TODO: When the feature flag `endpointExceptionsMovedUnderManagement` is enabled, remove empty `x-labels` and un-comment the line below. | ||
| # x-labels: [ ess, serverless ] | ||
| x-internal: true | ||
| responses: | ||
| '200': | ||
| description: OK | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -186,6 +186,7 @@ import type { | |
| EndpointGetActionsStatusRequestQueryInput, | ||
| EndpointGetActionsStatusResponse, | ||
| } from './endpoint/actions/status/status.gen'; | ||
| import type { GetEndpointExceptionsPerPolicyOptInResponse } from './endpoint/endpoint_exceptions_per_policy_opt_in/endpoint_exceptions_per_policy_opt_in.gen'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we're using the ZOD schemas generated from API docs now? I though we were sticking with Kibana Schemas for our APIs
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, yeah, i did not notice that the generated schemas are not used, although 27 of our API docs enabled do we have a reason not to use these? if yes, i'll switch these to a hand-made schema, otherwise i think it is nice to have a single source of truth... especially if we have to write the API docs anyway |
||
| import type { | ||
| GetEndpointMetadataListRequestQueryInput, | ||
| GetEndpointMetadataListResponse, | ||
|
|
@@ -1872,6 +1873,18 @@ finalize it. | |
| }) | ||
| .catch(catchAxiosErrorFormatAndThrow); | ||
| } | ||
| async getEndpointExceptionsPerPolicyOptIn() { | ||
| this.log.info(`${new Date().toISOString()} Calling API GetEndpointExceptionsPerPolicyOptIn`); | ||
| return this.kbnClient | ||
| .request<GetEndpointExceptionsPerPolicyOptInResponse>({ | ||
| path: '/internal/api/endpoint/endpoint_exceptions_per_policy_opt_in', | ||
| headers: { | ||
| [ELASTIC_HTTP_VERSION_HEADER]: '1', | ||
| }, | ||
| method: 'GET', | ||
| }) | ||
| .catch(catchAxiosErrorFormatAndThrow); | ||
| } | ||
| async getEndpointMetadataList(props: GetEndpointMetadataListProps) { | ||
| this.log.info(`${new Date().toISOString()} Calling API GetEndpointMetadataList`); | ||
| return this.kbnClient | ||
|
|
@@ -2653,6 +2666,20 @@ The difference between the `id` and `rule_id` is that the `id` is a unique rule | |
| }) | ||
| .catch(catchAxiosErrorFormatAndThrow); | ||
| } | ||
| async performEndpointExceptionsPerPolicyOptIn() { | ||
| this.log.info( | ||
| `${new Date().toISOString()} Calling API PerformEndpointExceptionsPerPolicyOptIn` | ||
| ); | ||
| return this.kbnClient | ||
| .request({ | ||
| path: '/internal/api/endpoint/endpoint_exceptions_per_policy_opt_in', | ||
| headers: { | ||
| [ELASTIC_HTTP_VERSION_HEADER]: '1', | ||
| }, | ||
| method: 'POST', | ||
| }) | ||
| .catch(catchAxiosErrorFormatAndThrow); | ||
| } | ||
| /** | ||
| * Apply a bulk action, such as bulk edit, duplicate, or delete, to multiple detection rules. The bulk action is applied to all rules that match the query or to the rules listed by their IDs. | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.