Skip to content

Commit

Permalink
[Security Solution][Detection Engine] enable xMatters, Server Log con…
Browse files Browse the repository at this point in the history
…nectors for Security (elastic#172933)

## Summary

- addresses elastic#124764
- enables xMatters, Server Log connectors for Security

### Before
<img width="1089" alt="Screenshot 2024-05-09 at 11 53 50"
src="https://github.com/elastic/kibana/assets/92328789/faf157f0-efb4-478b-a18f-28810b83881d">


### After
<img width="1015" alt="Screenshot 2023-12-08 at 15 59 10"
src="https://github.com/elastic/kibana/assets/92328789/ddf39232-bd44-43f8-964c-aba472cc61aa">


### Checklist


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
  • Loading branch information
vitaliidm authored May 15, 2024
1 parent 61e408c commit f9460d1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
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

0 comments on commit f9460d1

Please sign in to comment.