mirror of
https://github.com/elastic/kibana.git
synced 2025-04-18 23:21:39 -04:00
[Fleet] Add and setup new config xpack.fleet.integrationsHomeOverride
for AI4DSOC (#216716)
## Summary Introduces a new fleet config variable to redirect from the integrations home page to a specified URL. The search_ai_lake serverless security product type will have its own page (`/app/security/configurations/integrations`) for browsing integrations and viewing installed integrations, so this ensures those users will only be able to see that dedicated page. ## Screen recordings AI4DSOC: https://github.com/user-attachments/assets/9fc203ed-f9c0-45bb-a4a9-2d07688b5ecd Otherwise: https://github.com/user-attachments/assets/50071467-b813-4f13-895f-435fd746adcc Relates: https://github.com/elastic/security-team/issues/11789
This commit is contained in:
parent
0cff949bb4
commit
1384ce13e9
5 changed files with 21 additions and 3 deletions
|
@ -7,6 +7,8 @@ xpack.features.overrides:
|
|||
### The following features are Security features hidden in Role management UI for this specific tier.
|
||||
securitySolutionTimeline.hidden: true
|
||||
securitySolutionNotes.hidden: true
|
||||
|
||||
|
||||
## Agentless deployment by default
|
||||
xpack.fleet.agentless.isDefault: true
|
||||
xpack.fleet.agentless.isDefault: true
|
||||
# Override integrations home
|
||||
xpack.fleet.integrationsHomeOverride: '/app/security/configurations/integrations'
|
|
@ -266,6 +266,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) {
|
|||
'xpack.fleet.internal.fleetServerStandalone (boolean?)',
|
||||
'xpack.fleet.internal.onlyAllowAgentUpgradeToKnownVersions (boolean?)',
|
||||
'xpack.fleet.developer.maxAgentPoliciesWithInactivityTimeout (number?)',
|
||||
'xpack.fleet.integrationsHomeOverride (string?)',
|
||||
'xpack.global_search.search_timeout (duration?)',
|
||||
'xpack.global_search_bar.input_max_limit (number?)',
|
||||
'xpack.graph.canEditDrillDownUrls (boolean?)',
|
||||
|
|
|
@ -88,6 +88,7 @@ export interface FleetConfigType {
|
|||
autoUpgrades?: {
|
||||
retryDelays?: string[];
|
||||
};
|
||||
integrationsHomeOverride?: string;
|
||||
}
|
||||
|
||||
// Calling Object.entries(PackagesGroupedByStatus) gave `status: string`
|
||||
|
|
|
@ -15,7 +15,13 @@ import { INTEGRATIONS_ROUTING_PATHS, INTEGRATIONS_SEARCH_QUERYPARAM } from '../.
|
|||
import { DefaultLayout } from '../../../../layouts';
|
||||
import { ExperimentalFeaturesService, isPackageUpdatable } from '../../../../services';
|
||||
import { InstalledIntegrationsPage } from '../installed_integrations';
|
||||
import { useAuthz, useGetPackagesQuery, useGetSettingsQuery } from '../../../../hooks';
|
||||
import {
|
||||
useAuthz,
|
||||
useConfig,
|
||||
useGetPackagesQuery,
|
||||
useGetSettingsQuery,
|
||||
useStartServices,
|
||||
} from '../../../../hooks';
|
||||
|
||||
import type { CategoryFacet, ExtendedIntegrationCategory } from './category_facets';
|
||||
|
||||
|
@ -42,6 +48,12 @@ export const categoryExists = (category: string, categories: CategoryFacet[]) =>
|
|||
};
|
||||
|
||||
export const EPMHomePage: React.FC = () => {
|
||||
const config = useConfig();
|
||||
const { application } = useStartServices();
|
||||
if (config.integrationsHomeOverride) {
|
||||
application.navigateToUrl(config.integrationsHomeOverride);
|
||||
}
|
||||
|
||||
const authz = useAuthz();
|
||||
const isAuthorizedToFetchSettings = authz.fleet.readSettings;
|
||||
const { data: settings, isFetchedAfterMount: isSettingsFetched } = useGetSettingsQuery({
|
||||
|
|
|
@ -48,6 +48,7 @@ export const config: PluginConfigDescriptor = {
|
|||
activeAgentsSoftLimit: true,
|
||||
onlyAllowAgentUpgradeToKnownVersions: true,
|
||||
},
|
||||
integrationsHomeOverride: true,
|
||||
},
|
||||
deprecations: ({ renameFromRoot, unused, unusedFromRoot }) => [
|
||||
// Unused settings before Fleet server exists
|
||||
|
@ -298,6 +299,7 @@ export const config: PluginConfigDescriptor = {
|
|||
retryDelays: schema.maybe(schema.arrayOf(schema.string())),
|
||||
})
|
||||
),
|
||||
integrationsHomeOverride: schema.maybe(schema.string()),
|
||||
},
|
||||
{
|
||||
validate: (configToValidate) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue