-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-uuid-to-kb-entries-to-avoid-overwriting
- Loading branch information
Showing
3,261 changed files
with
55,428 additions
and
33,660 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
34 changes: 34 additions & 0 deletions
34
.buildkite/pipeline-resource-definitions/kibana-codeql.yml
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,34 @@ | ||
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Resource | ||
metadata: | ||
name: bk-kibana-codeql | ||
description: Run CodeQL | ||
links: | ||
- title: Pipeline link | ||
url: https://buildkite.com/elastic/kibana-codeql | ||
spec: | ||
type: buildkite-pipeline | ||
owner: group:kibana-operations | ||
system: buildkite | ||
implementation: | ||
apiVersion: buildkite.elastic.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: kibana / codeql | ||
description: Run CodeQL | ||
spec: | ||
env: | ||
SLACK_NOTIFICATIONS_CHANNEL: "#kibana-operations-alerts" | ||
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "false" | ||
repository: elastic/kibana | ||
branch_configuration: main | ||
default_branch: main | ||
pipeline_file: ".buildkite/pipelines/codeql/codeql.yml" | ||
provider_settings: | ||
trigger_mode: none | ||
teams: | ||
kibana-operations: | ||
access_level: MANAGE_BUILD_AND_READ | ||
everyone: | ||
access_level: READ_ONLY |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
steps: | ||
- command: echo "Placeholder" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
source .buildkite/scripts/common/util.sh | ||
|
||
echo --- Check Production Native Node Modules | ||
node scripts/check_prod_native_modules |
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,20 @@ | ||
.buildkite/scripts/steps/checks/precommit_hook.sh | ||
.buildkite/scripts/steps/checks/ts_projects.sh | ||
.buildkite/scripts/steps/checks/packages.sh | ||
.buildkite/scripts/steps/checks/bazel_packages.sh | ||
.buildkite/scripts/steps/checks/verify_notice.sh | ||
.buildkite/scripts/steps/checks/plugin_list_docs.sh | ||
.buildkite/scripts/steps/checks/event_log.sh | ||
.buildkite/scripts/steps/checks/telemetry.sh | ||
.buildkite/scripts/steps/checks/jest_configs.sh | ||
.buildkite/scripts/steps/checks/bundle_limits.sh | ||
.buildkite/scripts/steps/checks/i18n.sh | ||
.buildkite/scripts/steps/checks/file_casing.sh | ||
.buildkite/scripts/steps/checks/licenses.sh | ||
.buildkite/scripts/steps/checks/test_projects.sh | ||
.buildkite/scripts/steps/checks/test_hardening.sh | ||
.buildkite/scripts/steps/checks/ftr_configs.sh | ||
.buildkite/scripts/steps/checks/yarn_deduplicate.sh | ||
.buildkite/scripts/steps/checks/prettier_topology.sh | ||
.buildkite/scripts/steps/checks/renovate.sh | ||
.buildkite/scripts/steps/checks/native_modules.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# /bin/bash or /bin/zsh (oh-my-zsh is installed by default as well) | ||
SHELL=/bin/bash | ||
# Switch to 1 to enable FIPS environment, any other value to disable | ||
FIPS=0 |
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,69 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04 | ||
|
||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 | ||
ENV HOME=/home/vscode | ||
ENV NVM_DIR=${HOME}/nvm | ||
ENV NVM_VERSION=v0.39.1 | ||
ENV KBN_DIR=/workspaces/kibana | ||
ENV OPENSSL_PATH=${HOME}/openssl | ||
# Only specific versions are FIPS certified. | ||
ENV OPENSSL_VERSION='3.0.8' | ||
|
||
RUN apt-get update && apt-get install -y curl git zsh locales docker.io perl make gcc xvfb | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
|
||
# Oh My Zsh setup | ||
RUN if [ ! -d "$HOME/.oh-my-zsh" ]; then \ | ||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"; \ | ||
fi && \ | ||
ZSH_CUSTOM=${ZSH_CUSTOM:-~/.oh-my-zsh/custom} && \ | ||
if [ ! -d "$ZSH_CUSTOM/plugins/zsh-autosuggestions" ]; then \ | ||
git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions; \ | ||
fi && \ | ||
sed -i 's/plugins=(git)/plugins=(git ssh-agent npm docker zsh-autosuggestions)/' /home/vscode/.zshrc | ||
|
||
# Docker-in-Docker setup | ||
RUN usermod -aG docker vscode | ||
|
||
# FIPS setup | ||
# https://github.com/openssl/openssl/blob/openssl-3.0/README-FIPS.md | ||
# https://www.openssl.org/docs/man3.0/man7/fips_module.html | ||
WORKDIR ${HOME} | ||
|
||
RUN set -e ; \ | ||
mkdir -p "${OPENSSL_PATH}"; \ | ||
curl --retry 8 -S -L -O "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" ; \ | ||
curl --retry 8 -S -L -O "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz.sha256" ; \ | ||
echo "$(cat openssl-${OPENSSL_VERSION}.tar.gz.sha256) openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c ; \ | ||
tar -zxf "openssl-${OPENSSL_VERSION}.tar.gz" ; \ | ||
rm -rf openssl-${OPENSSL_VERSION}.tar* ; \ | ||
cd "${OPENSSL_PATH}-${OPENSSL_VERSION}" ; \ | ||
./Configure --prefix="${OPENSSL_PATH}" --openssldir="${OPENSSL_PATH}/ssl" --libdir="${OPENSSL_PATH}/lib" shared -Wl,-rpath,${OPENSSL_PATH}/lib enable-fips; \ | ||
make -j $(nproc) > /dev/null ; \ | ||
make install > /dev/null ; \ | ||
rm -rf "${OPENSSL_PATH}-${OPENSSL_VERSION}" ; \ | ||
chown -R 1000:1000 "${OPENSSL_PATH}"; | ||
|
||
WORKDIR ${KBN_DIR} | ||
|
||
# Node and NVM setup | ||
COPY .node-version /tmp/ | ||
RUN mkdir -p $NVM_DIR && \ | ||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash && \ | ||
. "$NVM_DIR/nvm.sh" && \ | ||
NODE_VERSION=$(cat /tmp/.node-version) && \ | ||
nvm install ${NODE_VERSION} && \ | ||
nvm use ${NODE_VERSION} && \ | ||
nvm alias default ${NODE_VERSION} && \ | ||
npm install -g yarn && \ | ||
echo "source $NVM_DIR/nvm.sh" >> ${HOME}/.bashrc && \ | ||
echo "source $NVM_DIR/nvm.sh" >> ${HOME}/.zshrc && \ | ||
chown -R 1000:1000 "${HOME}/.npm" | ||
|
||
# Reload the env everytime a new shell is opened incase the .env file changed. | ||
RUN echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.bashrc && \ | ||
echo "source $KBN_DIR/.devcontainer/scripts/env.sh" >> ${HOME}/.zshrc | ||
|
||
# This is for documentation. Ports are exposed via devcontainer.json | ||
EXPOSE 9200 5601 9229 9230 9231 |
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 @@ | ||
See the [dev docs](https://github.com/elastic/kibana/blob/main/dev_docs/getting_started/setting_up_a_development_env.mdx#using-the-kibana-dev-container-optional) for information on using the Kibana Dev Container. |
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,28 @@ | ||
########################################################################## | ||
## ## | ||
## This OpenSSL config is only loaded when running Kibana in FIPS mode. ## | ||
## ## | ||
## See: ## | ||
## https://github.com/openssl/openssl/blob/openssl-3.0/README-FIPS.md ## | ||
## https://www.openssl.org/docs/man3.0/man7/fips_module.html ## | ||
## ## | ||
########################################################################## | ||
|
||
nodejs_conf = nodejs_init | ||
.include /home/vscode/openssl/ssl/fipsmodule.cnf | ||
|
||
[nodejs_init] | ||
providers = provider_sect | ||
alg_section = algorithm_sect | ||
|
||
[provider_sect] | ||
default = default_sect | ||
# The fips section name should match the section name inside the | ||
# included fipsmodule.cnf. | ||
fips = fips_sect | ||
|
||
[default_sect] | ||
activate = 1 | ||
|
||
[algorithm_sect] | ||
default_properties = fips=yes |
Oops, something went wrong.