During desired nodes updates the system validates that the provided node settings are valid in order to avoid boot looping issues. If one of the node settings depends on a secure setting, the validation fails even when the secure setting is present and correct.
server/src/main/java/org/elasticsearch/node/Node.java
pluginHandlers.forEach(h -> reservedStateHandlers.addAll(h.handlers()));
            List<TerminationHandler> terminationHandlers = pluginsService.loadServiceProviders(TerminationHandlerProvider.class)
                .stream()
                .map(prov -> prov.handler())
                .toList();
            if (terminationHandlers.size() == 1) {
                this.terminationHandler.set(terminationHandlers.get(0));
            } else if (terminationHandlers.size() > 1) {
                throw new IllegalStateException(
                    Strings.format(
                        "expected at most one termination handler, but found %s: [%s]",
                        terminationHandlers.size(),
                        terminationHandlers.stream().map(it -> it.getClass().getCanonicalName())
                    )
                );
            }
            ActionModule actionModule = new ActionModule(
                settings,
                clusterModule.getIndexNameExpressionResolver(),
                settingsModule.getIndexScopedSettings(),
                settingsModule.getClusterSettings(),
                settingsModule.getSettingsFilter(),
                threadPool,
                pluginsService.filterPlugins(ActionPlugin.class),
                client,
                circuitBreakerService,
                usageService,
                systemIndices,
                tracer,
                clusterService,