Commit a74ca64
# Backport
This will backport the following commits from `main` to `8.15`:
- [[Obs AI Assistant] Use internal user when fetching connectors
(#190462)](#190462)
<!--- Backport version: 9.4.3 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-08-14T06:10:48Z","message":"[Obs
AI Assistant] Use internal user when fetching connectors
(#190462)\n\nCloses
https://github.com/elastic/kibana/issues/187921\r\n\r\nThe Obs AI
Assistant calls the endpoint `GET _connector` to get a list\r\nof
connector indices. This works for admin users but not for users
with\r\nlimited privileges like users with the `editor`
role.\r\n\r\nCurrently an error is thrown but never caught. This causes
the kibana\r\nserver to crash during development. In prod this problem
means that\r\nusers cannot retrieve connector indices, and thus fallback
to querying\r\n`search-*`.\r\n\r\nThis PR fixes it by using the internal
user to call `GET _connector`. \r\n\r\n\r\nAdditional
context:\r\nhttps://elastic.slack.com/archives/C05J7LXR5DE/p1723560268104559","sha":"be26e461166eca446a9bf4af4be687b77843b4da","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Obs
AI
Assistant","ci:project-deploy-observability","v8.16.0","v8.15.1"],"title":"[Obs
AI Assistant] Use internal user when fetching
connectors","number":190462,"url":"https://github.com/elastic/kibana/pull/190462","mergeCommit":{"message":"[Obs
AI Assistant] Use internal user when fetching connectors
(#190462)\n\nCloses
https://github.com/elastic/kibana/issues/187921\r\n\r\nThe Obs AI
Assistant calls the endpoint `GET _connector` to get a list\r\nof
connector indices. This works for admin users but not for users
with\r\nlimited privileges like users with the `editor`
role.\r\n\r\nCurrently an error is thrown but never caught. This causes
the kibana\r\nserver to crash during development. In prod this problem
means that\r\nusers cannot retrieve connector indices, and thus fallback
to querying\r\n`search-*`.\r\n\r\nThis PR fixes it by using the internal
user to call `GET _connector`. \r\n\r\n\r\nAdditional
context:\r\nhttps://elastic.slack.com/archives/C05J7LXR5DE/p1723560268104559","sha":"be26e461166eca446a9bf4af4be687b77843b4da"}},"sourceBranch":"main","suggestedTargetBranches":["8.15"],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190462","number":190462,"mergeCommit":{"message":"[Obs
AI Assistant] Use internal user when fetching connectors
(#190462)\n\nCloses
https://github.com/elastic/kibana/issues/187921\r\n\r\nThe Obs AI
Assistant calls the endpoint `GET _connector` to get a list\r\nof
connector indices. This works for admin users but not for users
with\r\nlimited privileges like users with the `editor`
role.\r\n\r\nCurrently an error is thrown but never caught. This causes
the kibana\r\nserver to crash during development. In prod this problem
means that\r\nusers cannot retrieve connector indices, and thus fallback
to querying\r\n`search-*`.\r\n\r\nThis PR fixes it by using the internal
user to call `GET _connector`. \r\n\r\n\r\nAdditional
context:\r\nhttps://elastic.slack.com/archives/C05J7LXR5DE/p1723560268104559","sha":"be26e461166eca446a9bf4af4be687b77843b4da"}},{"branch":"8.15","label":"v8.15.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Søren Louv-Jansen <[email protected]>
1 parent 12570f9 commit a74ca64
File tree
2 files changed
+26
-14
lines changed- x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service
2 files changed
+26
-14
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
| 363 | + | |
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| 391 | + | |
391 | 392 | | |
392 | 393 | | |
393 | 394 | | |
| |||
Lines changed: 24 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | | - | |
27 | | - | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
99 | | - | |
100 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
110 | 121 | | |
111 | 122 | | |
112 | 123 | | |
| |||
116 | 127 | | |
117 | 128 | | |
118 | 129 | | |
119 | | - | |
| 130 | + | |
120 | 131 | | |
121 | 132 | | |
122 | 133 | | |
| |||
0 commit comments