Skip to content

Commit fedea09

Browse files
[9.2] Check for integrations permissions before loading component (#239122) (#239186)
# Backport This will backport the following commits from `main` to `9.2`: - [Check for integrations permissions before loading component (#239122)](#239122) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Charlotte Alexandra Wilson","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-10-15T16:05:03Z","message":"Check for integrations permissions before loading component (#239122)\n\n### Summary\nThis PR introduces a check for fleet read permissions before loading in\nthe integrations data source component. If the permissions are not\navailable, a warning is shown.\n\nThis solves the bug: https://github.com/elastic/kibana/issues/238852\n\nAlso removes text for customising roles and groups for privileged users\n- as this has not been implemented yet. (screenshot at bottom)\n\n**New, Expected outcome:** \n<img width=\"2758\" height=\"1778\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/6624a885-240c-417c-b9f3-d2b0f317249c\"\n/>\n\n#### Testing Steps \n1. Login to Kibana\n2. From stack management create a user with fleet and integrations\npermissions set to none (screenshot below).\n- I find its easiest to copy all settings from superuser and edit just\nthe two above.\n3. Login with that user. \n4. Navigate to Security -> Entity Analytics -> Privileged user\nmonitoring.\n3. Click on Manage Data Sources\n4. Observer above warning should now show instead of generic - unable to\nload page. Both CSV and Index sources should also be visible and usable.\n\n\n**Customise Groups and Roles Text Removal** \n<img width=\"2650\" height=\"1608\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/476feca4-c813-400d-810a-e80b8a17bd84\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"19b3641152cf8d1fd45791d120bb78c2a930843e","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team: SecuritySolution","Theme: entity_analytics","Feature:Entity Analytics","Team:Entity Analytics","backport:version","v9.2.0","v9.3.0"],"title":"Check for integrations permissions before loading component","number":239122,"url":"https://github.com/elastic/kibana/pull/239122","mergeCommit":{"message":"Check for integrations permissions before loading component (#239122)\n\n### Summary\nThis PR introduces a check for fleet read permissions before loading in\nthe integrations data source component. If the permissions are not\navailable, a warning is shown.\n\nThis solves the bug: https://github.com/elastic/kibana/issues/238852\n\nAlso removes text for customising roles and groups for privileged users\n- as this has not been implemented yet. (screenshot at bottom)\n\n**New, Expected outcome:** \n<img width=\"2758\" height=\"1778\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/6624a885-240c-417c-b9f3-d2b0f317249c\"\n/>\n\n#### Testing Steps \n1. Login to Kibana\n2. From stack management create a user with fleet and integrations\npermissions set to none (screenshot below).\n- I find its easiest to copy all settings from superuser and edit just\nthe two above.\n3. Login with that user. \n4. Navigate to Security -> Entity Analytics -> Privileged user\nmonitoring.\n3. Click on Manage Data Sources\n4. Observer above warning should now show instead of generic - unable to\nload page. Both CSV and Index sources should also be visible and usable.\n\n\n**Customise Groups and Roles Text Removal** \n<img width=\"2650\" height=\"1608\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/476feca4-c813-400d-810a-e80b8a17bd84\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"19b3641152cf8d1fd45791d120bb78c2a930843e"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/239122","number":239122,"mergeCommit":{"message":"Check for integrations permissions before loading component (#239122)\n\n### Summary\nThis PR introduces a check for fleet read permissions before loading in\nthe integrations data source component. If the permissions are not\navailable, a warning is shown.\n\nThis solves the bug: https://github.com/elastic/kibana/issues/238852\n\nAlso removes text for customising roles and groups for privileged users\n- as this has not been implemented yet. (screenshot at bottom)\n\n**New, Expected outcome:** \n<img width=\"2758\" height=\"1778\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/6624a885-240c-417c-b9f3-d2b0f317249c\"\n/>\n\n#### Testing Steps \n1. Login to Kibana\n2. From stack management create a user with fleet and integrations\npermissions set to none (screenshot below).\n- I find its easiest to copy all settings from superuser and edit just\nthe two above.\n3. Login with that user. \n4. Navigate to Security -> Entity Analytics -> Privileged user\nmonitoring.\n3. Click on Manage Data Sources\n4. Observer above warning should now show instead of generic - unable to\nload page. Both CSV and Index sources should also be visible and usable.\n\n\n**Customise Groups and Roles Text Removal** \n<img width=\"2650\" height=\"1608\" alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/476feca4-c813-400d-810a-e80b8a17bd84\"\n/>\n\n---------\n\nCo-authored-by: kibanamachine <[email protected]>","sha":"19b3641152cf8d1fd45791d120bb78c2a930843e"}}]}] BACKPORT--> Co-authored-by: Charlotte Alexandra Wilson <[email protected]>
1 parent be0feb0 commit fedea09

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/privileged_user_monitoring_manage_data_sources/index.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { EuiCallOut, EuiButtonEmpty, EuiSpacer } from '@elastic/eui';
99
import { i18n } from '@kbn/i18n';
1010
import { FormattedMessage } from '@kbn/i18n-react';
1111
import React, { useState } from 'react';
12+
import { useKibana } from '@kbn/kibana-react-plugin/public';
1213
import { CsvUploadManageDataSource } from './csv_upload_manage_data_source';
1314
import { HeaderPage } from '../../../common/components/header_page';
1415
import { useSpaceId } from '../../../common/hooks/use_space_id';
@@ -28,6 +29,9 @@ export const PrivilegedUserMonitoringManageDataSources = ({
2829
const spaceId = useSpaceId();
2930
const [addDataSourceResult, setAddDataSourceResult] = useState<AddDataSourceResult | undefined>();
3031

32+
const { application } = useKibana().services;
33+
const fleetRead = application?.capabilities?.fleetv2?.read ?? false;
34+
3135
return (
3236
<>
3337
<EuiButtonEmpty
@@ -84,7 +88,18 @@ export const PrivilegedUserMonitoringManageDataSources = ({
8488
</>
8589
)}
8690

87-
<IntegrationsManageDataSource />
91+
{!fleetRead && (
92+
<EuiCallOut
93+
title={
94+
<FormattedMessage
95+
id="xpack.securitySolution.entityAnalytics.privilegedUserMonitoring.manageDataSources.integrations.noAccessMessage"
96+
defaultMessage="Insufficient privileges to view or manage integrations data source. Please contact your administrator."
97+
/>
98+
}
99+
color="warning"
100+
/>
101+
)}
102+
{fleetRead && <IntegrationsManageDataSource />}
88103
<EuiSpacer size="xxl" />
89104
<IndexImportManageDataSource setAddDataSourceResult={setAddDataSourceResult} />
90105
<EuiSpacer size="xxl" />

x-pack/solutions/security/plugins/security_solution/public/entity_analytics/components/privileged_user_monitoring_manage_data_sources/integrations_manage_data_source.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const IntegrationsManageDataSource = () => {
2929
<p>
3030
<FormattedMessage
3131
id="xpack.securitySolution.entityAnalytics.privilegedUserMonitoring.manageDataSources.integrations.infoText"
32-
defaultMessage="By default, all users with admin roles or groups are considered privileged. You can customize which roles or groups are monitored as privileged."
32+
defaultMessage="By default, all users with admin roles or groups are considered privileged."
3333
/>
3434
</p>
3535
</EuiText>

0 commit comments

Comments
 (0)