Skip to content

Commit

Permalink
[8.18] [Security Assistant] Fix Knowledge Base API (#211367) (#212456)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.18`:
- [[Security Assistant] Fix Knowledge Base API
(#211367)](#211367)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-25T23:00:00Z","message":"[Security
Assistant] Fix Knowledge Base API (#211367)\n\n## Summary\n\nFixes bugs
related to Security Assistant Knowledge Base
API\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>\nCo-authored-by:
Hannah Mudge <[email protected]>\nCo-authored-by: Marta
Bondyra <[email protected]>\nCo-authored-by:
Davis Plumlee
<[email protected]>\nCo-authored-by: Jatin
Kathuria <[email protected]>\nCo-authored-by: Chris Cowan
<[email protected]>\nCo-authored-by: Elastic Machine
<[email protected]>\nCo-authored-by: Arturo
Lidueña <[email protected]>\nCo-authored-by: Jon
<[email protected]>\nCo-authored-by: Rodney Norris
<[email protected]>\nCo-authored-by: Elena Shostak
<[email protected]>\nCo-authored-by:
Stratoula Kalafateli <[email protected]>\nCo-authored-by:
Irene Blanco <[email protected]>\nCo-authored-by: Cauê Marcondes
<[email protected]>\nCo-authored-by:
Carlos Crespo
<[email protected]>","sha":"c822109a492fe4dcf38ca5aa6d87b2a95bf075c4","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Feature:Security
Assistant","Team:Security Generative
AI","backport:version","v8.18.0","v9.1.0"],"title":"[Security Assistant]
Fix Knowledge Base
API","number":211367,"url":"https://github.com/elastic/kibana/pull/211367","mergeCommit":{"message":"[Security
Assistant] Fix Knowledge Base API (#211367)\n\n## Summary\n\nFixes bugs
related to Security Assistant Knowledge Base
API\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>\nCo-authored-by:
Hannah Mudge <[email protected]>\nCo-authored-by: Marta
Bondyra <[email protected]>\nCo-authored-by:
Davis Plumlee
<[email protected]>\nCo-authored-by: Jatin
Kathuria <[email protected]>\nCo-authored-by: Chris Cowan
<[email protected]>\nCo-authored-by: Elastic Machine
<[email protected]>\nCo-authored-by: Arturo
Lidueña <[email protected]>\nCo-authored-by: Jon
<[email protected]>\nCo-authored-by: Rodney Norris
<[email protected]>\nCo-authored-by: Elena Shostak
<[email protected]>\nCo-authored-by:
Stratoula Kalafateli <[email protected]>\nCo-authored-by:
Irene Blanco <[email protected]>\nCo-authored-by: Cauê Marcondes
<[email protected]>\nCo-authored-by:
Carlos Crespo
<[email protected]>","sha":"c822109a492fe4dcf38ca5aa6d87b2a95bf075c4"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211367","number":211367,"mergeCommit":{"message":"[Security
Assistant] Fix Knowledge Base API (#211367)\n\n## Summary\n\nFixes bugs
related to Security Assistant Knowledge Base
API\n\n---------\n\nCo-authored-by: kibanamachine
<[email protected]>\nCo-authored-by:
Hannah Mudge <[email protected]>\nCo-authored-by: Marta
Bondyra <[email protected]>\nCo-authored-by:
Davis Plumlee
<[email protected]>\nCo-authored-by: Jatin
Kathuria <[email protected]>\nCo-authored-by: Chris Cowan
<[email protected]>\nCo-authored-by: Elastic Machine
<[email protected]>\nCo-authored-by: Arturo
Lidueña <[email protected]>\nCo-authored-by: Jon
<[email protected]>\nCo-authored-by: Rodney Norris
<[email protected]>\nCo-authored-by: Elena Shostak
<[email protected]>\nCo-authored-by:
Stratoula Kalafateli <[email protected]>\nCo-authored-by:
Irene Blanco <[email protected]>\nCo-authored-by: Cauê Marcondes
<[email protected]>\nCo-authored-by:
Carlos Crespo
<[email protected]>","sha":"c822109a492fe4dcf38ca5aa6d87b2a95bf075c4"}}]}]
BACKPORT-->

---------

Co-authored-by: Patryk Kopyciński <[email protected]>
  • Loading branch information
kibanamachine and patrykkopycinski authored Feb 26, 2025
1 parent 22bfe94 commit ee44e4d
Show file tree
Hide file tree
Showing 82 changed files with 1,085 additions and 178 deletions.
37 changes: 34 additions & 3 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36382,7 +36382,7 @@ paths:
content:
application/json; Elastic-Api-Version=2023-10-31:
schema:
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps'
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps'
required: true
responses:
'200':
Expand Down Expand Up @@ -42773,6 +42773,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -42787,13 +42790,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryResponseFields'
Security_AI_Assistant_API_DocumentEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -42821,8 +42828,7 @@ components:
type: object
properties:
kbResource:
description: Knowledge Base resource name for grouping entries, e.g. 'esql', 'lens-docs', etc
type: string
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResource'
source:
description: Source document name or filepath
type: string
Expand All @@ -42847,6 +42853,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -42927,6 +42936,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -42941,13 +42953,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryResponseFields'
Security_AI_Assistant_API_IndexEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -43007,6 +43023,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -43186,6 +43205,18 @@ components:
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryUpdateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps:
anyOf:
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseResource:
description: Knowledge Base resource name for grouping entries, e.g. 'security_labs', 'user', etc
enum:
- security_labs
- user
type: string
Security_AI_Assistant_API_KnowledgeBaseResponse:
description: AI assistant KnowledgeBase.
type: object
Expand Down
37 changes: 34 additions & 3 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20468,7 +20468,7 @@ paths:
content:
application/json; Elastic-Api-Version=2023-10-31:
schema:
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateProps'
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps'
required: true
responses:
'200':
Expand Down Expand Up @@ -31033,6 +31033,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -31047,13 +31050,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryResponseFields'
Security_AI_Assistant_API_DocumentEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -31081,8 +31088,7 @@ components:
type: object
properties:
kbResource:
description: Knowledge Base resource name for grouping entries, e.g. 'esql', 'lens-docs', etc
type: string
$ref: '#/components/schemas/Security_AI_Assistant_API_KnowledgeBaseResource'
source:
description: Source document name or filepath
type: string
Expand All @@ -31107,6 +31113,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -31187,6 +31196,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -31201,13 +31213,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/Security_AI_Assistant_API_ResponseFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryResponseFields'
Security_AI_Assistant_API_IndexEntryCreateFields:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -31267,6 +31283,9 @@ components:
allOf:
- type: object
properties:
global:
description: Whether this Knowledge Base Entry is global, defaults to false
type: boolean
id:
$ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString'
name:
Expand Down Expand Up @@ -31446,6 +31465,18 @@ components:
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryUpdateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseEntryUpdateRouteProps:
anyOf:
- $ref: '#/components/schemas/Security_AI_Assistant_API_DocumentEntryCreateFields'
- $ref: '#/components/schemas/Security_AI_Assistant_API_IndexEntryCreateFields'
discriminator:
propertyName: type
Security_AI_Assistant_API_KnowledgeBaseResource:
description: Knowledge Base resource name for grouping entries, e.g. 'security_labs', 'user', etc
enum:
- security_labs
- user
type: string
Security_AI_Assistant_API_KnowledgeBaseResponse:
description: AI assistant KnowledgeBase.
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/KnowledgeBaseEntryUpdateProps'
$ref: '#/components/schemas/KnowledgeBaseEntryUpdateRouteProps'
required: true
responses:
'200':
Expand Down Expand Up @@ -1301,6 +1301,9 @@ components:
allOf:
- type: object
properties:
global:
description: 'Whether this Knowledge Base Entry is global, defaults to false'
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -1317,13 +1320,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/ResponseFields'
- $ref: '#/components/schemas/DocumentEntryResponseFields'
DocumentEntryCreateFields:
allOf:
- type: object
properties:
global:
description: 'Whether this Knowledge Base Entry is global, defaults to false'
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -1353,10 +1360,7 @@ components:
type: object
properties:
kbResource:
description: >-
Knowledge Base resource name for grouping entries, e.g. 'esql',
'lens-docs', etc
type: string
$ref: '#/components/schemas/KnowledgeBaseResource'
source:
description: Source document name or filepath
type: string
Expand All @@ -1381,6 +1385,9 @@ components:
allOf:
- type: object
properties:
global:
description: 'Whether this Knowledge Base Entry is global, defaults to false'
type: boolean
id:
$ref: '#/components/schemas/NonEmptyString'
name:
Expand Down Expand Up @@ -1463,6 +1470,9 @@ components:
allOf:
- type: object
properties:
global:
description: 'Whether this Knowledge Base Entry is global, defaults to false'
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand All @@ -1479,13 +1489,17 @@ components:
required:
- name
- namespace
- global
- users
- $ref: '#/components/schemas/ResponseFields'
- $ref: '#/components/schemas/IndexEntryResponseFields'
IndexEntryCreateFields:
allOf:
- type: object
properties:
global:
description: 'Whether this Knowledge Base Entry is global, defaults to false'
type: boolean
name:
description: Name of the Knowledge Base Entry
type: string
Expand Down Expand Up @@ -1553,6 +1567,9 @@ components:
allOf:
- type: object
properties:
global:
description: 'Whether this Knowledge Base Entry is global, defaults to false'
type: boolean
id:
$ref: '#/components/schemas/NonEmptyString'
name:
Expand Down Expand Up @@ -1736,6 +1753,20 @@ components:
- $ref: '#/components/schemas/IndexEntryUpdateFields'
discriminator:
propertyName: type
KnowledgeBaseEntryUpdateRouteProps:
anyOf:
- $ref: '#/components/schemas/DocumentEntryCreateFields'
- $ref: '#/components/schemas/IndexEntryCreateFields'
discriminator:
propertyName: type
KnowledgeBaseResource:
description: >-
Knowledge Base resource name for grouping entries, e.g. 'security_labs',
'user', etc
enum:
- security_labs
- user
type: string
KnowledgeBaseResponse:
description: AI assistant KnowledgeBase.
type: object
Expand Down
Loading

0 comments on commit ee44e4d

Please sign in to comment.