mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[Data Usage] remove autoops.api.tls.ca config (#200808)](https://github.com/elastic/kibana/pull/200808) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sandra G","email":"neptunian@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-11-20T18:59:45Z","message":"[Data Usage] remove autoops.api.tls.ca config (#200808)\n\n## Summary\r\n\r\nRemove unused `autoops.api.tls.ca` config.\r\n\r\n\r\n### Checklist\r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_node:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\nCo-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>","sha":"5d1a30aae997fe0a4fa91f20ba391266668deb11","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:build-serverless-image"],"title":"[Data Usage] remove autoops.api.tls.ca config","number":200808,"url":"https://github.com/elastic/kibana/pull/200808","mergeCommit":{"message":"[Data Usage] remove autoops.api.tls.ca config (#200808)\n\n## Summary\r\n\r\nRemove unused `autoops.api.tls.ca` config.\r\n\r\n\r\n### Checklist\r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_node:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\nCo-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>","sha":"5d1a30aae997fe0a4fa91f20ba391266668deb11"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200808","number":200808,"mergeCommit":{"message":"[Data Usage] remove autoops.api.tls.ca config (#200808)\n\n## Summary\r\n\r\nRemove unused `autoops.api.tls.ca` config.\r\n\r\n\r\n### Checklist\r\n\r\nReviewers should verify this PR satisfies this list as well.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This was checked for breaking HTTP API changes, and any breaking\r\nchanges have been approved by the breaking-change committee. The\r\n`release_note:breaking` label should be applied in these situations.\r\n- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] The PR description includes the appropriate Release Notes section,\r\nand the correct `release_node:*` label is applied per the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n### Identify risks\r\n\r\nDoes this PR introduce any risks? For example, consider risks like hard\r\nto test bugs, performance regression, potential of data loss.\r\n\r\nDescribe the risk, its severity, and mitigation for each identified\r\nrisk. Invite stakeholders and evaluate how to proceed before merging.\r\n\r\n- [ ] [See some risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n- [ ] ...\r\n\r\nCo-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>","sha":"5d1a30aae997fe0a4fa91f20ba391266668deb11"}}]}] BACKPORT--> Co-authored-by: Sandra G <neptunian@users.noreply.github.com>
This commit is contained in:
parent
dbe6c7b73d
commit
63934e8d32
8 changed files with 21 additions and 19 deletions
|
@ -20,7 +20,6 @@ export const configSchema = schema.object({
|
|||
schema.object({
|
||||
certificate: schema.maybe(schema.string()),
|
||||
key: schema.maybe(schema.string()),
|
||||
ca: schema.maybe(schema.string()),
|
||||
})
|
||||
),
|
||||
})
|
||||
|
|
|
@ -52,12 +52,23 @@ export class AutoOpsAPIService {
|
|||
throw new AutoOpsError(AUTO_OPS_MISSING_CONFIG_ERROR);
|
||||
}
|
||||
|
||||
if (!autoopsConfig.api?.url) {
|
||||
this.logger.error(`[AutoOps API] Missing API URL in the configuration.`, errorMetadata);
|
||||
throw new AutoOpsError('Missing API URL in AutoOps configuration.');
|
||||
}
|
||||
|
||||
if (!autoopsConfig.api?.tls?.certificate || !autoopsConfig.api?.tls?.key) {
|
||||
this.logger.error(
|
||||
`[AutoOps API] Missing required TLS certificate or key in the configuration.`,
|
||||
errorMetadata
|
||||
);
|
||||
throw new AutoOpsError('Missing required TLS certificate or key in AutoOps configuration.');
|
||||
}
|
||||
|
||||
this.logger.debug(
|
||||
`[AutoOps API] Creating autoops agent with TLS cert: ${
|
||||
autoopsConfig?.api?.tls?.certificate ? '[REDACTED]' : 'undefined'
|
||||
} and TLS key: ${autoopsConfig?.api?.tls?.key ? '[REDACTED]' : 'undefined'}
|
||||
and TLS ca: ${autoopsConfig?.api?.tls?.ca ? '[REDACTED]' : 'undefined'}`
|
||||
`[AutoOps API] Creating autoops agent with request URL: ${autoopsConfig.api.url} and TLS cert: [REDACTED] and TLS key: [REDACTED]`
|
||||
);
|
||||
|
||||
const controller = new AbortController();
|
||||
const tlsConfig = this.createTlsConfig(autoopsConfig);
|
||||
const cloudSetup = appContextService.getCloud();
|
||||
|
@ -169,7 +180,6 @@ export class AutoOpsAPIService {
|
|||
enabled: true,
|
||||
certificate: autoopsConfig?.api?.tls?.certificate,
|
||||
key: autoopsConfig?.api?.tls?.key,
|
||||
certificateAuthorities: autoopsConfig?.api?.tls?.ca,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
@ -187,7 +197,6 @@ export class AutoOpsAPIService {
|
|||
...requestConfig.httpsAgent.options,
|
||||
cert: requestConfig.httpsAgent.options.cert ? 'REDACTED' : undefined,
|
||||
key: requestConfig.httpsAgent.options.key ? 'REDACTED' : undefined,
|
||||
ca: requestConfig.httpsAgent.options.ca ? 'REDACTED' : undefined,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
import { services as apmServices } from './apm_api_integration/common/services';
|
||||
import { services as datasetQualityServices } from './dataset_quality_api_integration/common/services';
|
||||
|
@ -32,6 +32,5 @@ export default createTestConfig({
|
|||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.ca=${CA_CERT_PATH}`,
|
||||
],
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
|
||||
export default createTestConfig({
|
||||
|
@ -28,6 +28,5 @@ export default createTestConfig({
|
|||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.ca=${CA_CERT_PATH}`,
|
||||
],
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
|
||||
export default createTestConfig({
|
||||
|
@ -32,6 +32,5 @@ export default createTestConfig({
|
|||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.ca=${CA_CERT_PATH}`,
|
||||
],
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
|
||||
export default createTestConfig({
|
||||
|
@ -25,6 +25,5 @@ export default createTestConfig({
|
|||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.ca=${CA_CERT_PATH}`,
|
||||
],
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
|
||||
export default createTestConfig({
|
||||
|
@ -29,7 +29,6 @@ export default createTestConfig({
|
|||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.ca=${CA_CERT_PATH}`,
|
||||
],
|
||||
apps: {
|
||||
serverlessElasticsearch: {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
|
||||
import { createTestConfig } from '../../config.base';
|
||||
|
||||
export default createTestConfig({
|
||||
|
@ -25,6 +25,5 @@ export default createTestConfig({
|
|||
'--xpack.dataUsage.autoops.api.url=http://localhost:9000',
|
||||
`--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`,
|
||||
`--xpack.dataUsage.autoops.api.tls.ca=${CA_CERT_PATH}`,
|
||||
],
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue