Skip to content

Commit 99f875c

Browse files
Merge branch 'master' into convert-typescript
2 parents 4e1287b + 1ceaea1 commit 99f875c

File tree

1,315 files changed

+38366
-12593
lines changed

Some content is hidden

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

1,315 files changed

+38366
-12593
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ disabledPlugins
3131
webpackstats.json
3232
/config/*
3333
!/config/kibana.yml
34+
!/config/node.options
3435
coverage
3536
selenium
3637
.babel_register_cache.json

CONTRIBUTING.md

Lines changed: 2 additions & 736 deletions
Large diffs are not rendered by default.

NOTICE.txt

Lines changed: 64 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,70 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
147147
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
148148
SOFTWARE.
149149

150+
---
151+
Detection Rules
152+
Copyright 2020 Elasticsearch B.V.
153+
154+
---
155+
This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack
156+
which is available under a "MIT" license. The files based on this license are:
157+
158+
- defense_evasion_via_filter_manager
159+
- discovery_process_discovery_via_tasklist_command
160+
- persistence_priv_escalation_via_accessibility_features
161+
- persistence_via_application_shimming
162+
- defense_evasion_execution_via_trusted_developer_utilities
163+
164+
MIT License
165+
166+
Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong
167+
168+
Permission is hereby granted, free of charge, to any person obtaining a copy of
169+
this software and associated documentation files (the "Software"), to deal in
170+
the Software without restriction, including without limitation the rights to
171+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
172+
of the Software, and to permit persons to whom the Software is furnished to do
173+
so, subject to the following conditions:
174+
175+
The above copyright notice and this permission notice shall be included in all
176+
copies or substantial portions of the Software.
177+
178+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
179+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
180+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
181+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
182+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
183+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
184+
SOFTWARE.
185+
186+
---
187+
This product bundles rules based on https://github.com/FSecureLABS/leonidas
188+
which is available under a "MIT" license. The files based on this license are:
189+
190+
- credential_access_secretsmanager_getsecretvalue.toml
191+
192+
MIT License
193+
194+
Copyright (c) 2020 F-Secure LABS
195+
196+
Permission is hereby granted, free of charge, to any person obtaining a copy
197+
of this software and associated documentation files (the "Software"), to deal
198+
in the Software without restriction, including without limitation the rights
199+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
200+
copies of the Software, and to permit persons to whom the Software is
201+
furnished to do so, subject to the following conditions:
202+
203+
The above copyright notice and this permission notice shall be included in all
204+
copies or substantial portions of the Software.
205+
206+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
207+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
208+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
209+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
210+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
211+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
212+
SOFTWARE.
213+
150214
---
151215
This product bundles bootstrap@3.3.6 which is available under a
152216
"MIT" license.
@@ -220,38 +284,6 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
220284
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
221285
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
222286

223-
---
224-
This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack
225-
which is available under a "MIT" license. The files based on this license are:
226-
227-
- windows_defense_evasion_via_filter_manager.json
228-
- windows_process_discovery_via_tasklist_command.json
229-
- windows_priv_escalation_via_accessibility_features.json
230-
- windows_persistence_via_application_shimming.json
231-
- windows_execution_via_trusted_developer_utilities.json
232-
233-
MIT License
234-
235-
Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong
236-
237-
Permission is hereby granted, free of charge, to any person obtaining a copy of
238-
this software and associated documentation files (the "Software"), to deal in
239-
the Software without restriction, including without limitation the rights to
240-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
241-
of the Software, and to permit persons to whom the Software is furnished to do
242-
so, subject to the following conditions:
243-
244-
The above copyright notice and this permission notice shall be included in all
245-
copies or substantial portions of the Software.
246-
247-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
248-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
249-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
250-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
251-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
252-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
253-
SOFTWARE.
254-
255287
---
256288
This product includes code that is adapted from mapbox-gl-js, which is
257289
available under a "BSD-3-Clause" license.

STYLEGUIDE.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,18 @@
33
This guide applies to all development within the Kibana project and is
44
recommended for the development of all Kibana plugins.
55

6+
- [General](#general)
7+
- [HTML](#html)
8+
- [API endpoints](#api-endpoints)
9+
- [TypeScript/JavaScript](#typeScript/javaScript)
10+
- [SASS files](#sass-files)
11+
- [React](#react)
12+
613
Besides the content in this style guide, the following style guides may also apply
714
to all development within the Kibana project. Please make sure to also read them:
815

9-
- [Accessibility style guide](https://elastic.github.io/eui/#/guidelines/accessibility)
10-
- [SASS style guide](https://elastic.github.io/eui/#/guidelines/sass)
16+
- [Accessibility style guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/accessibility)
17+
- [SASS style guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/sass)
1118

1219
## General
1320

@@ -582,6 +589,39 @@ Do not use setters, they cause more problems than they can solve.
582589
583590
[sideeffect]: http://en.wikipedia.org/wiki/Side_effect_(computer_science)
584591
592+
## SASS files
593+
594+
When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).
595+
596+
All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/legacy/ui/public/styles/_globals_v7light.scss).
597+
598+
While the styles for this component will only be loaded if the component exists on the page,
599+
the styles **will** be global and so it is recommended to use a three letter prefix on your
600+
classes to ensure proper scope.
601+
602+
**Example:**
603+
604+
```tsx
605+
// component.tsx
606+
607+
import './component.scss';
608+
// All other imports below the SASS import
609+
610+
export const Component = () => {
611+
return (
612+
<div className="plgComponent" />
613+
);
614+
}
615+
```
616+
617+
```scss
618+
// component.scss
619+
620+
.plgComponent { ... }
621+
```
622+
623+
Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file.
624+
585625
## React
586626
587627
The following style guide rules are specific for working with the React framework.

config/node.options

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Node command line options
2+
## See `node --help` and `node --v8-options` for available options
3+
## Please note you should specify one option per line
4+
5+
## max size of old space in megabytes
6+
#--max-old-space-size=4096

docs/developer/add-data-guide.asciidoc

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[[development-basepath]]
2+
=== Considerations for basepath
3+
4+
In dev mode, {kib} by default runs behind a proxy which adds a random path component to its URL.
5+
6+
You can set this explicitly using `server.basePath` in <<settings>>.
7+
8+
Use the server.rewriteBasePath setting to tell {kib} if it should remove the basePath from requests it receives, and to prevent a deprecation warning at startup. This setting cannot end in a slash (/).
9+
10+
If you want to turn off the basepath when in development mode, start {kib} with the `--no-basepath` flag
11+
12+
[source,bash]
13+
----
14+
yarn start --no-basepath
15+
----
16+
17+
18+

docs/developer/core/development-es-snapshots.asciidoc renamed to docs/developer/advanced/development-es-snapshots.asciidoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[[development-es-snapshots]]
22
=== Daily Elasticsearch Snapshots
33

4-
For local development and CI, Kibana, by default, uses Elasticsearch snapshots that are built daily when running tasks that require Elasticsearch (e.g. functional tests).
4+
For local development and CI, {kib}, by default, uses Elasticsearch snapshots that are built daily when running tasks that require Elasticsearch (e.g. functional tests).
55

66
A snapshot is just a group of tarballs, one for each supported distribution/architecture/os of Elasticsearch, and a JSON-based manifest file containing metadata about the distributions.
77

88
https://ci.kibana.dev/es-snapshots[A dashboard] is available that shows the current status and compatibility of the latest Elasticsearch snapshots.
99

1010
==== Process Overview
1111

12-
1. Elasticsearch snapshots are built for each current tracked branch of Kibana.
12+
1. Elasticsearch snapshots are built for each current tracked branch of {kib}.
1313
2. Each snapshot is uploaded to a public Google Cloud Storage bucket, `kibana-ci-es-snapshots-daily`.
1414
** At this point, the snapshot is not automatically used in CI or local development. It needs to be tested/verified first.
15-
3. Each snapshot is tested with the latest commit of the corresponding Kibana branch, using the full CI suite.
15+
3. Each snapshot is tested with the latest commit of the corresponding {kib} branch, using the full CI suite.
1616
4. After CI
1717
** If the snapshot passes, it is promoted and automatically used in CI and local development.
18-
** If the snapshot fails, the issue must be investigated and resolved. A new incompatibility may exist between Elasticsearch and Kibana.
18+
** If the snapshot fails, the issue must be investigated and resolved. A new incompatibility may exist between Elasticsearch and {kib}.
1919

2020
==== Using the latest snapshot
2121

@@ -39,7 +39,7 @@ KBN_ES_SNAPSHOT_USE_UNVERIFIED=true node scripts/functional_tests_server
3939

4040
Currently, there is not a way to run your pull request with the latest unverified snapshot without a code change. You can, however, do it with a small code change.
4141

42-
1. Edit `Jenkinsfile` in the root of the Kibana repo
42+
1. Edit `Jenkinsfile` in the root of the {kib} repo
4343
2. Add `env.KBN_ES_SNAPSHOT_USE_UNVERIFIED = 'true'` at the top of the file.
4444
3. Commit the change
4545

@@ -75,13 +75,13 @@ The file structure for this bucket looks like this:
7575

7676
==== How snapshots are built, tested, and promoted
7777

78-
Each day, a https://kibana-ci.elastic.co/job/elasticsearch+snapshots+trigger/[Jenkins job] runs that triggers Elasticsearch builds for each currently tracked branch/version. This job is automatically updated with the correct branches whenever we release new versions of Kibana.
78+
Each day, a https://kibana-ci.elastic.co/job/elasticsearch+snapshots+trigger/[Jenkins job] runs that triggers Elasticsearch builds for each currently tracked branch/version. This job is automatically updated with the correct branches whenever we release new versions of {kib}.
7979

8080
===== Build
8181

8282
https://kibana-ci.elastic.co/job/elasticsearch+snapshots+build/[This Jenkins job] builds the Elasticsearch snapshots and uploads them to GCS.
8383

84-
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_build_es[in the kibana repo].
84+
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_build_es[in the {kib} repo].
8585

8686
1. Checkout Elasticsearch repo for the given branch/version.
8787
2. Run `./gradlew -p distribution/archives assemble --parallel` to create all of the Elasticsearch distributions.
@@ -91,15 +91,15 @@ The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/ma
9191
** e.g. `<version>/archives/<unique id>`
9292
6. Replace `<version>/manifest-latest.json` in GCS with this newest manifest.
9393
** This allows the `KBN_ES_SNAPSHOT_USE_UNVERIFIED` flag to work.
94-
7. Trigger the verification job, to run the full Kibana CI test suite with this snapshot.
94+
7. Trigger the verification job, to run the full {kib} CI test suite with this snapshot.
9595

9696
===== Verification and Promotion
9797

98-
https://kibana-ci.elastic.co/job/elasticsearch+snapshots+verify/[This Jenkins job] tests the latest Elasticsearch snapshot with the full Kibana CI pipeline, and promotes if it there are no test failures.
98+
https://kibana-ci.elastic.co/job/elasticsearch+snapshots+verify/[This Jenkins job] tests the latest Elasticsearch snapshot with the full {kib} CI pipeline, and promotes if it there are no test failures.
9999

100-
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_verify_es[in the kibana repo].
100+
The Jenkins job pipeline definition is https://github.com/elastic/kibana/blob/master/.ci/es-snapshots/Jenkinsfile_verify_es[in the {kib} repo].
101101

102-
1. Checkout Kibana and set up CI environment as normal.
102+
1. Checkout {kib} and set up CI environment as normal.
103103
2. Set the `ES_SNAPSHOT_MANIFEST` env var to point to the latest snapshot manifest.
104104
3. Run CI (functional tests, integration tests, etc).
105105
4. After CI
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[[advanced]]
2+
== Advanced
3+
4+
* <<running-elasticsearch>>
5+
* <<development-es-snapshots>>
6+
* <<development-basepath>>
7+
8+
include::development-es-snapshots.asciidoc[]
9+
10+
include::running-elasticsearch.asciidoc[]
11+
12+
include::development-basepath.asciidoc[]

0 commit comments

Comments
 (0)