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

[Security Solution][Detection Engine] enable xMatters, Server Log connectors for Security #172933

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type {
import {
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/connector_feature_config';
import { withoutControlCharacters } from '../lib/string_utils';

Expand Down Expand Up @@ -55,7 +56,11 @@ export function getConnectorType(): ServerLogConnectorType {
name: i18n.translate('xpack.stackConnectors.serverLog.title', {
defaultMessage: 'Server log',
}),
supportedFeatureIds: [AlertingConnectorFeatureId, UptimeConnectorFeatureId],
supportedFeatureIds: [
AlertingConnectorFeatureId,
UptimeConnectorFeatureId,
SecurityConnectorFeatureId,
],
validate: {
config: { schema: schema.object({}, { defaultValue: {} }) },
secrets: { schema: schema.object({}, { defaultValue: {} }) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import type {
ActionTypeExecutorResult as ConnectorTypeExecutorResult,
ValidatorServices,
} from '@kbn/actions-plugin/server/types';
import { AlertingConnectorFeatureId } from '@kbn/actions-plugin/common/types';
import {
AlertingConnectorFeatureId,
SecurityConnectorFeatureId,
} from '@kbn/actions-plugin/common/types';
import { postXmatters } from './post_xmatters';

export type XmattersConnectorType = ConnectorType<
Expand Down Expand Up @@ -66,7 +69,7 @@ export function getConnectorType(): XmattersConnectorType {
name: i18n.translate('xpack.stackConnectors.xmatters.title', {
defaultMessage: 'xMatters',
}),
supportedFeatureIds: [AlertingConnectorFeatureId],
supportedFeatureIds: [AlertingConnectorFeatureId, SecurityConnectorFeatureId],
validate: {
config: {
schema: ConfigSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
SLACK_ACTION_BTN,
WEBHOOK_ACTION_BTN,
EMAIL_ACTION_BTN,
SERVER_LOG_ACTION_BTN,
XMATTERS_ACTION_BTN,
ACTION_BTN,
} from '../../../../screens/common/rule_actions';

Expand Down Expand Up @@ -62,6 +64,8 @@ describe(
cy.get(SLACK_ACTION_BTN).should('be.visible');
cy.get(EMAIL_ACTION_BTN).should('be.visible');
cy.get(WEBHOOK_ACTION_BTN).should('be.visible');
cy.get(SERVER_LOG_ACTION_BTN).should('be.visible');
cy.get(XMATTERS_ACTION_BTN).should('be.visible');
});
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
SLACK_ACTION_BTN,
WEBHOOK_ACTION_BTN,
EMAIL_ACTION_BTN,
XMATTERS_ACTION_BTN,
SERVER_LOG_ACTION_BTN,
ACTION_BTN,
} from '../../../../screens/common/rule_actions';

Expand Down Expand Up @@ -62,8 +64,10 @@ describe(
cy.get(SLACK_ACTION_BTN).should('be.visible');
cy.get(EMAIL_ACTION_BTN).should('be.visible');

// webhook is not available
// complete tier actions are not available
cy.get(WEBHOOK_ACTION_BTN).should('not.exist');
cy.get(XMATTERS_ACTION_BTN).should('not.exist');
cy.get(SERVER_LOG_ACTION_BTN).should('not.exist');
});
}
);
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export const EMAIL_ACTION_BTN = '[data-test-subj=".email-siem-ActionTypeSelectOp

export const WEBHOOK_ACTION_BTN = '[data-test-subj=".webhook-siem-ActionTypeSelectOption"]';

export const SERVER_LOG_ACTION_BTN = '[data-test-subj=".server-log-siem-ActionTypeSelectOption"]';

export const XMATTERS_ACTION_BTN = '[data-test-subj=".xmatters-siem-ActionTypeSelectOption"]';

/**
* all rule actions buttons, elements which data-test-subj attribute ends with '-siem-ActionTypeSelectOption'
*/
Expand Down