Removes older configuration that is no longer in use, removes un-used configuration keys (#104540)
## Summary * Removes `kibana.yml` (configuration) keys that are not in use * Removes an older configuration schema file from before the merge of endpoint with security solutions Unused schema file was: ``` server/endpoint/config.ts ``` Unused keys removed: ``` xpack.securitySolution.alertResultListDefaultDateRange xpack.securitySolution.validateArtifactDownloads ``` ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
This commit is contained in:
parent
99b9a2bc5e
commit
bc20a9eaa8
|
@ -381,7 +381,6 @@ kibana_vars=(
|
||||||
xpack.security.session.lifespan
|
xpack.security.session.lifespan
|
||||||
xpack.security.sessionTimeout
|
xpack.security.sessionTimeout
|
||||||
xpack.securitySolution.alertMergeStrategy
|
xpack.securitySolution.alertMergeStrategy
|
||||||
xpack.securitySolution.alertResultListDefaultDateRange
|
|
||||||
xpack.securitySolution.endpointResultListDefaultFirstPageIndex
|
xpack.securitySolution.endpointResultListDefaultFirstPageIndex
|
||||||
xpack.securitySolution.endpointResultListDefaultPageSize
|
xpack.securitySolution.endpointResultListDefaultPageSize
|
||||||
xpack.securitySolution.maxRuleImportExportSize
|
xpack.securitySolution.maxRuleImportExportSize
|
||||||
|
@ -389,7 +388,6 @@ kibana_vars=(
|
||||||
xpack.securitySolution.maxTimelineImportExportSize
|
xpack.securitySolution.maxTimelineImportExportSize
|
||||||
xpack.securitySolution.maxTimelineImportPayloadBytes
|
xpack.securitySolution.maxTimelineImportPayloadBytes
|
||||||
xpack.securitySolution.packagerTaskInterval
|
xpack.securitySolution.packagerTaskInterval
|
||||||
xpack.securitySolution.validateArtifactDownloads
|
|
||||||
xpack.spaces.enabled
|
xpack.spaces.enabled
|
||||||
xpack.spaces.maxSpaces
|
xpack.spaces.maxSpaces
|
||||||
xpack.task_manager.enabled
|
xpack.task_manager.enabled
|
||||||
|
|
|
@ -60,19 +60,10 @@ export const configSchema = schema.object({
|
||||||
endpointResultListDefaultFirstPageIndex: schema.number({ defaultValue: 0 }),
|
endpointResultListDefaultFirstPageIndex: schema.number({ defaultValue: 0 }),
|
||||||
endpointResultListDefaultPageSize: schema.number({ defaultValue: 10 }),
|
endpointResultListDefaultPageSize: schema.number({ defaultValue: 10 }),
|
||||||
|
|
||||||
/**
|
|
||||||
* Alert Endpoint Configuration
|
|
||||||
*/
|
|
||||||
alertResultListDefaultDateRange: schema.object({
|
|
||||||
from: schema.string({ defaultValue: 'now-15m' }),
|
|
||||||
to: schema.string({ defaultValue: 'now' }),
|
|
||||||
}),
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Artifacts Configuration
|
* Artifacts Configuration
|
||||||
*/
|
*/
|
||||||
packagerTaskInterval: schema.string({ defaultValue: '60s' }),
|
packagerTaskInterval: schema.string({ defaultValue: '60s' }),
|
||||||
validateArtifactDownloads: schema.boolean({ defaultValue: true }),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const createConfig = (context: PluginInitializerContext) =>
|
export const createConfig = (context: PluginInitializerContext) =>
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { EndpointConfigSchema, EndpointConfigType } from './config';
|
|
||||||
|
|
||||||
describe('test config schema', () => {
|
|
||||||
it('test config defaults', () => {
|
|
||||||
const config: EndpointConfigType = EndpointConfigSchema.validate({});
|
|
||||||
expect(config.enabled).toEqual(false);
|
|
||||||
expect(config.endpointResultListDefaultPageSize).toEqual(10);
|
|
||||||
expect(config.endpointResultListDefaultFirstPageIndex).toEqual(0);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,42 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
||||||
* or more contributor license agreements. Licensed under the Elastic License
|
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
|
||||||
* 2.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { schema, TypeOf } from '@kbn/config-schema';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { PluginInitializerContext } from 'kibana/server';
|
|
||||||
|
|
||||||
export type EndpointConfigType = ReturnType<typeof createConfig$> extends Observable<infer P>
|
|
||||||
? P
|
|
||||||
: ReturnType<typeof createConfig$>;
|
|
||||||
|
|
||||||
export const EndpointConfigSchema = schema.object({
|
|
||||||
enabled: schema.boolean({ defaultValue: false }),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Host Configuration
|
|
||||||
*/
|
|
||||||
endpointResultListDefaultFirstPageIndex: schema.number({ defaultValue: 0 }),
|
|
||||||
endpointResultListDefaultPageSize: schema.number({ defaultValue: 10 }),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Alert Configuration
|
|
||||||
*/
|
|
||||||
alertResultListDefaultDateRange: schema.object({
|
|
||||||
from: schema.string({ defaultValue: 'now-15m' }),
|
|
||||||
to: schema.string({ defaultValue: 'now' }),
|
|
||||||
}),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Artifacts Configuration
|
|
||||||
*/
|
|
||||||
packagerTaskInterval: schema.string({ defaultValue: '60s' }),
|
|
||||||
validateArtifactDownloads: schema.boolean({ defaultValue: true }),
|
|
||||||
});
|
|
||||||
|
|
||||||
export function createConfig$(context: PluginInitializerContext) {
|
|
||||||
return context.config.create<TypeOf<typeof EndpointConfigSchema>>();
|
|
||||||
}
|
|
|
@ -24,12 +24,7 @@ export const createMockConfig = (): ConfigType => ({
|
||||||
enableExperimental: [],
|
enableExperimental: [],
|
||||||
endpointResultListDefaultFirstPageIndex: 0,
|
endpointResultListDefaultFirstPageIndex: 0,
|
||||||
endpointResultListDefaultPageSize: 10,
|
endpointResultListDefaultPageSize: 10,
|
||||||
alertResultListDefaultDateRange: {
|
|
||||||
from: 'now-15m',
|
|
||||||
to: 'now',
|
|
||||||
},
|
|
||||||
packagerTaskInterval: '60s',
|
packagerTaskInterval: '60s',
|
||||||
validateArtifactDownloads: true,
|
|
||||||
alertMergeStrategy: 'missingFields',
|
alertMergeStrategy: 'missingFields',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue