Skip to content

Commit

Permalink
remove additional old config settings and update serverless yml
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelolo24 committed Apr 25, 2024
1 parent bbc7d15 commit 2e45cfe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion config/serverless.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ xpack.securitySolutionServerless.productTypes:

xpack.securitySolution.offeringSettings: {
ILMEnabled: false, # Index Lifecycle Management (ILM) functionalities disabled, not supported by serverless Elasticsearch
ESQLEnabled: false, # ES|QL disabled, not supported by serverless Elasticsearch
}

newsfeed.enabled: true
Expand Down
2 changes: 2 additions & 0 deletions packages/serverless/settings/security_project/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
*/

import * as settings from '@kbn/management-settings-ids';
import * as discoverSettings from '@kbn/discover-utils';

export const SECURITY_PROJECT_SETTINGS = [
discoverSettings.ENABLE_ESQL,
settings.ML_ANOMALY_DETECTION_RESULTS_ENABLE_TIME_DEFAULTS_ID,
settings.ML_ANOMALY_DETECTION_RESULTS_TIME_DEFAULTS_ID,
settings.SECURITY_SOLUTION_REFRESH_INTERVAL_DEFAULTS_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export const previewRulesRoute = async (
);
break;
case 'esql':
if (!config.settings.ESQLEnabled || config.experimentalFeatures.esqlRulesDisabled) {
if (config.experimentalFeatures.esqlRulesDisabled) {
throw Error('ES|QL rule type is not supported');
}
const esqlAlertType = previewRuleTypeWrapper(createEsqlAlertType(ruleOptions));
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export class Plugin implements ISecuritySolutionPlugin {
const securityRuleTypeWrapper = createSecurityRuleTypeWrapper(securityRuleTypeOptions);

plugins.alerting.registerType(securityRuleTypeWrapper(createEqlAlertType(ruleOptions)));
if (config.settings.ESQLEnabled && !experimentalFeatures.esqlRulesDisabled) {
if (!experimentalFeatures.esqlRulesDisabled) {
plugins.alerting.registerType(securityRuleTypeWrapper(createEsqlAlertType(ruleOptions)));
}
plugins.alerting.registerType(
Expand Down

0 comments on commit 2e45cfe

Please sign in to comment.