[Serverless] Disable Advanced settings plugin (#159819)

Partially addresses https://github.com/elastic/kibana/issues/159590

## Summary

This PR disables the Advanced settings plugin for all projects in
serverless.

**How to test:**

1. Start Elasticsearch with `yarn es snapshot` and Kibana with `yarn
serverless-{mode}` where {mode} can be `es`, `security`, or `oblt`.
2. Verify that the Advanced settings app is not accessible and its
endpoint (`app/management/kibana/settings`) leads to the Stack
Management landing page.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Elena Stoeva 2023-06-22 12:45:40 +03:00 committed by GitHub
parent 33e07340bc
commit ca425e8993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 0 deletions

View file

@ -23,6 +23,7 @@ xpack.license_management.enabled: false
xpack.reporting.enabled: false
xpack.cloud_integrations.data_migration.enabled: false
data.search.sessions.enabled: false
advanced_settings.enabled: false
# Enforce restring access to internal APIs see https://github.com/elastic/kibana/issues/151940
# server.restrictInternalApis: true

View file

@ -0,0 +1,20 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { schema, TypeOf } from '@kbn/config-schema';
import { PluginConfigDescriptor } from '@kbn/core-plugins-server';
const configSchema = schema.object({
enabled: schema.boolean({ defaultValue: true }),
});
export type AdvancedSettingsConfig = TypeOf<typeof configSchema>;
export const config: PluginConfigDescriptor<AdvancedSettingsConfig> = {
schema: configSchema,
};

View file

@ -9,5 +9,7 @@
import { PluginInitializerContext } from '@kbn/core/server';
import { AdvancedSettingsServerPlugin } from './plugin';
export { config } from './config';
export const plugin = (initContext: PluginInitializerContext) =>
new AdvancedSettingsServerPlugin(initContext);

View file

@ -28,6 +28,8 @@
"@kbn/core-notifications-browser",
"@kbn/core-theme-browser",
"@kbn/core-ui-settings-common",
"@kbn/config-schema",
"@kbn/core-plugins-server",
],
"exclude": [
"target/**/*",