kibana/x-pack/test/api_integration/apis
Vitalii Dmyterko 847be917a6
[Security Solution][Detection Engine] adds bulkGetUserProfiles privilege to Security Feature (#211824)
## Summary

- addresses https://github.com/elastic/kibana/issues/202051

Few observations, based on ticket
[description](https://github.com/elastic/kibana/issues/202051):

1. User can update assignees in alert(i.e. update any alert details,
which is handled by **SecuritySolution** priv)
2. User can see suggested users in searchbox
3. User **can not** see assignees details(name, avatar) in alerts table
column and alerts flyout(that's where error toast originates from)

Why this happens?
2 different APIs used to show users in searchbox and user details in
alerts table column:

1. API to show users in searchbox:
[/internal/detection_engine/users/_find](https://github.com/elastic/kibana/blob/8.18/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/routes/users/suggest_user_profiles_route.ts#L24)
It requires `securitySolution` privilege
2. API for alerts table cell:
[/internal/security/user_profile/_bulk_get](https://github.com/elastic/kibana/blob/8.18/x-pack/platform/plugins/shared/security/server/routes/user_profile/bulk_get.ts#L20)
It requires `bulkGetUserProfiles` privilege

User was configured with read only Security Feature, that covers only
first API, that's why we see error
> API [POST /internal/security/user_profile/_bulk_get] is unauthorized
for user, this action is granted by the Kibana privileges
[bulkGetUserProfiles] (403)

However `bulkGetUserProfiles` is covered by `Cases` feature already. If
Cases access will be set to read, user would be able to see assignees
details through `/internal/security/user_profile/_bulk_get` API.
It happens, because cases API tags include `bulkGetUserProfiles`
privilege:
https://github.com/elastic/kibana/blob/8.18/x-pack/platform/plugins/shared/cases/common/utils/api_tags.ts#L32,
https://github.com/elastic/kibana/blob/8.18/x-pack/solutions/security/packages/features/src/cases/types.ts#L7

This PR includes `bulkGetUserProfiles` privilege in Security Feature:
https://github.com/elastic/kibana/pull/211824. Since, it's already
present in Cases feature, and user profiles available through Security
Solution `/internal/detection_engine/users/_find` API
2025-03-04 15:08:41 +00:00
..
aiops [ML] AIOps: Chunk groups of field candidates into single queries for top items and histograms. (#189155) 2024-08-05 10:12:20 +02:00
cases [Security Solution][Detection Engine] adds bulkGetUserProfiles privilege to Security Feature (#211824) 2025-03-04 15:08:41 +00:00
cloud [kbn-scout] add test config category to reporting (#210167) 2025-02-12 11:17:04 +01:00
cloud_security_posture FTR - optimize service initialization (#212421) 2025-02-27 11:35:47 +01:00
console [ftr] split x-pack api integration tests based on plugin (#150837) 2023-02-13 15:06:11 +00:00
content_management Make dashboard listing load faster (#201401) 2024-11-25 18:27:43 +01:00
entity_manager Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
es Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
features [Security Solution] SIEM Migrations RBAC (#207087) 2025-02-06 18:41:21 +01:00
file_upload [ML] File upload: Adds support for PDF files (#186956) 2024-08-22 11:14:59 +01:00
grok_debugger [Grok Debugger] Add API integration tests (#172166) 2023-12-04 09:22:43 +00:00
kibana [data] Use versioned router for remaining routes (#161919) 2023-07-18 14:40:11 -07:00
lists skip flaky suite (#151636) 2024-05-15 21:29:52 +01:00
logs_shared [Logs] Provide help for migrating Logs UI settings (#189646) 2024-08-14 19:11:57 +01:00
logs_ui Remove log stream and settings (#204115) 2025-01-10 11:51:12 +00:00
logstash skip failing test suite (#151350) 2023-02-23 15:46:15 -05:00
management [Index Management + ML] Remove unused code from index management and ml (#211266) 2025-02-26 16:09:44 -05:00
maps Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
metrics_ui Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
ml Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
monitoring Fix typo in stack monitoring apm (#187875) 2024-07-10 14:50:47 +01:00
monitoring_collection [ftr] split x-pack api integration tests based on plugin (#150837) 2023-02-13 15:06:11 +00:00
osquery FTR: enable ESLint mocha rules for api integration tests (#191267) 2024-08-30 18:50:35 +02:00
search Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
searchprofiler [Search profiler] Add serverless api tests (#172157) 2023-12-04 12:08:15 +01:00
security Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
slos Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
spaces [CLOUD] Instant deployment (#201688) 2024-11-27 14:08:08 +01:00
stats [stats] fix error when requesting extended stats by unauth users (#160520) 2023-06-27 02:01:55 -07:00
status /api/status - always return a consistent status code (#159768) 2023-06-20 02:06:40 -07:00
synthetics [Synthetics] Remove excess tests and adjust deployment agnostic tests for additional coverage (#206508) 2025-02-21 11:57:24 -05:00
telemetry FTR - optimize service initialization (#212421) 2025-02-27 11:35:47 +01:00
transform [Move @kbn/config-schema to server] transform (#191685) 2024-08-29 16:19:44 +02:00
upgrade_assistant Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
uptime Upgrade ES client to 9.0.0-alpha.3 (#208776) 2025-02-25 14:37:23 +00:00
watcher [ML] Rename index pattern references to data view. (#171627) 2023-11-23 08:17:26 +01:00