[Fleet] Make the encryptedSavedObject plugin optionnal (#87470)
This commit is contained in:
parent
6df7498a41
commit
3b602f8668
|
@ -4,8 +4,15 @@
|
|||
"server": true,
|
||||
"ui": true,
|
||||
"configPath": ["xpack", "fleet"],
|
||||
"requiredPlugins": ["licensing", "data", "encryptedSavedObjects"],
|
||||
"optionalPlugins": ["security", "features", "cloud", "usageCollection", "home"],
|
||||
"requiredPlugins": ["licensing", "data"],
|
||||
"optionalPlugins": [
|
||||
"security",
|
||||
"features",
|
||||
"cloud",
|
||||
"usageCollection",
|
||||
"home",
|
||||
"encryptedSavedObjects"
|
||||
],
|
||||
"extraPublicDirs": ["common"],
|
||||
"requiredBundles": ["kibanaReact", "esUiShared", "home", "infra", "kibanaUtils"]
|
||||
}
|
||||
|
|
|
@ -91,12 +91,12 @@ export interface FleetSetupDeps {
|
|||
}
|
||||
|
||||
export interface FleetStartDeps {
|
||||
encryptedSavedObjects: EncryptedSavedObjectsPluginStart;
|
||||
encryptedSavedObjects?: EncryptedSavedObjectsPluginStart;
|
||||
security?: SecurityPluginStart;
|
||||
}
|
||||
|
||||
export interface FleetAppContext {
|
||||
encryptedSavedObjectsStart: EncryptedSavedObjectsPluginStart;
|
||||
encryptedSavedObjectsStart?: EncryptedSavedObjectsPluginStart;
|
||||
encryptedSavedObjectsSetup?: EncryptedSavedObjectsPluginSetup;
|
||||
security?: SecurityPluginStart;
|
||||
config$?: Observable<FleetConfigType>;
|
||||
|
@ -250,8 +250,7 @@ export class FleetPlugin
|
|||
|
||||
// Conditional config routes
|
||||
if (config.agents.enabled) {
|
||||
const isESOUsingEphemeralEncryptionKey =
|
||||
deps.encryptedSavedObjects.usingEphemeralEncryptionKey;
|
||||
const isESOUsingEphemeralEncryptionKey = !deps.encryptedSavedObjects;
|
||||
if (isESOUsingEphemeralEncryptionKey) {
|
||||
if (this.logger) {
|
||||
this.logger.warn(
|
||||
|
|
|
@ -22,8 +22,7 @@ export const getFleetStatusHandler: RequestHandler = async (context, request, re
|
|||
const isProductionMode = appContextService.getIsProductionMode();
|
||||
const isCloud = appContextService.getCloud()?.isCloudEnabled ?? false;
|
||||
const isTLSCheckDisabled = appContextService.getConfig()?.agents?.tlsCheckDisabled ?? false;
|
||||
const isUsingEphemeralEncryptionKey = appContextService.getEncryptedSavedObjectsSetup()
|
||||
.usingEphemeralEncryptionKey;
|
||||
const isUsingEphemeralEncryptionKey = !appContextService.getEncryptedSavedObjectsSetup();
|
||||
|
||||
const missingRequirements: GetFleetStatusResponse['missing_requirements'] = [];
|
||||
if (!isAdminUserSetup) {
|
||||
|
|
|
@ -114,10 +114,6 @@ class AppContextService {
|
|||
}
|
||||
|
||||
public getEncryptedSavedObjectsSetup() {
|
||||
if (!this.encryptedSavedObjectsSetup) {
|
||||
throw new Error('encryptedSavedObjectsSetup is not set');
|
||||
}
|
||||
|
||||
return this.encryptedSavedObjectsSetup;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue