-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SecuritySolution][Endpoint] Open API spec updates for public Endpoin…
…t APIs (#187634) ## Summary Updates/Adds Open API specs for existing public Endpoint APIs. The PR includes deperated API schemas as well but we can remove them if we all agree to it. Note: The PR doesn't change existing kibana schemas that is used in our server routes and most of the changes in here are file moves and updating imports to unify duplicate naming/import. This to ensure that we can easily maintain the open api specs going forward. The best way to review this is by looking at commits. The major moving cleaning up happens after commit names prefixed with **_refactor_** or `645fbc0f1d8ecc402e81f9503c7c5d1473ef49c0` and onwards. I would also suggest hiding whitespaces when reviewing via Github. closes /issues/183816 ### Checklist - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
fe1b7b1
commit f3aeb81
Showing
126 changed files
with
1,906 additions
and
1,082 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...ecurity_solution/common/api/endpoint/actions/action_log/deprecated_action_log.schema.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Action Log Schema | ||
version: '2023-10-31' | ||
paths: | ||
/api/endpoint/action_log/{agent_id}: | ||
get: | ||
summary: Get action requests log schema | ||
operationId: EndpointGetActionLog | ||
description: Get action requests log | ||
deprecated: true | ||
x-codegen-enabled: false | ||
x-labels: [ess, serverless] | ||
parameters: | ||
- name: agent_id | ||
in: path | ||
required: true | ||
schema: | ||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/AgentId' | ||
- name: query | ||
in: query | ||
required: true | ||
schema: | ||
$ref: '#/components/schemas/ActionLogRequestQuery' | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/SuccessResponse' | ||
|
||
components: | ||
schemas: | ||
ActionLogRequestQuery: | ||
type: object | ||
properties: | ||
page: | ||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/Page' | ||
page_size: | ||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/PageSize' | ||
start_date: | ||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/StartDate' | ||
end_date: | ||
$ref: '../../model/schema/common.schema.yaml#/components/schemas/EndDate' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 0 additions & 131 deletions
131
x-pack/plugins/security_solution/common/api/endpoint/actions/actions.schema.yaml
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
x-pack/plugins/security_solution/common/api/endpoint/actions/audit_log.schema.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
x-pack/plugins/security_solution/common/api/endpoint/actions/details/details.gen.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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: Details Schema | ||
* version: 2023-10-31 | ||
*/ | ||
|
||
import { z } from 'zod'; | ||
|
||
import { SuccessResponse } from '../../model/schema/common.gen'; | ||
|
||
export type EndpointGetActionsDetailsRequestParams = z.infer< | ||
typeof EndpointGetActionsDetailsRequestParams | ||
>; | ||
export const EndpointGetActionsDetailsRequestParams = z.object({ | ||
action_id: z.string(), | ||
}); | ||
export type EndpointGetActionsDetailsRequestParamsInput = z.input< | ||
typeof EndpointGetActionsDetailsRequestParams | ||
>; | ||
|
||
export type EndpointGetActionsDetailsResponse = z.infer<typeof EndpointGetActionsDetailsResponse>; | ||
export const EndpointGetActionsDetailsResponse = SuccessResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
x-pack/plugins/security_solution/common/api/endpoint/actions/details/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export * from './details'; | ||
export * from './details.gen'; |
Oops, something went wrong.