-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alerting/allow-manage-rules-with-api-key-auth' of githu…
…b.com:doakalexi/kibana into alerting/allow-manage-rules-with-api-key-auth
- Loading branch information
Showing
55 changed files
with
1,295 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
x-pack/plugins/rule_registry/common/schemas/8.8.0/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* 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 { ALERT_RULE_REVISION } from '@kbn/rule-data-utils'; | ||
import { CommonAlertFields870 } from '../8.7.0'; | ||
|
||
/* DO NOT MODIFY THIS SCHEMA TO ADD NEW FIELDS. These types represent the alerts that shipped in 8.8.0. | ||
Any changes to these types should be bug fixes so the types more accurately represent the alerts from 8.8.0. | ||
If you are adding new fields for a new release of Kibana, create a new sibling folder to this one | ||
for the version to be released and add the field(s) to the schema in that folder. | ||
Then, update `../index.ts` to import from the new folder that has the latest schemas, add the | ||
new schemas to the union of all alert schemas, and re-export the new schemas as the `*Latest` schemas. | ||
*/ | ||
|
||
export interface RevisionField880 { | ||
[ALERT_RULE_REVISION]: number; | ||
} | ||
|
||
export type CommonAlertFields880 = CommonAlertFields870 & RevisionField880; | ||
|
||
export type CommonAlertFieldName880 = keyof CommonAlertFields880; | ||
|
||
export type AlertWithCommonFields880<T> = T & CommonAlertFields880; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...ion/cypress/e2e/detection_alerts/expandable_flyout/alert_details_right_panel_header.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* 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 { upperFirst } from 'lodash'; | ||
import { | ||
DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_RISK_SCORE, | ||
DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_RISK_SCORE_VALUE, | ||
DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_SEVERITY, | ||
DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_SEVERITY_VALUE, | ||
DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_TITLE, | ||
} from '../../../screens/document_expandable_flyout'; | ||
import { expandFirstAlertExpandableFlyout } from '../../../tasks/document_expandable_flyout'; | ||
import { cleanKibana } from '../../../tasks/common'; | ||
import { login, visit } from '../../../tasks/login'; | ||
import { createRule } from '../../../tasks/api_calls/rules'; | ||
import { getNewRule } from '../../../objects/rule'; | ||
import { ALERTS_URL } from '../../../urls/navigation'; | ||
import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; | ||
|
||
// Skipping these for now as the feature is protected behind a feature flag set to false by default | ||
// To run the tests locally, add 'securityFlyoutEnabled' in the Cypress config.ts here https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/config.ts#L50 | ||
describe.skip( | ||
'Alert details expandable flyout right panel header', | ||
{ testIsolation: false }, | ||
() => { | ||
const rule = getNewRule(); | ||
|
||
before(() => { | ||
cleanKibana(); | ||
login(); | ||
createRule(rule); | ||
visit(ALERTS_URL); | ||
waitForAlertsToPopulate(); | ||
expandFirstAlertExpandableFlyout(); | ||
}); | ||
|
||
it('should display correct title in header', () => { | ||
cy.get(DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_TITLE) | ||
.should('be.visible') | ||
.and('have.text', rule.name); | ||
}); | ||
|
||
it('should display risk score in header', () => { | ||
cy.get(DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_RISK_SCORE).should('be.visible'); | ||
cy.get(DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_RISK_SCORE_VALUE) | ||
.should('be.visible') | ||
.and('have.text', rule.risk_score); | ||
}); | ||
|
||
it('should display severity in header', () => { | ||
cy.get(DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_SEVERITY).should('be.visible'); | ||
cy.get(DOCUMENT_DETAILS_OVERVIEW_TAB_HEADER_SEVERITY_VALUE) | ||
.should('be.visible') | ||
.and('have.text', upperFirst(rule.severity)); | ||
}); | ||
} | ||
); |
Oops, something went wrong.