[Connectors][IBM Resilient] Edit required labels and automate screenshots (#166022)

This commit is contained in:
Lisa Cawley 2023-12-20 08:11:24 -08:00 committed by GitHub
parent 69395c611e
commit 0ac7dbd4f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 100 additions and 32 deletions

View file

@ -8,7 +8,7 @@
:frontmatter-tags-content-type: [how-to]
:frontmatter-tags-user-goals: [configure]
The IBM Resilient connector uses the https://developer.ibm.com/security/resilient/rest/[RESILIENT REST v2] to create IBM Resilient incidents.
The {ibm-r} connector uses the https://developer.ibm.com/security/resilient/rest/[RESILIENT REST v2] to create {ibm-r} incidents.
[float]
[[define-resilient-ui]]
@ -18,47 +18,51 @@ You can create connectors in *{stack-manage-app} > {connectors-ui}*
or as needed when you're creating a rule. For example:
[role="screenshot"]
image::management/connectors/images/resilient-connector.png[IBM Resilient connector]
image::management/connectors/images/resilient-connector.png[{ibm-r} connector]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
[float]
[[resilient-connector-configuration]]
==== Connector configuration
IBM Resilient connectors have the following configuration properties:
{ibm-r} connectors have the following configuration properties:
Name:: The name of the connector.
URL:: IBM Resilient instance URL.
Organization ID:: IBM Resilient organization ID.
API key ID:: The authentication key ID for HTTP Basic authentication.
API key secret:: The authentication key secret for HTTP Basic authentication.
API key ID::
The authentication key ID for HTTP Basic authentication.
API key secret::
The authentication key secret for HTTP Basic authentication.
Organization ID::
The {ibm-r} organization ID.
URL::
The {ibm-r} instance URL.
[float]
[[resilient-action-configuration]]
=== Test connectors
You can test connectors with the <<execute-connector-api,run connector API>> or
as you're creating or editing the connector in {kib}. For example:
You can test connectors as you're creating or editing the connector in {kib}.
For example:
[role="screenshot"]
image::management/connectors/images/resilient-params-test.png[IBM Resilient params test]
image::management/connectors/images/resilient-params-test.png[IBM Resilient connector test options]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
{ibm-r} actions have the following configuration properties.
IBM Resilient actions have the following configuration properties.
Incident types:: The type of the incident.
Severity code:: The severity of the incident.
Name:: A name for the issue, used for searching the contents of the knowledge base.
Description:: The details about the incident.
Additional comments:: Additional information for the client, such as how to troubleshoot the issue.
Additional comments::
Extra information for the client, such as how to troubleshoot the issue.
Description::
The details about the incident.
Incident type::
The type of the incident.
Name::
A name for the issue, used for searching the contents of the knowledge base.
Severity::
The severity of the incident.
[float]
[[resilient-connector-networking-configuration]]
=== Connector networking configuration
Use the <<action-settings, Action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.
[float]
[[configuring-resilient]]
=== Configure IBM Resilient
IBM Resilient offers https://www.ibm.com/security/intelligent-orchestration/resilient[Instances], which you can use to test incidents.
Use the <<action-settings,action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings.
You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 170 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Before After
Before After

View file

@ -81,7 +81,7 @@ describe('Jira Fields: Preview', () => {
const getByText = createQueryWithMarkup(screen.getByText);
expect(getByText('Incident Types: Malware, Denial of Service')).toBeInTheDocument();
expect(getByText('Incident types: Malware, Denial of Service')).toBeInTheDocument();
expect(getByText('Severity: Medium')).toBeInTheDocument();
});
});

View file

@ -31,7 +31,7 @@ export const INCIDENT_TYPES_PLACEHOLDER = i18n.translate(
export const INCIDENT_TYPES_LABEL = i18n.translate(
'xpack.cases.connectors.resilient.incidentTypesLabel',
{
defaultMessage: 'Incident Types',
defaultMessage: 'Incident types',
}
);

View file

@ -11,6 +11,7 @@ import {
EuiComboBox,
EuiSelect,
EuiSpacer,
EuiText,
EuiTitle,
EuiComboBoxOptionOption,
EuiSelectOption,
@ -171,7 +172,7 @@ const ResilientParamsFields: React.FunctionComponent<ActionParamsProps<Resilient
fullWidth
label={i18n.translate(
'xpack.stackConnectors.components.resilient.urgencySelectFieldLabel',
{ defaultMessage: 'Incident Type' }
{ defaultMessage: 'Incident type' }
)}
>
<EuiComboBox
@ -214,8 +215,13 @@ const ResilientParamsFields: React.FunctionComponent<ActionParamsProps<Resilient
incident.name !== undefined
}
label={i18n.translate('xpack.stackConnectors.components.resilient.nameFieldLabel', {
defaultMessage: 'Name (required)',
defaultMessage: 'Name',
})}
labelAppend={
<EuiText size="xs" color="subdued">
Required
</EuiText>
}
>
<TextFieldWithMessageVariables
index={index}

View file

@ -21,14 +21,14 @@ export const ORG_ID_LABEL = i18n.translate('xpack.stackConnectors.components.res
export const API_KEY_ID_LABEL = i18n.translate(
'xpack.stackConnectors.components.resilient.apiKeyId',
{
defaultMessage: 'API Key ID',
defaultMessage: 'API key ID',
}
);
export const API_KEY_SECRET_LABEL = i18n.translate(
'xpack.stackConnectors.components.resilient.apiKeySecret',
{
defaultMessage: 'API Key Secret',
defaultMessage: 'API key secret',
}
);

View file

@ -0,0 +1,57 @@
/*
* 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 {
getExternalServiceSimulatorPath,
ExternalServiceSimulator,
} from '@kbn/actions-simulators-plugin/server/plugin';
import { FtrProviderContext } from '../../../ftr_provider_context';
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const actions = getService('actions');
const commonScreenshots = getService('commonScreenshots');
const screenshotDirectories = ['response_ops_docs', 'stack_connectors'];
const pageObjects = getPageObjects(['common', 'header']);
const testSubjects = getService('testSubjects');
const kibanaServer = getService('kibanaServer');
let resilientSimulatorUrl: string = '<could not determine kibana url>';
let smallUrl: string;
describe('ibm resilient connector', function () {
before(async () => {
resilientSimulatorUrl = kibanaServer.resolveUrl(
getExternalServiceSimulatorPath(ExternalServiceSimulator.RESILIENT)
);
smallUrl = resilientSimulatorUrl.replace('/elastic:changeme@', '/');
});
beforeEach(async () => {
await pageObjects.common.navigateToApp('connectors');
await pageObjects.header.waitUntilLoadingHasFinished();
});
it('ibm resilient connector creation screenshots', async () => {
await pageObjects.common.navigateToApp('connectors');
await pageObjects.header.waitUntilLoadingHasFinished();
await actions.common.openNewConnectorForm('resilient');
await testSubjects.setValue('nameInput', 'IBM Resilient test connector');
await testSubjects.setValue('config.apiUrl-input', smallUrl);
await testSubjects.setValue('config.orgId-input', '201');
await testSubjects.setValue('secrets.apiKeyId-input', 'tester');
await testSubjects.setValue('secrets.apiKeySecret-input', 'testkey');
await commonScreenshots.takeScreenshot('resilient-connector', screenshotDirectories);
await testSubjects.click('create-connector-flyout-save-test-btn');
// Close all toasts since it is unable to get incident types from example site
await pageObjects.common.clearAllToasts();
await pageObjects.header.waitUntilLoadingHasFinished();
await pageObjects.common.clearAllToasts();
await commonScreenshots.takeScreenshot('resilient-params-test', screenshotDirectories);
await testSubjects.click('euiFlyoutCloseButton');
});
});
}

View file

@ -57,6 +57,7 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) {
loadTestFile(require.resolve('./bedrock_connector'));
loadTestFile(require.resolve('./email_connector'));
loadTestFile(require.resolve('./generative_ai_connector'));
loadTestFile(require.resolve('./ibm_resilient_connector'));
loadTestFile(require.resolve('./index_connector'));
loadTestFile(require.resolve('./jira_connector'));
loadTestFile(require.resolve('./opsgenie_connector'));

View file

@ -76,7 +76,7 @@ describe('Cases connector incident fields', { tags: ['@ess', '@serverless'] }, (
cy.get(CONNECTOR_TITLE).should('have.text', getIbmResilientConnectorOptions().title);
cy.get(CONNECTOR_CARD_DETAILS).should(
'have.text',
`Incident Types: ${getIbmResilientConnectorOptions().incidentTypes.join(', ')}Severity: ${
`Incident types: ${getIbmResilientConnectorOptions().incidentTypes.join(', ')}Severity: ${
getIbmResilientConnectorOptions().severity
}`
);