Class ClusterSecrets

All Implemented Interfaces:
ClusterState.Custom, Diffable<ClusterState.Custom>, NamedDiffable<ClusterState.Custom>, NamedWriteable, VersionedNamedWriteable, Writeable, ChunkedToXContent

public class ClusterSecrets extends AbstractNamedDiffable<ClusterState.Custom> implements ClusterState.Custom
Secrets that are stored in cluster state.

Cluster state secrets are initially loaded on each node from the cluster_secrets chunk in the reserved state file on disk. The format of that chunk is defined by SecureClusterStateSettings. Once the cluster is running, changes to cluster secrets are propagated by the master node that watches for changes of the reserved state settings file.

Since the master node should always have settings on disk, we don't need to persist this class to saved cluster state, either on disk or in the cloud. Therefore, we have defined this ClusterState.Custom as a private custom object. Additionally, we don't want to ever write this class's secrets out in a client response, so toXContentChunked(ToXContent.Params) returns an empty iterator.