Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
63fcdf5
Enable all feature flags for all 3 connectors/edr systems
paul-tavares Jan 17, 2025
8450f65
remove Tech. Preview tag from connectors's UI
paul-tavares Jan 17, 2025
cdcd834
Remove tech preview labels from bi-directional response actions in se…
paul-tavares Jan 17, 2025
bada23a
Adjust scripts for MS Defender + Sentinelone so that only a warning i…
paul-tavares Jan 17, 2025
1dbb398
Merge branch 'main' into task/olm-11579-ga-bidirectional-response-act…
paul-tavares Jan 17, 2025
919c923
Update failing tests
paul-tavares Jan 21, 2025
42f4f9c
[CI] Auto-commit changed files from 'node scripts/yarn_deduplicate'
kibanamachine Jan 21, 2025
36fb0c2
fix test import
paul-tavares Jan 21, 2025
2251994
Merge remote-tracking branch 'origin/task/olm-11579-ga-bidirectional-…
paul-tavares Jan 21, 2025
235e6cf
[CI] Auto-commit changed files from 'node scripts/notice'
kibanamachine Jan 21, 2025
2b0ed1c
Fix tsconfig.json
paul-tavares Jan 21, 2025
145aed5
Adjust test to use `isAgentTypeInTechPreview()`
paul-tavares Jan 21, 2025
f06b310
Merge remote-tracking branch 'origin/task/olm-11579-ga-bidirectional-…
paul-tavares Jan 21, 2025
012cdef
Merge branch 'main' into task/olm-11579-ga-bidirectional-response-act…
paul-tavares Jan 21, 2025
b39d33a
Feedback from PR review
paul-tavares Jan 22, 2025
69c5e7d
Merge remote-tracking branch 'origin/task/olm-11579-ga-bidirectional-…
paul-tavares Jan 22, 2025
b3e74eb
Merge remote-tracking branch 'upstream/main' into task/olm-11579-ga-b…
paul-tavares Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { setupTestServers } from './lib';
import { connectorTypes } from './mocks/connector_types';
import { actionsConfigMock } from '../actions_config.mock';
import { loggerMock } from '@kbn/logging-mocks';
import { Services } from '../types';
import type { ActionTypeConfig, Services } from '../types';

jest.mock('../action_type_registry', () => {
const actual = jest.requireActual('../action_type_registry');
Expand Down Expand Up @@ -64,8 +64,20 @@ describe('Connector type config checks', () => {

// SubActionConnector
if (getService) {
let connectorConfig: ActionTypeConfig = {};

if (connectorTypeId === '.microsoft_defender_endpoint') {
connectorConfig = {
clientId: 'foo',
tenantId: 'foo-foo',
oAuthServerUrl: 'https://_fake_auth.com/',
oAuthScope: 'some-scope',
apiUrl: 'https://_face_api_.com',
};
}

const subActions = getService({
config: {},
config: connectorConfig,
configurationUtilities: actionsConfigMock.create(),
connector: { id: 'foo', type: 'bar' },
logger: loggerMock.create(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const connectorTypes: string[] = [
'.thehive',
'.sentinelone',
'.crowdstrike',
'.microsoft_defender_endpoint',
'.cases',
'.observability-ai-assistant',
];
2 changes: 1 addition & 1 deletion x-pack/platform/plugins/shared/actions/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@kbn/security-plugin-types-server",
"@kbn/core-application-common",
"@kbn/cloud-plugin",
"@kbn/core-http-server-utils"
"@kbn/core-http-server-utils",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export const allowedExperimentalValues = Object.freeze({
sentinelOneConnectorOn: true,
crowdstrikeConnectorOn: true,
inferenceConnectorOn: false,
crowdstrikeConnectorRTROn: false,
microsoftDefenderEndpointOn: false,
crowdstrikeConnectorRTROn: true,
microsoftDefenderEndpointOn: true,
});

export type ExperimentalConfigKeys = Array<keyof ExperimentalFeatures>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function getConnectorType(): ConnectorTypeModel<
id: CROWDSTRIKE_CONNECTOR_ID,
actionTypeTitle: CROWDSTRIKE_TITLE,
iconClass: lazy(() => import('./logo')),
isExperimental: true,
isExperimental: false,
selectMessage: i18n.translate(
'xpack.stackConnectors.security.crowdstrike.config.selectMessageText',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function getConnectorType(): ConnectorTypeModel<
id: MICROSOFT_DEFENDER_ENDPOINT_CONNECTOR_ID,
actionTypeTitle: MICROSOFT_DEFENDER_ENDPOINT_TITLE,
iconClass: lazy(() => import('./logo')),
isExperimental: true,
isExperimental: false,
selectMessage: i18n.translate(
'xpack.stackConnectors.security.MicrosoftDefenderEndpointSecrets.config.selectMessageText',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function getConnectorType(): ConnectorTypeModel<
id: SENTINELONE_CONNECTOR_ID,
actionTypeTitle: SENTINELONE_TITLE,
iconClass: lazy(() => import('./logo')),
isExperimental: true,
isExperimental: false,
selectMessage: i18n.translate(
'xpack.stackConnectors.security.sentinelone.config.selectMessageText',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('Stack Connectors Plugin', () => {
name: 'Torq',
})
);
expect(actionsSetup.registerSubActionConnectorType).toHaveBeenCalledTimes(11);
expect(actionsSetup.registerSubActionConnectorType).toHaveBeenCalledTimes(12);
expect(actionsSetup.registerSubActionConnectorType).toHaveBeenNthCalledWith(
1,
expect.objectContaining({
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { ResponseActionAgentType } from './constants';

const TECH_PREVIEW_AGENT_TYPE = Object.freeze<Record<ResponseActionAgentType, boolean>>({
endpoint: false,
microsoft_defender_endpoint: false,
crowdstrike: false,
sentinel_one: false,
});

/**
* Returns boolean indicating if agent type is in tech preview or not.
* @param agentType
*/
export const isAgentTypeInTechPreview = (agentType: ResponseActionAgentType) => {
return TECH_PREVIEW_AGENT_TYPE[agentType] ?? true;
};
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,9 @@ export const allowedExperimentalValues = Object.freeze({

/**
* Enables CrowdStrike's RunScript RTR command
* Release: 8.18/9.0
*/
crowdstrikeRunScriptEnabled: false,
crowdstrikeRunScriptEnabled: true,
Comment thread
paul-tavares marked this conversation as resolved.

/**
* Enables the Asset Inventory Entity Store feature.
Expand All @@ -268,9 +269,10 @@ export const allowedExperimentalValues = Object.freeze({
assetInventoryUXEnabled: false,

/**
* Enabled Microsoft Defender for Endpoint actions client
* Enabled Microsoft Defender for Endpoint actions: Isolate and Release.
* Release: 8.18/9.0
*/
responseActionsMSDefenderEndpointEnabled: false,
responseActionsMSDefenderEndpointEnabled: true,
});

type ExperimentalConfigKeys = Array<keyof ExperimentalFeatures>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { AgentTypeIntegrationProps } from './agent_type_integration';
import { AgentTypeIntegration, INTEGRATION_SECTION_LABEL } from './agent_type_integration';
import { getAgentTypeName } from '../../../../translations';
import { RESPONSE_ACTION_AGENT_TYPE } from '../../../../../../common/endpoint/service/response_actions/constants';
import { isAgentTypeInTechPreview } from '../../../../../../common/endpoint/service/response_actions/is_agent_type_in_tech_preview';

describe('AgentTypeIntegration component', () => {
let props: AgentTypeIntegrationProps;
Expand Down Expand Up @@ -52,11 +53,7 @@ describe('AgentTypeIntegration component', () => {
expect(getByTestId('test-tooltipAnchor'));
});

if (
agentType === 'sentinel_one' ||
agentType === 'crowdstrike' ||
agentType === 'microsoft_defender_endpoint'
) {
if (isAgentTypeInTechPreview(agentType)) {
it('should display tech preview badge', () => {
const { getByTestId } = render();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type { EuiTextProps } from '@elastic/eui';
import { EuiBetaBadge, EuiFlexGroup, EuiFlexItem, EuiIconTip, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n-react';
import { i18n } from '@kbn/i18n';
import { isAgentTypeInTechPreview } from '../../../../../../common/endpoint/service/response_actions/is_agent_type_in_tech_preview';
import { useTestIdGenerator } from '../../../../../management/hooks/use_test_id_generator';
import { AgentTypeVendorLogo } from '../agent_type_vendor_logo';
import {
Expand Down Expand Up @@ -43,11 +44,7 @@ export const AgentTypeIntegration = memo<AgentTypeIntegrationProps>(
const testId = useTestIdGenerator(dataTestSubj);

const isTechPreview = useMemo(() => {
return (
agentType === 'sentinel_one' ||
agentType === 'crowdstrike' ||
agentType === 'microsoft_defender_endpoint'
);
return isAgentTypeInTechPreview(agentType);
}, [agentType]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1854,25 +1854,6 @@ describe('Response actions history', () => {
]);
});

it('should show only action types when 3rd party vendor feature flags are set to false thus only endpoint available', async () => {
mockedContext.setExperimentalFlag({
responseActionsSentinelOneV1Enabled: false,
responseActionsCrowdstrikeManualHostIsolationEnabled: false,
});
render({ isFlyout: false });
const { getByTestId, getAllByTestId } = renderResult;

await user.click(getByTestId(`${testPrefix}-${filterPrefix}-popoverButton`));
const filterList = getByTestId(`${testPrefix}-${filterPrefix}-popoverList`);
expect(filterList).toBeTruthy();
expect(getAllByTestId(`${filterPrefix}-option`).length).toEqual(
[...RESPONSE_ACTION_TYPE].length
);
expect(getAllByTestId(`${filterPrefix}-option`).map((option) => option.textContent)).toEqual([
'Triggered by rule',
'Triggered manually',
]);
});
it('should show a list of agents and action types when opened in page view', async () => {
mockedContext.setExperimentalFlag({
responseActionsSentinelOneV1Enabled: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ const runCli: RunFn = async ({ log, flags }) => {
}),
createDetectionEngineMicrosoftDefenderRuleIfNeeded(kbnClient, log, agentPolicyNamespace),
// Trigger alert on the windows VM
msVm.exec('curl -o /tmp/eicar.com.txt https://secure.eicar.org/eicar.com.txt'),
msVm.exec('curl -o /tmp/eicar.com.txt https://secure.eicar.org/eicar.com.txt').catch((err) => {
log.warning(
`Attempted to trigger an alert on host [${msVm.name}], but failed with: ${err.message}`
);
}),
]);

log.info(`Done!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,13 @@ const runCli: RunFn = async ({ log, flags }) => {

// Trigger an alert on the SentinelOn host so that we get an alert back in Kibana
log.info(`Triggering SentinelOne alert`);
await s1HostVm.exec('nslookup elastic.co');
await s1HostVm
.exec('curl -o /tmp/eicar.com.txt https://secure.eicar.org/eicar.com.txt')
.catch((err) => {
log.warning(
`Attempted to trigger an alert on host [${s1HostVm.name}], but failed with: ${err.message}`
);
});

log.info(`Done!

Expand Down