Class ConsistentSettingsService
java.lang.Object
org.elasticsearch.common.settings.ConsistentSettingsService
Used to publish secure setting hashes in the cluster state and to validate those hashes against the local values of those same settings.
This is colloquially referred to as the secure setting consistency check. It will publish and verify hashes only for the collection
of settings passed in the constructor. The settings have to have the
Setting.Property.Consistent
property.-
Constructor Summary
ConstructorDescriptionConsistentSettingsService(Settings settings, ClusterService clusterService, Collection<Setting<?>> secureSettingsCollection)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Verifies that the hashes of consistent secure settings in the latestClusterState
verify for the values of those same settings on the local node.Returns aLocalNodeMasterListener
that will publish hashes of all the settings passed in the constructor.
-
Constructor Details
-
ConsistentSettingsService
public ConsistentSettingsService(Settings settings, ClusterService clusterService, Collection<Setting<?>> secureSettingsCollection)
-
-
Method Details
-
newHashPublisher
Returns aLocalNodeMasterListener
that will publish hashes of all the settings passed in the constructor. These hashes are published by the master node only. Note that this is not designed forSecureSettings
implementations that are mutable. -
areAllConsistent
public boolean areAllConsistent()Verifies that the hashes of consistent secure settings in the latestClusterState
verify for the values of those same settings on the local node. The settings to be checked are passed in the constructor. Also, validates that a missing local value is also missing in the published set, and vice-versa.
-