mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Security Solution][Siem migrations] Swap experimental flag for ESS (#208541)
## Summary This PR enables the SIEM migrations experimental flag by default in ESS/on-prem. We keep the experimental flag disabled in serverless (using `config/serverless.security.yml`) since we don't want to release it yet. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
449ac98572
commit
93f67462d2
13 changed files with 29 additions and 22 deletions
|
@ -167,5 +167,7 @@ xpack.index_management.enableProjectLevelRetentionChecks: true
|
|||
|
||||
# Experimental Security Solution features
|
||||
|
||||
# This feature is disabled in Serverless until fully performance tested within a Serverless environment
|
||||
xpack.securitySolution.enableExperimental: ['entityStoreDisabled']
|
||||
# These features are disabled in Serverless until fully tested
|
||||
xpack.securitySolution.enableExperimental:
|
||||
- entityStoreDisabled
|
||||
- siemMigrationsDisabled
|
||||
|
|
|
@ -242,9 +242,9 @@ export const allowedExperimentalValues = Object.freeze({
|
|||
serviceEntityStoreEnabled: true,
|
||||
|
||||
/**
|
||||
* Enables the siem migrations feature
|
||||
* Disables the siem migrations feature
|
||||
*/
|
||||
siemMigrationsEnabled: false,
|
||||
siemMigrationsDisabled: false,
|
||||
|
||||
/**
|
||||
* Enables the Defend Insights feature
|
||||
|
|
|
@ -72,6 +72,12 @@ const useFilteredConfig = (): OnboardingConfig => {
|
|||
if (item.experimentalFlagRequired && !experimentalFeatures[item.experimentalFlagRequired]) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
item.disabledExperimentalFlagRequired &&
|
||||
experimentalFeatures[item.disabledExperimentalFlagRequired]
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (item.licenseTypeRequired && !license.isAtLeast(item.licenseTypeRequired)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,6 +28,6 @@ export const onboardingConfig: TopicConfig[] = [
|
|||
}),
|
||||
body: siemMigrationsBodyConfig,
|
||||
licenseTypeRequired: 'enterprise',
|
||||
experimentalFlagRequired: 'siemMigrationsEnabled',
|
||||
disabledExperimentalFlagRequired: 'siemMigrationsDisabled',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -108,6 +108,10 @@ export interface OnboardingConfigAvailabilityProps {
|
|||
* The experimental features required to enable the item.
|
||||
*/
|
||||
experimentalFlagRequired?: keyof ExperimentalFeatures;
|
||||
/**
|
||||
* The disabled experimental features required to enable the item.
|
||||
*/
|
||||
disabledExperimentalFlagRequired?: keyof ExperimentalFeatures;
|
||||
}
|
||||
|
||||
export interface OnboardingCardConfig<TMetadata extends {} = {}>
|
||||
|
|
|
@ -343,7 +343,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
|
|||
investigations: subPlugins.investigations.start(),
|
||||
machineLearning: subPlugins.machineLearning.start(),
|
||||
siemMigrations: subPlugins.siemMigrations.start(
|
||||
this.experimentalFeatures.siemMigrationsEnabled
|
||||
!this.experimentalFeatures.siemMigrationsDisabled
|
||||
),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -32,6 +32,6 @@ export const siemMigrationsLinks: LinkItem = {
|
|||
defaultMessage: 'SIEM Rule Migrations',
|
||||
}),
|
||||
],
|
||||
experimentalKey: 'siemMigrationsEnabled',
|
||||
hideWhenExperimentalKey: 'siemMigrationsDisabled',
|
||||
isBeta: true,
|
||||
};
|
||||
|
|
|
@ -77,7 +77,9 @@ export class SiemRulesMigrationsService {
|
|||
}
|
||||
|
||||
public isAvailable() {
|
||||
return ExperimentalFeaturesService.get().siemMigrationsEnabled && licenseService.isEnterprise();
|
||||
return (
|
||||
!ExperimentalFeaturesService.get().siemMigrationsDisabled && licenseService.isEnterprise()
|
||||
);
|
||||
}
|
||||
|
||||
public startPolling() {
|
||||
|
|
|
@ -15,7 +15,7 @@ export const registerSiemMigrationsRoutes = (
|
|||
config: ConfigType,
|
||||
logger: Logger
|
||||
) => {
|
||||
if (config.experimentalFeatures.siemMigrationsEnabled) {
|
||||
if (!config.experimentalFeatures.siemMigrationsDisabled) {
|
||||
registerSiemRuleMigrationsRoutes(router, logger);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -42,10 +42,10 @@ describe('SiemMigrationsService', () => {
|
|||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
describe('with siemMigrationsEnabled flag', () => {
|
||||
describe('with experimental flag enabled', () => {
|
||||
beforeEach(() => {
|
||||
siemMigrationsService = new SiemMigrationsService(
|
||||
{ experimentalFeatures: { siemMigrationsEnabled: true } } as ConfigType,
|
||||
{ experimentalFeatures: { siemMigrationsDisabled: false } } as ConfigType,
|
||||
logger,
|
||||
kibanaVersion
|
||||
);
|
||||
|
@ -90,10 +90,10 @@ describe('SiemMigrationsService', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('without siemMigrationsEnabled flag', () => {
|
||||
describe('without experimental flag disabled', () => {
|
||||
beforeEach(() => {
|
||||
siemMigrationsService = new SiemMigrationsService(
|
||||
{ experimentalFeatures: { siemMigrationsEnabled: false } } as ConfigType,
|
||||
{ experimentalFeatures: { siemMigrationsDisabled: true } } as ConfigType,
|
||||
logger,
|
||||
kibanaVersion
|
||||
);
|
||||
|
|
|
@ -25,7 +25,7 @@ export class SiemMigrationsService {
|
|||
}
|
||||
|
||||
setup(params: SiemMigrationsSetupParams) {
|
||||
if (this.config.experimentalFeatures.siemMigrationsEnabled) {
|
||||
if (!this.config.experimentalFeatures.siemMigrationsDisabled) {
|
||||
this.rules.setup({ ...params, pluginStop$: this.pluginStop$ });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,13 +13,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
|
||||
return {
|
||||
...functionalConfig.getAll(),
|
||||
kbnTestServer: {
|
||||
...functionalConfig.get('kbnTestServer'),
|
||||
serverArgs: [
|
||||
...functionalConfig.get('kbnTestServer.serverArgs'),
|
||||
`--xpack.securitySolution.enableExperimental=${JSON.stringify(['siemMigrationsEnabled'])}`,
|
||||
],
|
||||
},
|
||||
testFiles: [require.resolve('..')],
|
||||
junit: {
|
||||
reportName: 'SIEM Migrations Integration Tests - ESS Env - Trial License',
|
||||
|
|
|
@ -9,7 +9,7 @@ import { createTestConfig } from '../../../../../config/serverless/config.base';
|
|||
|
||||
export default createTestConfig({
|
||||
kbnTestServerArgs: [
|
||||
`--xpack.securitySolution.enableExperimental=${JSON.stringify(['siemMigrationsEnabled'])}`,
|
||||
`--xpack.securitySolution.enableExperimental=${JSON.stringify([])}`, // override to empty array so the flag is not disabled
|
||||
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([
|
||||
{ product_line: 'security', product_tier: 'complete' },
|
||||
{ product_line: 'endpoint', product_tier: 'complete' },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue