Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flipped Security Entity Store flag to being a "disable" flag #195818

5 changes: 5 additions & 0 deletions config/serverless.security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,8 @@ console.ui.embeddedEnabled: false

# Enable project level rentention checks in DSL form from Index Management UI
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']
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ export const allowedExperimentalValues = Object.freeze({
dataIngestionHubEnabled: false,

/**
* Enables the new Entity Store engine routes
* Disables Security's Entity Store engine routes. The Entity Store feature is available by default, but
* can be disabled if necessary in a given environment.
*/
entityStoreEnabled: false,
entityStoreDisabled: false,
});

type ExperimentalConfigKeys = Array<keyof ExperimentalFeatures>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const EntityAnalyticsComponent = () => {
const { indicesExist, loading: isSourcererLoading, sourcererDataView } = useSourcererDataView();
const isRiskScoreModuleLicenseAvailable = useHasSecurityCapability('entity-analytics');

const isEntityStoreEnabled = useIsExperimentalFeatureEnabled('entityStoreEnabled');
const isEntityStoreDisabled = useIsExperimentalFeatureEnabled('entityStoreDisabled');

return (
<>
Expand Down Expand Up @@ -71,7 +71,7 @@ const EntityAnalyticsComponent = () => {
<EntityAnalyticsAnomalies />
</EuiFlexItem>

{isEntityStoreEnabled ? (
{!isEntityStoreDisabled ? (
<EuiFlexItem>
<EntitiesList />
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const registerEntityAnalyticsRoutes = (routeDeps: EntityAnalyticsRoutesDe
registerAssetCriticalityRoutes(routeDeps);
registerRiskScoreRoutes(routeDeps);
registerRiskEngineRoutes(routeDeps);
if (routeDeps.config.experimentalFeatures.entityStoreEnabled) {
if (!routeDeps.config.experimentalFeatures.entityStoreDisabled) {
registerEntityStoreRoutes(routeDeps);
}
};
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 @@ -221,7 +221,7 @@ export class Plugin implements ISecuritySolutionPlugin {
logger.error(`Error scheduling entity analytics migration: ${err}`);
});

if (experimentalFeatures.entityStoreEnabled) {
if (!experimentalFeatures.entityStoreDisabled) {
registerEntityStoreFieldRetentionEnrichTask({
getStartServices: core.getStartServices,
logger: this.logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export default function ({ getService }: FtrProviderContext) {
'endpoint:complete-external-response-actions',
'endpoint:metadata-check-transforms-task',
'endpoint:user-artifact-packager',
'entity_store:field_retention:enrichment',
'fleet:check-deleted-files-task',
'fleet:delete-unenrolled-agents-task',
'fleet:deploy_agent_policies',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
...functionalConfig.getAll(),
kbnTestServer: {
...functionalConfig.get('kbnTestServer'),
serverArgs: [
...functionalConfig.get('kbnTestServer.serverArgs'),
`--xpack.securitySolution.enableExperimental=${JSON.stringify(['entityStoreEnabled'])}`,
],
serverArgs: [...functionalConfig.get('kbnTestServer.serverArgs')],
},
testFiles: [require.resolve('..')],
junit: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { createTestConfig } from '../../../../../config/serverless/config.base';

export default createTestConfig({
kbnTestServerArgs: [
`--xpack.securitySolution.enableExperimental=${JSON.stringify(['entityStoreEnabled'])}`,
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([
{ product_line: 'security', product_tier: 'complete' },
{ product_line: 'endpoint', product_tier: 'complete' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ export default ({ getService }: FtrProviderContext) => {
} = elasticAssetCheckerFactory(getService);

const utils = EntityStoreUtils(getService);

// TODO: unskip once permissions issue is resolved
describe.skip('@ess @serverless @skipInServerlessMKI Entity Store Engine APIs', () => {
describe.skip('@ess Entity Store Engine APIs', () => {
const dataView = dataViewRouteHelpersFactory(supertest);

before(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import { FtrProviderContext } from '../../../../ftr_provider_context';

export default ({ getService }: FtrProviderContext) => {
const securitySolutionApi = getService('securitySolutionApi');

// TODO: unskip once permissions issue is resolved
describe.skip('@ess @serverless @skipInServerlessMKI Entity store - Entities list API', () => {
describe.skip('@ess Entity store - Entities list API', () => {
describe('when the entity store is disable', () => {
it("should return response with success status when the index doesn't exist", async () => {
const { body } = await securitySolutionApi.listEntities({
Expand Down