diff --git a/.buildkite/scripts/steps/es_snapshots/build.sh b/.buildkite/scripts/steps/es_snapshots/build.sh index 91b5004594a6d..975d5944da883 100755 --- a/.buildkite/scripts/steps/es_snapshots/build.sh +++ b/.buildkite/scripts/steps/es_snapshots/build.sh @@ -61,7 +61,14 @@ export DOCKER_TLS_CERTDIR="$CERTS_DIR" export DOCKER_HOST=localhost:2377 echo "--- Build Elasticsearch" -./gradlew -Dbuild.docker=true assemble --parallel +./gradlew \ + :distribution:archives:darwin-aarch64-tar:assemble \ + :distribution:archives:darwin-tar:assemble \ + :distribution:docker:docker-export:assemble \ + :distribution:archives:linux-aarch64-tar:assemble \ + :distribution:archives:linux-tar:assemble \ + :distribution:archives:windows-zip:assemble \ + --parallel echo "--- Create distribution archives" find distribution -type f \( -name 'elasticsearch-*-*-*-*.tar.gz' -o -name 'elasticsearch-*-*-*-*.zip' \) -not -path '*no-jdk*' -not -path '*build-context*' -exec cp {} "$destination" \; diff --git a/.eslintrc.js b/.eslintrc.js index f45088f046bdd..0c2c78cd1dd7f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -498,6 +498,7 @@ module.exports = { 'x-pack/plugins/apm/**/*.js', 'test/*/config.ts', 'test/*/config_open.ts', + 'test/*/*.config.ts', 'test/*/{tests,test_suites,apis,apps}/**/*', 'test/visual_regression/tests/**/*', 'x-pack/test/*/{tests,test_suites,apis,apps}/**/*', @@ -898,7 +899,12 @@ module.exports = { }, /** - * Security Solution overrides + * Security Solution overrides. These rules below are maintained and owned by + * the people within the security-solution-platform team. Please see ping them + * or check with them if you are encountering issues, have suggestions, or would + * like to add, change, or remove any particular rule. Linters, Typescript, and rules + * evolve and change over time just like coding styles, so please do not hesitate to + * reach out. */ { // front end and common typescript and javascript files only @@ -921,6 +927,22 @@ module.exports = { ], }, }, + { + // typescript only for front and back end, but excludes the test files. + // We use this section to add rules in which we do not want to apply to test files. + // This should be a very small set as most linter rules are useful for tests as well. + files: [ + 'x-pack/plugins/security_solution/**/*.{ts,tsx}', + 'x-pack/plugins/timelines/**/*.{ts,tsx}', + ], + excludedFiles: [ + 'x-pack/plugins/security_solution/**/*.{test,mock,test_helper}.{ts,tsx}', + 'x-pack/plugins/timelines/**/*.{test,mock,test_helper}.{ts,tsx}', + ], + rules: { + '@typescript-eslint/no-non-null-assertion': 'error', + }, + }, { // typescript only for front and back end files: [ @@ -1039,7 +1061,12 @@ module.exports = { }, /** - * Lists overrides + * Lists overrides. These rules below are maintained and owned by + * the people within the security-solution-platform team. Please see ping them + * or check with them if you are encountering issues, have suggestions, or would + * like to add, change, or remove any particular rule. Linters, Typescript, and rules + * evolve and change over time just like coding styles, so please do not hesitate to + * reach out. */ { // front end and common typescript and javascript files only @@ -1214,8 +1241,14 @@ module.exports = { ], }, }, + /** - * Metrics entities overrides + * Metrics entities overrides. These rules below are maintained and owned by + * the people within the security-solution-platform team. Please see ping them + * or check with them if you are encountering issues, have suggestions, or would + * like to add, change, or remove any particular rule. Linters, Typescript, and rules + * evolve and change over time just like coding styles, so please do not hesitate to + * reach out. */ { // front end and common typescript and javascript files only @@ -1596,6 +1629,7 @@ module.exports = { { files: [ 'src/plugins/interactive_setup/**/*.{js,mjs,ts,tsx}', + 'test/interactive_setup_api_integration/**/*.{js,mjs,ts,tsx}', 'x-pack/plugins/encrypted_saved_objects/**/*.{js,mjs,ts,tsx}', 'x-pack/plugins/security/**/*.{js,mjs,ts,tsx}', 'x-pack/plugins/spaces/**/*.{js,mjs,ts,tsx}', diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1e0a8b187c778..ec03acc752d55 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -244,7 +244,6 @@ /packages/kbn-std/ @elastic/kibana-core /packages/kbn-config/ @elastic/kibana-core /packages/kbn-logging/ @elastic/kibana-core -/packages/kbn-crypto/ @elastic/kibana-core /packages/kbn-http-tools/ @elastic/kibana-core /src/plugins/saved_objects_management/ @elastic/kibana-core /src/dev/run_check_published_api_changes.ts @elastic/kibana-core @@ -285,9 +284,11 @@ /packages/kbn-i18n/ @elastic/kibana-localization @elastic/kibana-core #CC# /x-pack/plugins/translations/ @elastic/kibana-localization @elastic/kibana-core -# Security +# Kibana Platform Security +/packages/kbn-crypto/ @elastic/kibana-security /src/core/server/csp/ @elastic/kibana-security @elastic/kibana-core /src/plugins/interactive_setup/ @elastic/kibana-security +/test/interactive_setup_api_integration/ @elastic/kibana-security /x-pack/plugins/spaces/ @elastic/kibana-security /x-pack/plugins/encrypted_saved_objects/ @elastic/kibana-security /x-pack/plugins/security/ @elastic/kibana-security diff --git a/config/kibana.yml b/config/kibana.yml index 2648cdfa924ae..8338a148ef176 100644 --- a/config/kibana.yml +++ b/config/kibana.yml @@ -94,6 +94,8 @@ #logging.appenders.default: # type: file # fileName: /var/logs/kibana.log +# layout: +# type: json # Logs queries sent to Elasticsearch. #logging.loggers: diff --git a/docs/developer/plugin/external-plugin-localization.asciidoc b/docs/developer/plugin/external-plugin-localization.asciidoc index d30dec1a8f46b..656dff90fe0de 100644 --- a/docs/developer/plugin/external-plugin-localization.asciidoc +++ b/docs/developer/plugin/external-plugin-localization.asciidoc @@ -135,27 +135,6 @@ export const Component = () => { Full details are {kib-repo}tree/master/packages/kbn-i18n#react[here]. - - -[discrete] -==== i18n for Angular - -You are encouraged to use `i18n.translate()` by statically importing `i18n` from `@kbn/i18n` wherever possible in your Angular code. Angular wrappers use the translation `service` with the i18n engine under the hood. - -The translation directive has the following syntax: -["source","js"] ------------ - ------------ - -Full details are {kib-repo}tree/master/packages/kbn-i18n#angularjs[here]. - - [discrete] === Resources diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md index 51101c8804680..d90972d327041 100644 --- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md +++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.md @@ -17,4 +17,5 @@ export interface DocLinksStart | --- | --- | --- | | [DOC\_LINK\_VERSION](./kibana-plugin-core-public.doclinksstart.doc_link_version.md) | string | | | [ELASTIC\_WEBSITE\_URL](./kibana-plugin-core-public.doclinksstart.elastic_website_url.md) | string | | -| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly settings: string;
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly customLinks: string;
readonly droppedTransactionSpans: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {
readonly guide: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
readonly urlDrilldownVariables: string;
};
readonly discover: Record<string, string>;
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
readonly suricataModule: string;
readonly zeekModule: string;
};
readonly auditbeat: {
readonly base: string;
readonly auditdModule: string;
readonly systemModule: string;
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly libbeat: {
readonly getStarted: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly composite: string;
readonly composite_missing_bucket: string;
readonly date_histogram: string;
readonly date_range: string;
readonly date_format_pattern: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessLangSpec: string;
readonly painlessSyntax: string;
readonly painlessWalkthrough: string;
readonly luceneExpressions: string;
};
readonly search: {
readonly sessions: string;
readonly sessionLimits: string;
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
readonly runtimeFields: string;
};
readonly addData: string;
readonly kibana: string;
readonly upgradeAssistant: string;
readonly rollupJobs: string;
readonly elasticsearch: Record<string, string>;
readonly siem: {
readonly privileges: string;
readonly guide: string;
readonly gettingStarted: string;
readonly ml: string;
readonly ruleChangeLog: string;
readonly detectionsReq: string;
readonly networkMap: string;
};
readonly securitySolution: {
readonly trustedApps: string;
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly autocompleteChanges: string;
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
byteSizeUnits: string;
createAutoFollowPattern: string;
createFollower: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
createRoleMappingTemplates: string;
createRollupJobsRequest: string;
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
timeUnits: string;
updateTransform: string;
}>;
readonly observability: Readonly<{
guide: string;
infrastructureThreshold: string;
logsThreshold: string;
metricsThreshold: string;
monitorStatus: string;
monitorUptime: string;
tlsCertificate: string;
uptimeDurationAnomaly: string;
}>;
readonly alerting: Record<string, string>;
readonly maps: Record<string, string>;
readonly monitoring: Record<string, string>;
readonly security: Readonly<{
apiKeyServiceSettings: string;
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
}>;
readonly ecs: {
readonly guide: string;
};
readonly clients: {
readonly guide: string;
readonly goOverview: string;
readonly javaIndex: string;
readonly jsIntro: string;
readonly netGuide: string;
readonly perlGuide: string;
readonly phpGuide: string;
readonly pythonGuide: string;
readonly rubyOverview: string;
readonly rustGuide: string;
};
} | | \ No newline at end of file +| [links](./kibana-plugin-core-public.doclinksstart.links.md) | {
readonly settings: string;
readonly elasticStackGetStarted: string;
readonly apm: {
readonly kibanaSettings: string;
readonly supportedServiceMaps: string;
readonly customLinks: string;
readonly droppedTransactionSpans: string;
readonly upgrading: string;
readonly metaData: string;
};
readonly canvas: {
readonly guide: string;
};
readonly dashboard: {
readonly guide: string;
readonly drilldowns: string;
readonly drilldownsTriggerPicker: string;
readonly urlDrilldownTemplateSyntax: string;
readonly urlDrilldownVariables: string;
};
readonly discover: Record<string, string>;
readonly filebeat: {
readonly base: string;
readonly installation: string;
readonly configuration: string;
readonly elasticsearchOutput: string;
readonly elasticsearchModule: string;
readonly startup: string;
readonly exportedFields: string;
readonly suricataModule: string;
readonly zeekModule: string;
};
readonly auditbeat: {
readonly base: string;
readonly auditdModule: string;
readonly systemModule: string;
};
readonly metricbeat: {
readonly base: string;
readonly configure: string;
readonly httpEndpoint: string;
readonly install: string;
readonly start: string;
};
readonly enterpriseSearch: {
readonly base: string;
readonly appSearchBase: string;
readonly workplaceSearchBase: string;
};
readonly heartbeat: {
readonly base: string;
};
readonly libbeat: {
readonly getStarted: string;
};
readonly logstash: {
readonly base: string;
};
readonly functionbeat: {
readonly base: string;
};
readonly winlogbeat: {
readonly base: string;
};
readonly aggs: {
readonly composite: string;
readonly composite_missing_bucket: string;
readonly date_histogram: string;
readonly date_range: string;
readonly date_format_pattern: string;
readonly filter: string;
readonly filters: string;
readonly geohash_grid: string;
readonly histogram: string;
readonly ip_range: string;
readonly range: string;
readonly significant_terms: string;
readonly terms: string;
readonly avg: string;
readonly avg_bucket: string;
readonly max_bucket: string;
readonly min_bucket: string;
readonly sum_bucket: string;
readonly cardinality: string;
readonly count: string;
readonly cumulative_sum: string;
readonly derivative: string;
readonly geo_bounds: string;
readonly geo_centroid: string;
readonly max: string;
readonly median: string;
readonly min: string;
readonly moving_avg: string;
readonly percentile_ranks: string;
readonly serial_diff: string;
readonly std_dev: string;
readonly sum: string;
readonly top_hits: string;
};
readonly runtimeFields: {
readonly overview: string;
readonly mapping: string;
};
readonly scriptedFields: {
readonly scriptFields: string;
readonly scriptAggs: string;
readonly painless: string;
readonly painlessApi: string;
readonly painlessLangSpec: string;
readonly painlessSyntax: string;
readonly painlessWalkthrough: string;
readonly luceneExpressions: string;
};
readonly search: {
readonly sessions: string;
readonly sessionLimits: string;
};
readonly indexPatterns: {
readonly introduction: string;
readonly fieldFormattersNumber: string;
readonly fieldFormattersString: string;
readonly runtimeFields: string;
};
readonly addData: string;
readonly kibana: string;
readonly upgradeAssistant: string;
readonly rollupJobs: string;
readonly elasticsearch: Record<string, string>;
readonly siem: {
readonly privileges: string;
readonly guide: string;
readonly gettingStarted: string;
readonly ml: string;
readonly ruleChangeLog: string;
readonly detectionsReq: string;
readonly networkMap: string;
readonly troubleshootGaps: string;
};
readonly securitySolution: {
readonly trustedApps: string;
};
readonly query: {
readonly eql: string;
readonly kueryQuerySyntax: string;
readonly luceneQuerySyntax: string;
readonly percolate: string;
readonly queryDsl: string;
readonly autocompleteChanges: string;
};
readonly date: {
readonly dateMath: string;
readonly dateMathIndexNames: string;
};
readonly management: Record<string, string>;
readonly ml: Record<string, string>;
readonly transforms: Record<string, string>;
readonly visualize: Record<string, string>;
readonly apis: Readonly<{
bulkIndexAlias: string;
byteSizeUnits: string;
createAutoFollowPattern: string;
createFollower: string;
createIndex: string;
createSnapshotLifecyclePolicy: string;
createRoleMapping: string;
createRoleMappingTemplates: string;
createRollupJobsRequest: string;
createApiKey: string;
createPipeline: string;
createTransformRequest: string;
cronExpressions: string;
executeWatchActionModes: string;
indexExists: string;
openIndex: string;
putComponentTemplate: string;
painlessExecute: string;
painlessExecuteAPIContexts: string;
putComponentTemplateMetadata: string;
putSnapshotLifecyclePolicy: string;
putIndexTemplateV1: string;
putWatch: string;
simulatePipeline: string;
timeUnits: string;
updateTransform: string;
}>;
readonly observability: Readonly<{
guide: string;
infrastructureThreshold: string;
logsThreshold: string;
metricsThreshold: string;
monitorStatus: string;
monitorUptime: string;
tlsCertificate: string;
uptimeDurationAnomaly: string;
}>;
readonly alerting: Record<string, string>;
readonly maps: Record<string, string>;
readonly monitoring: Record<string, string>;
readonly security: Readonly<{
apiKeyServiceSettings: string;
clusterPrivileges: string;
elasticsearchSettings: string;
elasticsearchEnableSecurity: string;
indicesPrivileges: string;
kibanaTLS: string;
kibanaPrivileges: string;
mappingRoles: string;
mappingRolesFieldRules: string;
runAsPrivilege: string;
}>;
readonly spaces: Readonly<{
kibanaLegacyUrlAliases: string;
kibanaDisableLegacyUrlAliasesApi: string;
}>;
readonly watcher: Record<string, string>;
readonly ccs: Record<string, string>;
readonly plugins: Record<string, string>;
readonly snapshotRestore: Record<string, string>;
readonly ingest: Record<string, string>;
readonly fleet: Readonly<{
guide: string;
fleetServer: string;
fleetServerAddFleetServer: string;
settings: string;
settingsFleetServerHostSettings: string;
troubleshooting: string;
elasticAgent: string;
datastreams: string;
datastreamsNamingScheme: string;
upgradeElasticAgent: string;
upgradeElasticAgent712lower: string;
learnMoreBlog: string;
apiKeysLearnMore: string;
}>;
readonly ecs: {
readonly guide: string;
};
readonly clients: {
readonly guide: string;
readonly goOverview: string;
readonly javaIndex: string;
readonly jsIntro: string;
readonly netGuide: string;
readonly perlGuide: string;
readonly phpGuide: string;
readonly pythonGuide: string;
readonly rubyOverview: string;
readonly rustGuide: string;
};
} | | + diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md similarity index 66% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md index d7d10651033bf..273945166735b 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.correctiveactions.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md) -## DeprecationsDetails.correctiveActions property +## BaseDeprecationDetails.correctiveActions property corrective action needed to fix this deprecation. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md similarity index 70% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md index 3a76bc60ee630..072dfd17418f9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.deprecationtype.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md) -## DeprecationsDetails.deprecationType property +## BaseDeprecationDetails.deprecationType property (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md similarity index 53% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md index 457cf7b61dac8..c8f0762acdce6 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.documentationurl.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.documentationurl.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [documentationUrl](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md) -## DeprecationsDetails.documentationUrl property +## BaseDeprecationDetails.documentationUrl property (optional) link to the documentation for more details on the deprecation. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md similarity index 66% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md index 64ad22e2c87fb..ad755805d00b9 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.level.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.level.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [level](./kibana-plugin-core-server.deprecationsdetails.level.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [level](./kibana-plugin-core-server.basedeprecationdetails.level.md) -## DeprecationsDetails.level property +## BaseDeprecationDetails.level property levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. diff --git a/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md new file mode 100644 index 0000000000000..3e47865062352 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) + +## BaseDeprecationDetails interface + +Base properties shared by all types of deprecations + +Signature: + +```typescript +export interface BaseDeprecationDetails +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [correctiveActions](./kibana-plugin-core-server.basedeprecationdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
omitContextFromBody?: boolean;
};
manualSteps: string[];
} | corrective action needed to fix this deprecation. | +| [deprecationType](./kibana-plugin-core-server.basedeprecationdetails.deprecationtype.md) | 'config' | 'feature' | (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. | +| [documentationUrl](./kibana-plugin-core-server.basedeprecationdetails.documentationurl.md) | string | (optional) link to the documentation for more details on the deprecation. | +| [level](./kibana-plugin-core-server.basedeprecationdetails.level.md) | 'warning' | 'critical' | 'fetch_error' | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. | +| [message](./kibana-plugin-core-server.basedeprecationdetails.message.md) | string | The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | +| [requireRestart](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md) | boolean | (optional) specify the fix for this deprecation requires a full kibana restart. | +| [title](./kibana-plugin-core-server.basedeprecationdetails.title.md) | string | The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | + diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md similarity index 60% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md index 906ce8118f95b..5802bc316cc08 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.message.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.message.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [message](./kibana-plugin-core-server.deprecationsdetails.message.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [message](./kibana-plugin-core-server.basedeprecationdetails.message.md) -## DeprecationsDetails.message property +## BaseDeprecationDetails.message property The description message to be displayed for the deprecation. Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md similarity index 54% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md index 85bddd9436e73..3f589600d0458 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.requirerestart.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.requirerestart.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [requireRestart](./kibana-plugin-core-server.basedeprecationdetails.requirerestart.md) -## DeprecationsDetails.requireRestart property +## BaseDeprecationDetails.requireRestart property (optional) specify the fix for this deprecation requires a full kibana restart. diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md similarity index 59% rename from docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md rename to docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md index e8907688f6e5e..b6788a4faa7c5 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.title.md +++ b/docs/development/core/server/kibana-plugin-core-server.basedeprecationdetails.title.md @@ -1,8 +1,8 @@ -[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) > [title](./kibana-plugin-core-server.deprecationsdetails.title.md) +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) > [title](./kibana-plugin-core-server.basedeprecationdetails.title.md) -## DeprecationsDetails.title property +## BaseDeprecationDetails.title property The title of the deprecation. Check the README for writing deprecations in `src/core/server/deprecations/README.mdx` diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md new file mode 100644 index 0000000000000..7af6c16d86e4a --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.configpath.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) > [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md) + +## ConfigDeprecationDetails.configPath property + +Signature: + +```typescript +configPath: string; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md new file mode 100644 index 0000000000000..fb3737062f986 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md) + +## ConfigDeprecationDetails.deprecationType property + +Signature: + +```typescript +deprecationType: 'config'; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md new file mode 100644 index 0000000000000..d1ccbb0b6164a --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.configdeprecationdetails.md @@ -0,0 +1,20 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) + +## ConfigDeprecationDetails interface + + +Signature: + +```typescript +export interface ConfigDeprecationDetails extends BaseDeprecationDetails +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [configPath](./kibana-plugin-core-server.configdeprecationdetails.configpath.md) | string | | +| [deprecationType](./kibana-plugin-core-server.configdeprecationdetails.deprecationtype.md) | 'config' | | + diff --git a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md index 2ff9f4b792f5d..d8ced1da62416 100644 --- a/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md +++ b/docs/development/core/server/kibana-plugin-core-server.deprecationsdetails.md @@ -2,24 +2,11 @@ [Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) -## DeprecationsDetails interface +## DeprecationsDetails type Signature: ```typescript -export interface DeprecationsDetails +export declare type DeprecationsDetails = ConfigDeprecationDetails | FeatureDeprecationDetails; ``` - -## Properties - -| Property | Type | Description | -| --- | --- | --- | -| [correctiveActions](./kibana-plugin-core-server.deprecationsdetails.correctiveactions.md) | {
api?: {
path: string;
method: 'POST' | 'PUT';
body?: {
[key: string]: any;
};
omitContextFromBody?: boolean;
};
manualSteps: string[];
} | corrective action needed to fix this deprecation. | -| [deprecationType](./kibana-plugin-core-server.deprecationsdetails.deprecationtype.md) | 'config' | 'feature' | (optional) Used to identify between different deprecation types. Example use case: in Upgrade Assistant, we may want to allow the user to sort by deprecation type or show each type in a separate tab.Feel free to add new types if necessary. Predefined types are necessary to reduce having similar definitions with different keywords across kibana deprecations. | -| [documentationUrl](./kibana-plugin-core-server.deprecationsdetails.documentationurl.md) | string | (optional) link to the documentation for more details on the deprecation. | -| [level](./kibana-plugin-core-server.deprecationsdetails.level.md) | 'warning' | 'critical' | 'fetch_error' | levels: - warning: will not break deployment upon upgrade - critical: needs to be addressed before upgrade. - fetch\_error: Deprecations service failed to grab the deprecation details for the domain. | -| [message](./kibana-plugin-core-server.deprecationsdetails.message.md) | string | The description message to be displayed for the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | -| [requireRestart](./kibana-plugin-core-server.deprecationsdetails.requirerestart.md) | boolean | (optional) specify the fix for this deprecation requires a full kibana restart. | -| [title](./kibana-plugin-core-server.deprecationsdetails.title.md) | string | The title of the deprecation. Check the README for writing deprecations in src/core/server/deprecations/README.mdx | - diff --git a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md new file mode 100644 index 0000000000000..b530874d3678b --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) > [deprecationType](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md) + +## FeatureDeprecationDetails.deprecationType property + +Signature: + +```typescript +deprecationType?: 'feature' | undefined; +``` diff --git a/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md new file mode 100644 index 0000000000000..bed3356e36129 --- /dev/null +++ b/docs/development/core/server/kibana-plugin-core-server.featuredeprecationdetails.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [kibana-plugin-core-server](./kibana-plugin-core-server.md) > [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) + +## FeatureDeprecationDetails interface + + +Signature: + +```typescript +export interface FeatureDeprecationDetails extends BaseDeprecationDetails +``` + +## Properties + +| Property | Type | Description | +| --- | --- | --- | +| [deprecationType](./kibana-plugin-core-server.featuredeprecationdetails.deprecationtype.md) | 'feature' | undefined | | + diff --git a/docs/development/core/server/kibana-plugin-core-server.md b/docs/development/core/server/kibana-plugin-core-server.md index 76b48358363e0..3970cf005abe4 100644 --- a/docs/development/core/server/kibana-plugin-core-server.md +++ b/docs/development/core/server/kibana-plugin-core-server.md @@ -53,9 +53,11 @@ The plugin integrates with the core system via lifecycle events: `setup` | [AuthRedirectedParams](./kibana-plugin-core-server.authredirectedparams.md) | Result of auth redirection. | | [AuthResultParams](./kibana-plugin-core-server.authresultparams.md) | Result of successful authentication. | | [AuthToolkit](./kibana-plugin-core-server.authtoolkit.md) | A tool set defining an outcome of Auth interceptor for incoming request. | +| [BaseDeprecationDetails](./kibana-plugin-core-server.basedeprecationdetails.md) | Base properties shared by all types of deprecations | | [Capabilities](./kibana-plugin-core-server.capabilities.md) | The read-only set of capabilities available for the current UI session. Capabilities are simple key-value pairs of (string, boolean), where the string denotes the capability ID, and the boolean is a flag indicating if the capability is enabled or disabled. | | [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | APIs to manage the [Capabilities](./kibana-plugin-core-server.capabilities.md) that will be used by the application.Plugins relying on capabilities to toggle some of their features should register them during the setup phase using the registerProvider method.Plugins having the responsibility to restrict capabilities depending on a given context should register their capabilities switcher using the registerSwitcher method.Refers to the methods documentation for complete description and examples. | | [CapabilitiesStart](./kibana-plugin-core-server.capabilitiesstart.md) | APIs to access the application [Capabilities](./kibana-plugin-core-server.capabilities.md). | +| [ConfigDeprecationDetails](./kibana-plugin-core-server.configdeprecationdetails.md) | | | [ContextSetup](./kibana-plugin-core-server.contextsetup.md) | An object that handles registration of context providers and configuring handlers with context. | | [CorePreboot](./kibana-plugin-core-server.corepreboot.md) | Context passed to the setup method of preboot plugins. | | [CoreSetup](./kibana-plugin-core-server.coresetup.md) | Context passed to the setup method of standard plugins. | @@ -65,7 +67,6 @@ The plugin integrates with the core system via lifecycle events: `setup` | [CustomHttpResponseOptions](./kibana-plugin-core-server.customhttpresponseoptions.md) | HTTP response parameters for a response with adjustable status code. | | [DeleteDocumentResponse](./kibana-plugin-core-server.deletedocumentresponse.md) | | | [DeprecationsClient](./kibana-plugin-core-server.deprecationsclient.md) | Server-side client that provides access to fetch all Kibana deprecations | -| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | | | [DeprecationSettings](./kibana-plugin-core-server.deprecationsettings.md) | UiSettings deprecation field options. | | [DeprecationsServiceSetup](./kibana-plugin-core-server.deprecationsservicesetup.md) | The deprecations service provides a way for the Kibana platform to communicate deprecated features and configs with its users. These deprecations are only communicated if the deployment is using these features. Allowing for a user tailored experience for upgrading the stack version.The Deprecation service is consumed by the upgrade assistant to assist with the upgrade experience.If a deprecated feature can be resolved without manual user intervention. Using correctiveActions.api allows the Upgrade Assistant to use this api to correct the deprecation upon a user trigger. | | [DiscoveredPlugin](./kibana-plugin-core-server.discoveredplugin.md) | Small container object used to expose information about discovered plugins that may or may not have been started. | @@ -77,6 +78,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [ErrorHttpResponseOptions](./kibana-plugin-core-server.errorhttpresponseoptions.md) | HTTP response parameters | | [ExecutionContextSetup](./kibana-plugin-core-server.executioncontextsetup.md) | | | [FakeRequest](./kibana-plugin-core-server.fakerequest.md) | Fake request object created manually by Kibana plugins. | +| [FeatureDeprecationDetails](./kibana-plugin-core-server.featuredeprecationdetails.md) | | | [GetDeprecationsContext](./kibana-plugin-core-server.getdeprecationscontext.md) | | | [GetResponse](./kibana-plugin-core-server.getresponse.md) | | | [HttpAuth](./kibana-plugin-core-server.httpauth.md) | | @@ -246,6 +248,7 @@ The plugin integrates with the core system via lifecycle events: `setup` | [AuthResult](./kibana-plugin-core-server.authresult.md) | | | [CapabilitiesProvider](./kibana-plugin-core-server.capabilitiesprovider.md) | See [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | | [CapabilitiesSwitcher](./kibana-plugin-core-server.capabilitiesswitcher.md) | See [CapabilitiesSetup](./kibana-plugin-core-server.capabilitiessetup.md) | +| [DeprecationsDetails](./kibana-plugin-core-server.deprecationsdetails.md) | | | [DestructiveRouteMethod](./kibana-plugin-core-server.destructiveroutemethod.md) | Set of HTTP methods changing the state of the server. | | [ElasticsearchClient](./kibana-plugin-core-server.elasticsearchclient.md) | Client used to query the elasticsearch cluster. | | [ElasticsearchClientConfig](./kibana-plugin-core-server.elasticsearchclientconfig.md) | Configuration options to be used to create a [cluster client](./kibana-plugin-core-server.iclusterclient.md) using the [createClient API](./kibana-plugin-core-server.elasticsearchservicestart.createclient.md) | diff --git a/docs/settings/logging-settings.asciidoc b/docs/settings/logging-settings.asciidoc index 177d1bc8db118..f88ea665c0213 100644 --- a/docs/settings/logging-settings.asciidoc +++ b/docs/settings/logging-settings.asciidoc @@ -31,7 +31,7 @@ logging: layout: type: pattern root: - appenders: [default, file] + appenders: [file] ---- [[log-in-json-ECS-example]] @@ -49,7 +49,7 @@ logging: layout: type: json root: - appenders: [default, json-layout] + appenders: [json-layout] ---- [[log-with-meta-to-stdout]] @@ -67,7 +67,7 @@ logging: type: pattern pattern: "[%date] [%level] [%logger] [%meta] %message" root: - appenders: [default, console-meta] + appenders: [console-meta] ---- [[log-elasticsearch-queries]] @@ -83,7 +83,7 @@ logging: type: pattern highlight: true root: - appenders: [default, console_appender] + appenders: [console_appender] level: warn loggers: - name: elasticsearch.query @@ -128,7 +128,7 @@ logging: type: json root: - appenders: [default, console, file] + appenders: [console, file] level: error loggers: diff --git a/package.json b/package.json index f526f357ff347..9341ecd0bae35 100644 --- a/package.json +++ b/package.json @@ -489,7 +489,6 @@ "@testing-library/react-hooks": "^5.1.1", "@testing-library/user-event": "^13.1.1", "@types/angular": "^1.6.56", - "@types/angular-mocks": "^1.7.0", "@types/apidoc": "^0.22.3", "@types/archiver": "^5.1.0", "@types/babel__core": "^7.1.16", @@ -644,7 +643,6 @@ "@yarnpkg/lockfile": "^1.1.0", "abab": "^2.0.4", "aggregate-error": "^3.1.0", - "angular-mocks": "^1.7.9", "antlr4ts-cli": "^0.5.0-alpha.3", "apidoc": "^0.29.0", "apidoc-markdown": "^6.0.0", diff --git a/packages/kbn-config/src/config_service.test.ts b/packages/kbn-config/src/config_service.test.ts index e8fd7ab187596..4a8164b100626 100644 --- a/packages/kbn-config/src/config_service.test.ts +++ b/packages/kbn-config/src/config_service.test.ts @@ -382,6 +382,7 @@ test('logs deprecation if schema is not present and "enabled" is used', async () "foo", Array [ Object { + "configPath": "foo.enabled", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"foo.enabled\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -452,10 +453,12 @@ test('logs deprecation warning during validation', async () => { mockApplyDeprecations.mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); addDeprecation({ + configPath: 'test1', message: 'some deprecation message', correctiveActions: { manualSteps: ['do X'] }, }); addDeprecation({ + configPath: 'test2', message: 'another deprecation message', correctiveActions: { manualSteps: ['do Y'] }, }); @@ -521,11 +524,13 @@ test('does not log warnings for silent deprecations during validation', async () .mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); addDeprecation({ + configPath: 'test1', message: 'some deprecation message', correctiveActions: { manualSteps: ['do X'] }, silent: true, }); addDeprecation({ + configPath: 'test2', message: 'another deprecation message', correctiveActions: { manualSteps: ['do Y'] }, }); @@ -534,6 +539,7 @@ test('does not log warnings for silent deprecations during validation', async () .mockImplementationOnce((config, deprecations, createAddDeprecation) => { const addDeprecation = createAddDeprecation!(''); addDeprecation({ + configPath: 'silent', message: 'I am silent', silent: true, correctiveActions: { manualSteps: ['do Z'] }, @@ -617,6 +623,7 @@ describe('getHandledDeprecatedConfigs', () => { deprecations.forEach((deprecation) => { const addDeprecation = createAddDeprecation!(deprecation.path); addDeprecation({ + configPath: 'test1', message: `some deprecation message`, documentationUrl: 'some-url', correctiveActions: { manualSteps: ['do X'] }, @@ -633,6 +640,7 @@ describe('getHandledDeprecatedConfigs', () => { "base", Array [ Object { + "configPath": "test1", "correctiveActions": Object { "manualSteps": Array [ "do X", diff --git a/packages/kbn-config/src/config_service.ts b/packages/kbn-config/src/config_service.ts index 5103aa1a2d49d..458acac953497 100644 --- a/packages/kbn-config/src/config_service.ts +++ b/packages/kbn-config/src/config_service.ts @@ -184,6 +184,7 @@ export class ConfigService { if (validatedConfig?.enabled === undefined && isEnabled !== undefined) { const deprecationPath = pathToString(enabledPath); const deprecatedConfigDetails: DeprecatedConfigDetails = { + configPath: deprecationPath, title: `Setting "${deprecationPath}" is deprecated`, message: `Configuring "${deprecationPath}" is deprecated and will be removed in 8.0.0.`, correctiveActions: { diff --git a/packages/kbn-config/src/deprecation/deprecation_factory.test.ts b/packages/kbn-config/src/deprecation/deprecation_factory.test.ts index 415c8fb9f0610..d9fe90ff711ed 100644 --- a/packages/kbn-config/src/deprecation/deprecation_factory.test.ts +++ b/packages/kbn-config/src/deprecation/deprecation_factory.test.ts @@ -43,6 +43,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -79,6 +80,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.section.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.section.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -134,6 +136,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only) before upgrading to 8.0.0.", @@ -197,6 +200,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"myplugin.deprecated\\" with \\"myplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -254,6 +258,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.oldsection.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"myplugin.oldsection.deprecated\\" with \\"myplugin.newsection.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -286,6 +291,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Make sure \\"myplugin.renamed\\" contains the correct value in the config file, CLI flag, or environment variable (in Docker only).", @@ -331,6 +337,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"myplugin.deprecated\\" with \\"myplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -373,6 +380,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "oldplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Replace \\"oldplugin.deprecated\\" with \\"newplugin.renamed\\" in the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -427,6 +435,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Make sure \\"myplugin.renamed\\" contains the correct value in the config file, CLI flag, or environment variable (in Docker only).", @@ -461,6 +470,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -494,6 +504,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.section.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.section.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).", @@ -546,6 +557,7 @@ describe('DeprecationFactory', () => { Array [ Array [ Object { + "configPath": "myplugin.deprecated", "correctiveActions": Object { "manualSteps": Array [ "Remove \\"myplugin.deprecated\\" from the Kibana config file, CLI flag, or environment variable (in Docker only).", diff --git a/packages/kbn-config/src/deprecation/deprecation_factory.ts b/packages/kbn-config/src/deprecation/deprecation_factory.ts index 1d61733715bd9..ea4db280e915b 100644 --- a/packages/kbn-config/src/deprecation/deprecation_factory.ts +++ b/packages/kbn-config/src/deprecation/deprecation_factory.ts @@ -37,6 +37,7 @@ const _deprecate = ( return; } addDeprecation({ + configPath: fullPath, title: getDeprecationTitle(fullPath), message: i18n.translate('kbnConfig.deprecations.deprecatedSettingMessage', { defaultMessage: 'Configuring "{fullPath}" is deprecated and will be removed in {removeBy}.', @@ -73,6 +74,7 @@ const _rename = ( const newValue = get(config, fullNewPath); if (newValue === undefined) { addDeprecation({ + configPath: fullOldPath, title: getDeprecationTitle(fullOldPath), message: i18n.translate('kbnConfig.deprecations.replacedSettingMessage', { defaultMessage: `Setting "{fullOldPath}" has been replaced by "{fullNewPath}"`, @@ -95,6 +97,7 @@ const _rename = ( }; } else { addDeprecation({ + configPath: fullOldPath, title: getDeprecationTitle(fullOldPath), message: i18n.translate('kbnConfig.deprecations.conflictSettingMessage', { defaultMessage: @@ -135,6 +138,7 @@ const _unused = ( return; } addDeprecation({ + configPath: fullPath, title: getDeprecationTitle(fullPath), message: i18n.translate('kbnConfig.deprecations.unusedSettingMessage', { defaultMessage: 'You no longer need to configure "{fullPath}".', diff --git a/packages/kbn-config/src/deprecation/types.ts b/packages/kbn-config/src/deprecation/types.ts index 12b561aa2b1b9..f5bb240f5cc43 100644 --- a/packages/kbn-config/src/deprecation/types.ts +++ b/packages/kbn-config/src/deprecation/types.ts @@ -20,6 +20,8 @@ export type AddConfigDeprecation = (details: DeprecatedConfigDetails) => void; * @public */ export interface DeprecatedConfigDetails { + /** The path of the deprecated config setting */ + configPath: string; /** The title to be displayed for the deprecation. */ title?: string; /** The message to be displayed for the deprecation. */ @@ -30,7 +32,7 @@ export interface DeprecatedConfigDetails { * - critical: needs to be addressed before upgrade. */ level?: 'warning' | 'critical'; - /** (optional) set false to prevent the config service from logging the deprecation message. */ + /** (optional) set to `true` to prevent the config service from logging the deprecation message. */ silent?: boolean; /** (optional) link to the documentation for more details on the deprecation. */ documentationUrl?: string; diff --git a/packages/kbn-crypto/src/__fixtures__/no_ca.p12 b/packages/kbn-crypto/src/__fixtures__/no_ca.p12 index 1e6df9a0f71c5..c4beef55cf3b6 100644 Binary files a/packages/kbn-crypto/src/__fixtures__/no_ca.p12 and b/packages/kbn-crypto/src/__fixtures__/no_ca.p12 differ diff --git a/packages/kbn-crypto/src/__fixtures__/no_cert.p12 b/packages/kbn-crypto/src/__fixtures__/no_cert.p12 index 8453fe878e785..40e4da49f2274 100644 Binary files a/packages/kbn-crypto/src/__fixtures__/no_cert.p12 and b/packages/kbn-crypto/src/__fixtures__/no_cert.p12 differ diff --git a/packages/kbn-crypto/src/__fixtures__/no_key.p12 b/packages/kbn-crypto/src/__fixtures__/no_key.p12 index 1bffb7a301b2e..7192bbc7de559 100644 Binary files a/packages/kbn-crypto/src/__fixtures__/no_key.p12 and b/packages/kbn-crypto/src/__fixtures__/no_key.p12 differ diff --git a/packages/kbn-crypto/src/__fixtures__/two_cas.p12 b/packages/kbn-crypto/src/__fixtures__/two_cas.p12 index 25784a6fb9a94..2de839be3e41c 100644 Binary files a/packages/kbn-crypto/src/__fixtures__/two_cas.p12 and b/packages/kbn-crypto/src/__fixtures__/two_cas.p12 differ diff --git a/packages/kbn-crypto/src/__fixtures__/two_keys.p12 b/packages/kbn-crypto/src/__fixtures__/two_keys.p12 index c934b34901a93..784b3033ebf64 100644 Binary files a/packages/kbn-crypto/src/__fixtures__/two_keys.p12 and b/packages/kbn-crypto/src/__fixtures__/two_keys.p12 differ diff --git a/packages/kbn-dev-utils/certs/README.md b/packages/kbn-dev-utils/certs/README.md index fdf7892789404..869f18ad2ed23 100644 --- a/packages/kbn-dev-utils/certs/README.md +++ b/packages/kbn-dev-utils/certs/README.md @@ -30,15 +30,17 @@ The password used for both of these is "storepass". Other copies are also provid [Elasticsearch cert-util](https://www.elastic.co/guide/en/elasticsearch/reference/current/certutil.html) and [OpenSSL](https://www.openssl.org/) were used to generate these certificates. The following commands were used from the root directory of Elasticsearch: +__IMPORTANT:__ CA keystore (ca.p12) is not checked in intentionally, talk to @elastic/kibana-security if you need it to sign new certificates. + ``` # Generate the PKCS #12 keystore for a CA, valid for 50 years -bin/elasticsearch-certutil ca -days 18250 --pass castorepass +bin/elasticsearch-certutil ca --out ca.p12 -days 18250 --pass castorepass # Generate the PKCS #12 keystore for Elasticsearch and sign it with the CA -bin/elasticsearch-certutil cert -days 18250 --ca elastic-stack-ca.p12 --ca-pass castorepass --name elasticsearch --dns localhost --pass storepass +bin/elasticsearch-certutil cert --out elasticsearch.p12 -days 18250 --ca ca.p12 --ca-pass castorepass --name elasticsearch --dns localhost --pass storepass # Generate the PKCS #12 keystore for Kibana and sign it with the CA -bin/elasticsearch-certutil cert -days 18250 --ca elastic-stack-ca.p12 --ca-pass castorepass --name kibana --dns localhost --pass storepass +bin/elasticsearch-certutil cert --out kibana.p12 -days 18250 --ca ca.p12 --ca-pass castorepass --name kibana --dns localhost --pass storepass # Copy the PKCS #12 keystore for Elasticsearch with an empty password openssl pkcs12 -in elasticsearch.p12 -nodes -passin pass:"storepass" -passout pass:"" | openssl pkcs12 -export -out elasticsearch_emptypassword.p12 -passout pass:"" diff --git a/packages/kbn-dev-utils/certs/ca.crt b/packages/kbn-dev-utils/certs/ca.crt index 217935b8d83f6..3a99c58d6b514 100644 --- a/packages/kbn-dev-utils/certs/ca.crt +++ b/packages/kbn-dev-utils/certs/ca.crt @@ -1,29 +1,29 @@ Bag Attributes friendlyName: elasticsearch - localKeyID: 54 69 6D 65 20 31 35 37 37 34 36 36 31 39 38 30 33 37 + localKeyID: 54 69 6D 65 20 31 36 33 34 31 32 30 31 35 32 31 39 33 Key Attributes: Bag Attributes friendlyName: ca 2.16.840.1.113894.746875.1.1: -subject=/CN=Elastic Certificate Tool Autogenerated CA -issuer=/CN=Elastic Certificate Tool Autogenerated CA +subject=CN = Elastic Certificate Tool Autogenerated CA +issuer=CN = Elastic Certificate Tool Autogenerated CA -----BEGIN CERTIFICATE----- -MIIDSzCCAjOgAwIBAgIUW0brhEtYK3tUBYlXnUa+AMmAX6kwDQYJKoZIhvcNAQEL -BQAwNDEyMDAGA1UEAxMpRWxhc3RpYyBDZXJ0aWZpY2F0ZSBUb29sIEF1dG9nZW5l -cmF0ZWQgQ0EwIBcNMTkxMjI3MTcwMjMyWhgPMjA2OTEyMTQxNzAyMzJaMDQxMjAw -BgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2VuZXJhdGVkIENB -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAplO5m5Xy8xERyA0/G5SM -Nu2QXkfS+m7ZTFjSmtwqX7BI1I6ISI4Yw8QxzcIgSbEGlSqb7baeT+A/1JQj0gZN -KOnKbazl+ujVRJpsfpt5iUsnQyVPheGekcHkB+9WkZPgZ1oGRENr/4Eb1VImQf+Y -yo/FUj8X939tYW0fficAqYKv8/4NWpBUbeop8wsBtkz738QKlmPkMwC4FbuF2/bN -vNuzQuRbGMVmPeyivZJRfDAMKExoXjCCLmbShdg4dUHsUjVeWQZ6s4vbims+8qF9 -b4bseayScQNNU3hc5mkfhEhSM0KB0lDpSvoCxuXvXzb6bOk7xIdYo+O4vHUhvSkQ -mwIDAQABo1MwUTAdBgNVHQ4EFgQUGu0mDnvDRnBdNBG8DxwPdWArB0kwHwYD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81vRgAZYZxwGJQF19Qgz13D6 +de8CAwEAAaNTMFEwHQYDVR0OBBYEFDBMKsCOW9DGKTccGhyfU8NS6d6eMB8GA1Ud +IwQYMBaAFDBMKsCOW9DGKTccGhyfU8NS6d6eMA8GA1UdEwEB/wQFMAMBAf8wDQYJ +KoZIhvcNAQELBQADggEBABf0ZznDu2m9IVn7ThLPb5UJU/rZiTkRyP6cqPFFtSww +TiZ0+AS5phGFV8f/znC/scU2u57EAl8DWSalJZTXJMekboFpfXJME/BK66I6wdSi +TfL99HjYR6LYyjvkXhoIBhR1eCw1zwm8IGzRV++/zY5ksYb5GQ9smFr3TNgqgdsv +GnPJgytVc/sYXuc1l7MS8j1Q+JLhpIymDKCJ2CB+x2p2oMYqJmFstc8I0z6vZtiM +zeyy07qK71uOfD5F1HHw/rv738yrlq7NwAH9fc3/0fPueyjTHSQtKiSBfc0phEMz +TV7Px45EUVFhn9YgIHGBSKPkA5QCC3bPNb6iYGREDcU= -----END CERTIFICATE----- diff --git a/packages/kbn-dev-utils/certs/elasticsearch.crt b/packages/kbn-dev-utils/certs/elasticsearch.crt index 87ba02019903f..a95b7c63ad5ec 100644 --- a/packages/kbn-dev-utils/certs/elasticsearch.crt +++ b/packages/kbn-dev-utils/certs/elasticsearch.crt @@ -1,29 +1,29 @@ Bag Attributes friendlyName: elasticsearch - localKeyID: 54 69 6D 65 20 31 35 37 37 34 36 36 31 39 38 30 33 37 + localKeyID: 54 69 6D 65 20 31 36 33 34 31 32 30 31 35 32 31 39 33 Key Attributes: Bag Attributes friendlyName: elasticsearch - localKeyID: 54 69 6D 65 20 31 35 37 37 34 36 36 31 39 38 30 33 37 -subject=/CN=elasticsearch -issuer=/CN=Elastic Certificate Tool Autogenerated CA + localKeyID: 54 69 6D 65 20 31 36 33 34 31 32 30 31 35 32 31 39 33 +subject=CN = elasticsearch +issuer=CN = Elastic Certificate Tool Autogenerated CA -----BEGIN CERTIFICATE----- -MIIDQDCCAiigAwIBAgIVAI93OQE6tZffP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dyKvpzoX7t +HJaT1HU0o5Xi/Ol33C/wvfRe05UrHEUil148n/XWz3EJky7El2LYbg36/++mVTHX +xUXS+FdZ1rBlGnGwOHTPHj5FMQ== -----END CERTIFICATE----- diff --git a/packages/kbn-dev-utils/certs/elasticsearch.key b/packages/kbn-dev-utils/certs/elasticsearch.key index 9ae4e314630d1..4a114a0458a82 100644 --- a/packages/kbn-dev-utils/certs/elasticsearch.key +++ b/packages/kbn-dev-utils/certs/elasticsearch.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEA2EkPfvE3ZNMjHCAQZhpImoXBCIN6KavvJSbVHRtLzAXB4wxi -ge+vFQWb4umqPeEeVH7FvrsRqn24tUgGIkag9p9AOwYxfcT3vwNqcK/EztIlYFs7 -2pmYg7Ezs6+qLc/YSLOT3aMoHKDHE93z1jYIDGccyjGbv9NsdgCbLHD0TQuqm+7p -Ky1MZoJm0qn4KYw4kXakVNWlxm5GIwr8uqU/w4phrikcOOWqRzsxByoQajypLOA4 -eD/uWnI2zGyPQy7Bkxojiy1ss0CVlrl8fJgcjC4PONpm1ibUSX3SoZ8PopPThR6g -vvwoQolRrYu4+D+rsX7q/ldA6vBOiHBD8r4QoQIDAQABAoIBAB+s44YV0aUEfvnZ -gE1TwBpRSGn0x2le8tEgFMoEe19P4Itd/vdEoQGVJrVevz38wDJjtpYuU3ICo5B5 -EdznNx+nRwLd71WaCSaCW45RT6Nyh2LLOcLUB9ARnZ7NNUEsVWKgWiF1iaRXr5Ar -S1Ct7RPT7hV2mnbHgfTuNcuWZ1D5BUcqNczNoHsV6guFChiwTr7ZObnKj4qJLwdu -ioYYWno4ZLgsk4SfW6DXUCvfKROfYdDd2rGu0NQ4QxT3Q98AsXlrlUITBQbpQEgy -5GSTEh/4sRYj4NQZqncDpPgXm22kYdU7voBjt/zu66oq1W6kKQ4JwPmyc2SI0haa -/pyCMtkCgYEA/y3vs59RvrM6xpT77lf7WigSBbIBQxeKs9RGN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44Z8 +OsHOooAZ06kCeJ+LBifiN1skU3KIAjXq/+XqI3vSUpqAXx/rT1Lz7xaoDyOkuo6u +AdNEd+38qfmSBu5VGz5TI8ObCNOG9VP+OmG25gJocvP7EhryJ9lU1d0cw6lWY0b3 +6StdAoGBAKUkfbN7qbB+jiZt/6ArYWQE4PL4pqi+B+84xSrp46e41mmocezKhnsp +DxdcuZyg9OXs1xi6AaJtCbelho9bT8jC51GZSFvf887fvGVq7j1TgxWp4mvlqiX7 +tztiggaPXwRZQiThxdJaCIadw26hxdLNOcdGOl/u2m0rudvwybab -----END RSA PRIVATE KEY----- diff --git a/packages/kbn-dev-utils/certs/elasticsearch.p12 b/packages/kbn-dev-utils/certs/elasticsearch.p12 index 02a9183cd8a50..9f88e6bd42a99 100644 Binary files a/packages/kbn-dev-utils/certs/elasticsearch.p12 and b/packages/kbn-dev-utils/certs/elasticsearch.p12 differ diff --git a/packages/kbn-dev-utils/certs/elasticsearch_emptypassword.p12 b/packages/kbn-dev-utils/certs/elasticsearch_emptypassword.p12 index 3162982ac635a..32ba1781d0599 100644 Binary files a/packages/kbn-dev-utils/certs/elasticsearch_emptypassword.p12 and b/packages/kbn-dev-utils/certs/elasticsearch_emptypassword.p12 differ diff --git a/packages/kbn-dev-utils/certs/elasticsearch_nopassword.p12 b/packages/kbn-dev-utils/certs/elasticsearch_nopassword.p12 index 3a22a58d207df..8ea7d49ab39aa 100644 Binary files a/packages/kbn-dev-utils/certs/elasticsearch_nopassword.p12 and b/packages/kbn-dev-utils/certs/elasticsearch_nopassword.p12 differ diff --git a/packages/kbn-dev-utils/certs/kibana.crt b/packages/kbn-dev-utils/certs/kibana.crt index 1c83be587bff9..b73885dc7a0f9 100644 --- a/packages/kbn-dev-utils/certs/kibana.crt +++ b/packages/kbn-dev-utils/certs/kibana.crt @@ -1,29 +1,29 @@ Bag Attributes friendlyName: kibana - localKeyID: 54 69 6D 65 20 31 35 37 37 34 36 36 32 32 33 30 33 39 + localKeyID: 54 69 6D 65 20 31 36 33 34 31 32 30 31 35 38 38 30 33 Key Attributes: Bag Attributes friendlyName: kibana - localKeyID: 54 69 6D 65 20 31 35 37 37 34 36 36 32 32 33 30 33 39 -subject=/CN=kibana -issuer=/CN=Elastic Certificate Tool Autogenerated CA + localKeyID: 54 69 6D 65 20 31 36 33 34 31 32 30 31 35 38 38 30 33 +subject=CN = kibana +issuer=CN = Elastic Certificate Tool Autogenerated CA -----BEGIN CERTIFICATE----- -MIIDOTCCAiGgAwIBAgIVANNWkg9lzNiLqNkMFhFKHcXyaZmqMA0GCSqGSIb3DQEB +MIIDOTCCAiGgAwIBAgIVAN0GVNLw3IaUBuG7t6CeW8w2wyymMA0GCSqGSIb3DQEB CwUAMDQxMjAwBgNVBAMTKUVsYXN0aWMgQ2VydGlmaWNhdGUgVG9vbCBBdXRvZ2Vu -ZXJhdGVkIENBMCAXDTE5MTIyNzE3MDM0MloYDzIwNjkxMjE0MTcwMzQyWjARMQ8w -DQYDVQQDEwZraWJhbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCQ -wYYbQtbRBKJ4uNZc2+IgRU+7NNL21ZebQlEIMgK7jAqOMrsW2b5DATz41Fd+GQFU -FUYYjwo+PQj6sJHshOJo/gNb32HrydvMI7YPvevkszkuEGCfXxQ3Dw2RTACLgD0Q -OCkwHvn3TMf0loloV/ePGWaZDYZaXi3a5DdWi/HFFoJysgF0JV2f6XyKhJkGaEfJ -s9pWX269zH/XQvGNx4BEimJpYB8h4JnDYPFIiQdqj+sl2b+kS1hH9kL5gBAMXjFU -vcNnX+PmyTjyJrGo75k0ku+spBf1bMwuQt3uSmM+TQIXkvFDmS0DOVESrpA5EC1T -BUGRz6o/I88Xx4Mud771AgMBAAGjYzBhMB0GA1UdDgQWBBQLB1Eo23M3Ss8MsFaz -V+Twcb3PmDAfBgNVHSMEGDAWgBQa7SYOe8NGcF00EbwPHA91YCsHSTAUBgNVHREE -DTALgglsb2NhbGhvc3QwCQYDVR0TBA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amA2QKNzI9JTOzONPTyRhe9yVS +zeO8X2rtN63l38dtgMjFQ15Xxnp7GFT7GkXfa1JR+tGSGTgVld8nLUzig+mNmBoR +nE4cNc0JJ1PsXPzfPgJ6WMp2WOoNUrQf2cm42i36Jk+7KGcosfyFMPQILZE34Geo +DAgCVpNWPgST4HYBUCHMC7S14LHLVdUXPsfGZPEqU5Zf9Hvy61rQC/RdNjnMI6JD +s57l9oHASNeEg55NQm01aOmwq/z1DXs3UP2nRmp6XCCfE61ghofO5dtV1j3cZ3f5 +dzkzSBV7H6+/MD3Y8Q== -----END CERTIFICATE----- diff --git a/packages/kbn-dev-utils/certs/kibana.key b/packages/kbn-dev-utils/certs/kibana.key index 4a4e6b4cb8c36..aae299d430585 100644 --- a/packages/kbn-dev-utils/certs/kibana.key +++ b/packages/kbn-dev-utils/certs/kibana.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAkMGGG0LW0QSieLjWXNviIEVPuzTS9tWXm0JRCDICu4wKjjK7 -Ftm+QwE8+NRXfhkBVBVGGI8KPj0I+rCR7ITiaP4DW99h68nbzCO2D73r5LM5LhBg -n18UNw8NkUwAi4A9EDgpMB7590zH9JaJaFf3jxlmmQ2GWl4t2uQ3VovxxRaCcrIB -dCVdn+l8ioSZBmhHybPaVl9uvcx/10LxjceARIpiaWAfIeCZw2DxSIkHao/rJdm/ -pEtYR/ZC+YAQDF4xVL3DZ1/j5sk48iaxqO+ZNJLvrKQX9WzMLkLd7kpjPk0CF5Lx -Q5ktAzlREq6QORAtUwVBkc+qPyPPF8eDLne+9QIDAQABAoIBAHl9suxWYKz00te3 -alJtSZAEHDLm1tjL034/XnseXiTCGGnYMiWvgnwCIgZFUVlH61GCuV4LT3GFEHA2 -mYKE1PGBn5gQF8MpnAvtPPRhVgaQVUFQBYg86F59h8mWnC545sciG4+DsA/apUem -wJSOn/u+Odni/AwEV0ALolZFBhl+0rccSr+6paJnzJ7QNiIn6EWbgb0n9W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Ybw0Lcp8q4hWPnqHFufAEST1Fp8yIaleILUUvnxC +mx4sH5eFx3oGe22kz5AaIGF1XW3uF+Q3zt4m4lkQINhiI2AOIt7pF/vA7aCk/OgQ +tbiY6rGDz3gBuNIl/hjfzOUCgYEAy1rDO6RRxnZuhoPbiEy5Ns8jkAJGLw55gL9W +rKKDDiuZ+nc7WWKRHBYgFtFKW0kArB4LZDSXyzwfYYy3T5CTrLmFsoVgqd2Qz5Cr +flvFzGS139zYFETc8OkHk8X4AxggZAWHfwvEESXb1N9ccAmgqLgexftpJv1HxzUF +EfHaEHECgYEArtWvtUdvRQ20r/X/g+mNyUhbYOy15pAgswLK4gIi8rmQPxR08spl +uJJ/cl4fGxG95dl/OV+lNdwl4UcvjATdreEMKvG4X4Cxd+42SUf40M6pGxXoyYz+ +i4WujBaEqBBqjKmYNJVgY7EvqF+VYLBVFZYB1zQhdNPcoPgIH/97vvI= -----END RSA PRIVATE KEY----- diff --git a/packages/kbn-dev-utils/certs/kibana.p12 b/packages/kbn-dev-utils/certs/kibana.p12 index 06bbd23881290..f9e689cf33e04 100644 Binary files a/packages/kbn-dev-utils/certs/kibana.p12 and b/packages/kbn-dev-utils/certs/kibana.p12 differ diff --git a/packages/kbn-es-query/src/es_query/build_es_query.test.ts b/packages/kbn-es-query/src/es_query/build_es_query.test.ts index aca40632960f8..8fd884f65fa0d 100644 --- a/packages/kbn-es-query/src/es_query/build_es_query.test.ts +++ b/packages/kbn-es-query/src/es_query/build_es_query.test.ts @@ -12,13 +12,14 @@ import { luceneStringToDsl } from './lucene_string_to_dsl'; import { decorateQuery } from './decorate_query'; import { MatchAllFilter, Query } from '../filters'; import { fields } from '../filters/stubs'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; jest.mock('../kuery/grammar'); describe('build query', () => { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('buildEsQuery', () => { diff --git a/packages/kbn-es-query/src/es_query/from_filters.test.ts b/packages/kbn-es-query/src/es_query/from_filters.test.ts index eacf775194bb8..67de9e4d88736 100644 --- a/packages/kbn-es-query/src/es_query/from_filters.test.ts +++ b/packages/kbn-es-query/src/es_query/from_filters.test.ts @@ -9,11 +9,12 @@ import { buildQueryFromFilters } from './from_filters'; import { ExistsFilter, Filter, MatchAllFilter } from '../filters'; import { fields } from '../filters/stubs'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; describe('build query', () => { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('buildQueryFromFilters', () => { diff --git a/packages/kbn-es-query/src/es_query/from_kuery.test.ts b/packages/kbn-es-query/src/es_query/from_kuery.test.ts index 2458013854393..443b44dff5819 100644 --- a/packages/kbn-es-query/src/es_query/from_kuery.test.ts +++ b/packages/kbn-es-query/src/es_query/from_kuery.test.ts @@ -9,14 +9,15 @@ import { buildQueryFromKuery } from './from_kuery'; import { fromKueryExpression, toElasticsearchQuery } from '../kuery'; import { fields } from '../filters/stubs'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; import { Query } from '..'; jest.mock('../kuery/grammar'); describe('build query', () => { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('buildQueryFromKuery', () => { diff --git a/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts b/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts index 333f4bad54a46..2b9fbbe5ece04 100644 --- a/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts +++ b/packages/kbn-es-query/src/es_query/handle_nested_filter.test.ts @@ -9,12 +9,13 @@ import { handleNestedFilter } from './handle_nested_filter'; import { fields } from '../filters/stubs'; import { buildPhraseFilter, buildQueryFilter } from '../filters'; -import { IndexPatternBase } from './types'; +import { DataViewBase } from './types'; describe('handleNestedFilter', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { id: 'logstash-*', fields, + title: 'dataView', }; it("should return the filter's query wrapped in nested query if the target field is nested", () => { diff --git a/packages/kbn-es-query/src/es_query/types.ts b/packages/kbn-es-query/src/es_query/types.ts index 3a5893d20ef25..75ea320b3431f 100644 --- a/packages/kbn-es-query/src/es_query/types.ts +++ b/packages/kbn-es-query/src/es_query/types.ts @@ -65,7 +65,7 @@ export type IndexPatternFieldBase = DataViewFieldBase; export interface DataViewBase { fields: DataViewFieldBase[]; id?: string; - title?: string; + title: string; } /** diff --git a/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts index 762af90063070..761d0341f1eae 100644 --- a/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/build_filter.test.ts @@ -7,13 +7,14 @@ */ import { buildFilter, FilterStateStore, FILTERS } from '.'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { fields as stubFields } from '../stubs'; describe('buildFilter', () => { - const stubIndexPattern: IndexPatternBase = { + const stubIndexPattern: DataViewBase = { id: 'logstash-*', fields: stubFields, + title: 'dataView', }; it('should build phrase filters', () => { diff --git a/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts index 35a2a5c3d6057..81aab2c300243 100644 --- a/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/exists_filter.test.ts @@ -6,13 +6,14 @@ * Side Public License, v 1. */ -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { buildExistsFilter, getExistsFilterField } from './exists_filter'; import { fields } from '../stubs/fields.mocks'; describe('exists filter', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('getExistsFilterField', function () { diff --git a/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts b/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts index ca67a439757de..06803716aac2f 100644 --- a/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/get_filter_field.test.ts @@ -9,13 +9,14 @@ import { buildPhraseFilter } from './phrase_filter'; import { buildQueryFilter } from './query_string_filter'; import { getFilterField } from './get_filter_field'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { fields } from '../stubs/fields.mocks'; describe('getFilterField', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { id: 'logstash-*', fields, + title: 'dataView', }; it('should return the field name from known filter types that target a specific field', () => { diff --git a/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts index f23dfde12d977..13f18ad0cc7ea 100644 --- a/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/phrase_filter.test.ts @@ -13,16 +13,17 @@ import { PhraseFilter, } from './phrase_filter'; import { fields, getField } from '../stubs'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { estypes } from '@elastic/elasticsearch'; describe('Phrase filter builder', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { id: 'id', fields, + title: 'dataView', }; }); @@ -151,8 +152,9 @@ describe('buildInlineScriptForPhraseFilter', () => { }); describe('getPhraseFilterField', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; it('should return the name of the field a phrase query is targeting', () => { diff --git a/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts b/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts index c3e7fd37e1ff6..1a125e98f9645 100644 --- a/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts +++ b/packages/kbn-es-query/src/filters/build_filters/phrases_filter.test.ts @@ -6,13 +6,14 @@ * Side Public License, v 1. */ -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { buildPhrasesFilter, getPhrasesFilterField } from './phrases_filter'; import { fields } from '../stubs'; describe('phrases filter', function () { - const indexPattern: IndexPatternBase = { + const indexPattern: DataViewBase = { fields, + title: 'dataView', }; describe('getPhrasesFilterField', function () { diff --git a/packages/kbn-es-query/src/kuery/ast/ast.test.ts b/packages/kbn-es-query/src/kuery/ast/ast.test.ts index edb9150ea00d5..0e4366d6e21d1 100644 --- a/packages/kbn-es-query/src/kuery/ast/ast.test.ts +++ b/packages/kbn-es-query/src/kuery/ast/ast.test.ts @@ -8,18 +8,19 @@ import { fromKueryExpression, fromLiteralExpression, toElasticsearchQuery } from './ast'; import { nodeTypes } from '../node_types'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { KueryNode } from '../types'; import { fields } from '../../filters/stubs'; jest.mock('../grammar'); describe('kuery AST API', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/and.test.ts b/packages/kbn-es-query/src/kuery/functions/and.test.ts index 239342bdc0a1c..07e431791b37a 100644 --- a/packages/kbn-es-query/src/kuery/functions/and.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/and.test.ts @@ -10,7 +10,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; import * as ast from '../ast'; import * as and from './and'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; jest.mock('../grammar'); @@ -19,11 +19,12 @@ const childNode2 = nodeTypes.function.buildNode('is', 'extension', 'jpg'); describe('kuery functions', () => { describe('and', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/exists.test.ts b/packages/kbn-es-query/src/kuery/functions/exists.test.ts index 0941e478e816b..ed368d6af2bfd 100644 --- a/packages/kbn-es-query/src/kuery/functions/exists.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/exists.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; jest.mock('../grammar'); @@ -17,11 +17,12 @@ import * as exists from './exists'; describe('kuery functions', () => { describe('exists', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts b/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts index 45e6474b22986..9c4a33f50020f 100644 --- a/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/geo_bounding_box.test.ts @@ -9,7 +9,7 @@ import { get } from 'lodash'; import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as geoBoundingBox from './geo_bounding_box'; import { JsonObject } from '@kbn/utility-types'; @@ -29,11 +29,12 @@ const params = { describe('kuery functions', () => { describe('geoBoundingBox', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts b/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts index 2d1d6ed6cd6de..5a96f6f3cb03d 100644 --- a/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/geo_polygon.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as geoPolygon from './geo_polygon'; @@ -31,11 +31,12 @@ const points = [ describe('kuery functions', () => { describe('geoPolygon', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/is.test.ts b/packages/kbn-es-query/src/kuery/functions/is.test.ts index bc1bbb2508438..fbc6011331dbb 100644 --- a/packages/kbn-es-query/src/kuery/functions/is.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/is.test.ts @@ -10,18 +10,19 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; import * as is from './is'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { estypes } from '@elastic/elasticsearch'; jest.mock('../grammar'); describe('kuery functions', () => { describe('is', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/nested.test.ts b/packages/kbn-es-query/src/kuery/functions/nested.test.ts index 7b6b7b695db2d..da7bfd2dce2d8 100644 --- a/packages/kbn-es-query/src/kuery/functions/nested.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/nested.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as ast from '../ast'; @@ -20,11 +20,12 @@ const childNode = nodeTypes.function.buildNode('is', 'child', 'foo'); describe('kuery functions', () => { describe('nested', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/not.test.ts b/packages/kbn-es-query/src/kuery/functions/not.test.ts index af1e8108b40f5..96af4bc693621 100644 --- a/packages/kbn-es-query/src/kuery/functions/not.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/not.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as ast from '../ast'; import * as not from './not'; @@ -19,11 +19,12 @@ const childNode = nodeTypes.function.buildNode('is', 'extension', 'jpg'); describe('kuery functions', () => { describe('not', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/or.test.ts b/packages/kbn-es-query/src/kuery/functions/or.test.ts index eb7db62b22162..63fde9e802401 100644 --- a/packages/kbn-es-query/src/kuery/functions/or.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/or.test.ts @@ -8,7 +8,7 @@ import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import * as ast from '../ast'; @@ -20,11 +20,12 @@ const childNode2 = nodeTypes.function.buildNode('is', 'extension', 'jpg'); describe('kuery functions', () => { describe('or', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/range.test.ts b/packages/kbn-es-query/src/kuery/functions/range.test.ts index 42005a3fe702d..c541b26ce176f 100644 --- a/packages/kbn-es-query/src/kuery/functions/range.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/range.test.ts @@ -9,7 +9,7 @@ import { get } from 'lodash'; import { nodeTypes } from '../node_types'; import { fields } from '../../filters/stubs'; -import { IndexPatternBase } from '../..'; +import { DataViewBase } from '../..'; import { RangeFilterParams } from '../../filters'; import * as range from './range'; @@ -18,11 +18,12 @@ jest.mock('../grammar'); describe('kuery functions', () => { describe('range', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts b/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts index dccfc5d1c463a..046ffdb152e42 100644 --- a/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts +++ b/packages/kbn-es-query/src/kuery/functions/utils/get_full_field_name_node.test.ts @@ -8,17 +8,18 @@ import { nodeTypes } from '../../node_types'; import { fields } from '../../../filters/stubs'; -import { IndexPatternBase } from '../../..'; +import { DataViewBase } from '../../..'; import { getFullFieldNameNode } from './get_full_field_name_node'; jest.mock('../../grammar'); describe('getFullFieldNameNode', function () { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es-query/src/kuery/node_types/function.test.ts b/packages/kbn-es-query/src/kuery/node_types/function.test.ts index 5df6ba1916046..754bf170c5062 100644 --- a/packages/kbn-es-query/src/kuery/node_types/function.test.ts +++ b/packages/kbn-es-query/src/kuery/node_types/function.test.ts @@ -10,18 +10,19 @@ import { nodeTypes } from './index'; import { buildNode, buildNodeWithArgumentNodes, toElasticsearchQuery } from './function'; import { toElasticsearchQuery as isFunctionToElasticsearchQuery } from '../functions/is'; -import { IndexPatternBase } from '../../es_query'; +import { DataViewBase } from '../../es_query'; import { fields } from '../../filters/stubs/fields.mocks'; jest.mock('../grammar'); describe('kuery node types', () => { describe('function', () => { - let indexPattern: IndexPatternBase; + let indexPattern: DataViewBase; beforeEach(() => { indexPattern = { fields, + title: 'dataView', }; }); diff --git a/packages/kbn-es/src/cluster.js b/packages/kbn-es/src/cluster.js index dd9c17055fb18..36616694e69a3 100644 --- a/packages/kbn-es/src/cluster.js +++ b/packages/kbn-es/src/cluster.js @@ -257,9 +257,13 @@ exports.Cluster = class Cluster { // Add to esArgs if ssl is enabled if (this._ssl) { esArgs.push('xpack.security.http.ssl.enabled=true'); - esArgs.push(`xpack.security.http.ssl.keystore.path=${ES_P12_PATH}`); - esArgs.push(`xpack.security.http.ssl.keystore.type=PKCS12`); - esArgs.push(`xpack.security.http.ssl.keystore.password=${ES_P12_PASSWORD}`); + + // Include default keystore settings only if keystore isn't configured. + if (!esArgs.some((arg) => arg.startsWith('xpack.security.http.ssl.keystore'))) { + esArgs.push(`xpack.security.http.ssl.keystore.path=${ES_P12_PATH}`); + esArgs.push(`xpack.security.http.ssl.keystore.type=PKCS12`); + esArgs.push(`xpack.security.http.ssl.keystore.password=${ES_P12_PASSWORD}`); + } } const args = parseSettings(extractConfigFiles(esArgs, installPath, { log: this._log }), { diff --git a/packages/kbn-es/src/utils/build_snapshot.js b/packages/kbn-es/src/utils/build_snapshot.js index c60ef61e98538..ec26ba69e658b 100644 --- a/packages/kbn-es/src/utils/build_snapshot.js +++ b/packages/kbn-es/src/utils/build_snapshot.js @@ -26,6 +26,7 @@ const onceEvent = (emitter, event) => new Promise((resolve) => emitter.once(even * @returns {Object} containing archive and optional plugins * * Gradle tasks: + * $ ./gradlew tasks --all | grep 'distribution.*assemble\s' * :distribution:archives:darwin-tar:assemble * :distribution:archives:linux-tar:assemble * :distribution:archives:windows-zip:assemble diff --git a/packages/kbn-es/src/utils/native_realm.js b/packages/kbn-es/src/utils/native_realm.js index a5051cdb0d89a..c1682e0d18002 100644 --- a/packages/kbn-es/src/utils/native_realm.js +++ b/packages/kbn-es/src/utils/native_realm.js @@ -13,15 +13,12 @@ const { log: defaultLog } = require('./log'); exports.NativeRealm = class NativeRealm { constructor({ elasticPassword, port, log = defaultLog, ssl = false, caCert }) { - this._client = new Client({ - node: `${ssl ? 'https' : 'http'}://elastic:${elasticPassword}@localhost:${port}`, - ssl: ssl - ? { - ca: caCert, - rejectUnauthorized: true, - } - : undefined, - }); + const auth = { username: 'elastic', password: elasticPassword }; + this._client = new Client( + ssl + ? { node: `https://localhost:${port}`, ssl: { ca: caCert, rejectUnauthorized: true }, auth } + : { node: `http://localhost:${port}`, auth } + ); this._elasticPassword = elasticPassword; this._log = log; } diff --git a/packages/kbn-i18n/BUILD.bazel b/packages/kbn-i18n/BUILD.bazel index 49d5603b2c516..256262bb8783b 100644 --- a/packages/kbn-i18n/BUILD.bazel +++ b/packages/kbn-i18n/BUILD.bazel @@ -27,7 +27,6 @@ filegroup( ) NPM_MODULE_EXTRA_FILES = [ - "angular/package.json", "react/package.json", "package.json", "GUIDELINE.md", @@ -47,7 +46,6 @@ TYPES_DEPS = [ "//packages/kbn-babel-preset", "@npm//intl-messageformat", "@npm//tslib", - "@npm//@types/angular", "@npm//@types/intl-relativeformat", "@npm//@types/jest", "@npm//@types/prop-types", diff --git a/packages/kbn-i18n/GUIDELINE.md b/packages/kbn-i18n/GUIDELINE.md index 806e799bd1106..7ffc4b078c79b 100644 --- a/packages/kbn-i18n/GUIDELINE.md +++ b/packages/kbn-i18n/GUIDELINE.md @@ -93,17 +93,6 @@ The long term plan is to rely on using `FormattedMessage` and `i18n.translate()` Currently, we support the following ReactJS `i18n` tools, but they will be removed in future releases: - Usage of `props.intl.formatmessage()` (where `intl` is passed to `props` by `injectI18n` HOC). -#### In AngularJS - -The long term plan is to rely on using `i18n.translate()` by statically importing `i18n` from the `@kbn/i18n` package. **Avoid using the `i18n` filter and the `i18n` service injected in controllers, directives, services.** - -- Call JS function `i18n.translate()` from the `@kbn/i18n` package. -- Use `i18nId` directive in template. - -Currently, we support the following AngluarJS `i18n` tools, but they will be removed in future releases: -- Usage of `i18n` service in controllers, directives, services by injecting it. -- Usage of `i18n` filter in template for attribute translation. Note: Use one-time binding ("{{:: ... }}") in filters wherever it's possible to prevent unnecessary expression re-evaluation. - #### In JavaScript - Use `i18n.translate()` in NodeJS or any other framework agnostic code, where `i18n` is the I18n engine from `@kbn/i18n` package. @@ -223,7 +212,6 @@ For example: - for button: ```js - @@ -232,11 +220,11 @@ For example: - for dropDown: ```js - +