Skip to content

Commit f579bc7

Browse files
authored
Merge branch 'main' into bfilar.ml-refactor-2
2 parents 55acc7c + 8a21895 commit f579bc7

110 files changed

Lines changed: 4384 additions & 1455 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/scripts/steps/artifacts/cloud.sh

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,39 @@ jq '
4343
' .buildkite/scripts/steps/cloud/deploy.json > "$DEPLOYMENT_SPEC"
4444

4545
ecctl deployment create --track --output json --file "$DEPLOYMENT_SPEC" &> "$LOGS"
46-
CLOUD_DEPLOYMENT_USERNAME=$(jq --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.username' "$LOGS")
47-
CLOUD_DEPLOYMENT_PASSWORD=$(jq --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.password' "$LOGS")
46+
CLOUD_DEPLOYMENT_USERNAME=$(jq -r --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.username' "$LOGS")
47+
CLOUD_DEPLOYMENT_PASSWORD=$(jq -r --slurp '.[]|select(.resources).resources[] | select(.credentials).credentials.password' "$LOGS")
4848
CLOUD_DEPLOYMENT_ID=$(jq -r --slurp '.[0].id' "$LOGS")
4949
CLOUD_DEPLOYMENT_STATUS_MESSAGES=$(jq --slurp '[.[]|select(.resources == null)]' "$LOGS")
5050

5151
CLOUD_DEPLOYMENT_KIBANA_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.kibana[0].info.metadata.aliased_url')
5252
CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.elasticsearch[0].info.metadata.aliased_url')
5353

54-
# NOTE: disabled pending log sanitization
55-
# echo "--- Setup FTR"
56-
# export TEST_KIBANA_PROTOCOL=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').protocol)")
57-
# export TEST_KIBANA_HOSTNAME=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').hostname)")
58-
# export TEST_KIBANA_PORT=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').port)")
59-
# export TEST_KIBANA_USERNAME=$CLOUD_DEPLOYMENT_USERNAME"
60-
# export TEST_KIBANA_PASS=$CLOUD_DEPLOYMENT_PASSWORD"
54+
echo "Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL"
55+
echo "ES: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL"
6156

62-
# export TEST_ES_PROTOCOL=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').protocol)")
63-
# export TEST_ES_HOSTNAME==$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').hostname)")
64-
# export TEST_ES_PORT=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').port)")
65-
# export TEST_ES_USER="$CLOUD_DEPLOYMENT_USERNAME"
66-
# export TEST_ES_PASS="$CLOUD_DEPLOYMENT_PASSWORD"
57+
function shutdown {
58+
echo "--- Shutdown deployment"
59+
ecctl deployment shutdown "$CLOUD_DEPLOYMENT_ID" --force --track --output json &> "$LOGS"
60+
}
61+
trap "shutdown" EXIT
6762

68-
# export TEST_BROWSER_HEADLESS=1
63+
export TEST_KIBANA_PROTOCOL=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').protocol.replace(':', ''))")
64+
export TEST_KIBANA_HOSTNAME=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').hostname)")
65+
export TEST_KIBANA_PORT=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_KIBANA_URL').port)")
66+
export TEST_KIBANA_USERNAME="$CLOUD_DEPLOYMENT_USERNAME"
67+
export TEST_KIBANA_PASSWORD="$CLOUD_DEPLOYMENT_PASSWORD"
6968

70-
# Error: attempted to use the "es" service to fetch Elasticsearch version info but the request failed: ConnectionError: self signed certificate in certificate chain
71-
# export NODE_TLS_REJECT_UNAUTHORIZED=0
69+
export TEST_ES_PROTOCOL=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_ELASTICSEARCH_URL').protocol.replace(':', ''))")
70+
export TEST_ES_HOSTNAME=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_ELASTICSEARCH_URL').hostname)")
71+
export TEST_ES_PORT=$(node -e "console.log(new URL('$CLOUD_DEPLOYMENT_ELASTICSEARCH_URL').port)")
72+
export TEST_ES_USERNAME="$CLOUD_DEPLOYMENT_USERNAME"
73+
export TEST_ES_PASSWORD="$CLOUD_DEPLOYMENT_PASSWORD"
7274

73-
# echo "--- Run default functional tests"
74-
# node --no-warnings scripts/functional_test_runner.js --include-tag=cloud -exclude-tag=skipCloud
75+
export TEST_BROWSER_HEADLESS=1
7576

76-
# echo "--- Run x-pack functional tests"
77-
# cd x-pack
78-
# node --no-warnings scripts/functional_test_runner.js --include-tag=cloud -exclude-tag=skipCloud
77+
# Error: attempted to use the "es" service to fetch Elasticsearch version info but the request failed: ConnectionError: self signed certificate in certificate chain
78+
export NODE_TLS_REJECT_UNAUTHORIZED=0
7979

80-
echo "--- Shutdown deployment"
81-
ecctl deployment shutdown "$CLOUD_DEPLOYMENT_ID" --force --track --output json &> "$LOGS"
80+
echo "--- FTR - Reporting"
81+
node --no-warnings scripts/functional_test_runner.js --config x-pack/test/functional/apps/visualize/config.ts --include-tag=smoke --quiet

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ snapshots.js
3030
/x-pack/plugins/reporting/server/export_types/printable_pdf_v2/server/lib/pdf/assets/**
3131

3232
# package overrides
33-
/packages/elastic-eslint-config-kibana
33+
/packages/kbn-eslint-config
3434
/packages/kbn-plugin-generator/template
3535
/packages/kbn-generate/templates
3636
/packages/kbn-pm/dist

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const RESTRICTED_IMPORTS = [
230230
module.exports = {
231231
root: true,
232232

233-
extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'],
233+
extends: ['plugin:@elastic/eui/recommended', '@kbn/eslint-config'],
234234

235235
overrides: [
236236
/**
@@ -304,7 +304,7 @@ module.exports = {
304304
*/
305305
{
306306
files: [
307-
'packages/elastic-eslint-config-kibana/**/*.{js,mjs,ts,tsx}',
307+
'packages/kbn-eslint-config/**/*.{js,mjs,ts,tsx}',
308308
'packages/kbn-datemath/**/*.{js,mjs,ts,tsx}',
309309
],
310310
rules: {

docs/api/cases/cases-api-add-comment.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ The API returns details about the case and its comments. For example:
119119
"syncAlerts":false
120120
},
121121
"owner": "cases",
122+
"duration": null,
122123
"closed_at": null,
123124
"closed_by": null,
124125
"created_at": "2022-03-24T00:37:03.906Z",

docs/api/cases/cases-api-create.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ the case identifier, version, and creation time. For example:
205205
},
206206
"owner": "securitySolution",
207207
"description": "James Bond clicked on a highly suspicious email banner advertising cheap holidays for underpaid civil servants. Operation bubblegum is active. Repeat - operation bubblegum is now active",
208+
"duration": null,
208209
"closed_at": null,
209210
"closed_by": null,
210211
"created_at": "2022-05-13T09:16:17.416Z",

docs/api/cases/cases-api-find-cases.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ The API returns a JSON object listing the retrieved cases. For example:
125125
"syncAlerts": true
126126
},
127127
"owner": "securitySolution",
128+
"duration": null,
128129
"closed_at": null,
129130
"closed_by": null,
130131
"created_at": "2022-03-29T13:03:23.533Z",
@@ -164,6 +165,7 @@ The API returns a JSON object listing the retrieved cases. For example:
164165
"syncAlerts": false
165166
},
166167
"owner": "cases",
168+
"duration": null,
167169
"closed_at": null,
168170
"closed_by": null,
169171
"created_at": "2022-03-29T11:30:02.658Z",

docs/api/cases/cases-api-get-case.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The API returns a JSON object with the retrieved case. For example:
5959
"version": "Wzk4LDFd",
6060
"comments": [],
6161
"totalComment": 0,
62+
"totalAlerts": 0,
6263
"closed_at": null,
6364
"closed_by": null,
6465
"created_at": "2020-03-29T11:30:02.658Z",
@@ -90,6 +91,7 @@ The API returns a JSON object with the retrieved case. For example:
9091
"syncAlerts": true
9192
},
9293
"owner": "securitySolution",
94+
"duration": null,
9395
"tags": [
9496
"phishing",
9597
"social engineering",

docs/api/cases/cases-api-push.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ The API returns a JSON object representing the pushed case. For example:
6868
"syncAlerts": true
6969
},
7070
"owner": "securitySolution",
71+
"duration": null,
7172
"closed_at": null,
7273
"closed_by": null,
7374
"created_at": "2022-03-29T11:30:02.658Z",

docs/api/cases/cases-api-update-comment.asciidoc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,35 +106,36 @@ The API returns details about the case and its comments. For example:
106106
"comments":[{
107107
"id": "8af6ac20-74f6-11ea-b83a-553aecdb28b6",
108108
"version": "WzIwNjM3LDFd",
109-
"comment":"That is nothing - Ethan Hunt answered a targeted social media campaign promoting phishy pension schemes to IMF operatives. Even worse, he likes baked beans.",
110-
"type":"user",
111-
"owner":"cases",
112-
"created_at":"2022-03-24T00:37:10.832Z",
109+
"comment": "That is nothing - Ethan Hunt answered a targeted social media campaign promoting phishy pension schemes to IMF operatives. Even worse, he likes baked beans.",
110+
"type": "user",
111+
"owner": "cases",
112+
"created_at": "2022-03-24T00:37:10.832Z",
113113
"created_by": {
114114
"email": "moneypenny@hms.gov.uk",
115115
"full_name": "Ms Moneypenny",
116116
"username": "moneypenny"
117117
},
118-
"pushed_at":null,
119-
"pushed_by":null,
120-
"updated_at":"2022-03-24T01:27:06.210Z",
118+
"pushed_at": null,
119+
"pushed_by": null,
120+
"updated_at": "2022-03-24T01:27:06.210Z",
121121
"updated_by": {
122122
"email": "jbond@hms.gov.uk",
123123
"full_name": "James Bond",
124124
"username": "_007"
125125
}
126126
}
127127
],
128-
"totalAlerts":0,
128+
"totalAlerts": 0,
129129
"id": "293f1bc0-74f6-11ea-b83a-553aecdb28b6",
130130
"version": "WzIwNjM2LDFd",
131131
"totalComment": 1,
132132
"title": "This case will self-destruct in 5 seconds",
133-
"tags": ["phishing","social engineering"],
133+
"tags": ["phishing","social engineering"],
134134
"description": "James Bond clicked on a highly suspicious email banner advertising cheap holidays for underpaid civil servants.",
135135
"settings": {"syncAlerts":false},
136-
"owner": "cases","
137-
closed_at": null,
136+
"owner": "cases",
137+
"duration": null,
138+
"closed_at": null,
138139
"closed_by": null,
139140
"created_at": "2022-03-24T00:37:03.906Z",
140141
"created_by": {

docs/api/cases/cases-api-update.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ The API returns the updated case with a new `version` value. For example:
226226
},
227227
"owner": "securitySolution",
228228
"description": "James Bond clicked on a highly suspicious email banner advertising cheap holidays for underpaid civil servants. Operation bubblegum is active. Repeat - operation bubblegum is now active!",
229+
"duration": null,
229230
"closed_at": null,
230231
"closed_by": null,
231232
"created_at": "2022-05-13T09:16:17.416Z",

0 commit comments

Comments
 (0)