OptionalautoOptional flag to automatically ban a client immediately after failed validation.
OptionalbanOptional default message to display when a client is banned, overridden by getBanMessage if provided.
OptionalcallbacksOptional set of callbacks for policy events, allowing customization of validation and ban actions.
OptionaldocOptional description for documentation purposes, aiding in policy usage understanding.
OptionalgetOptional function to retrieve a custom ban message for a client. Overrides the default banMessage if provided.
OptionalgetRetrieves the list of currently banned clients under this policy.
OptionalpersistOptional flag to enable serialization of banned clients to persistent storage (e.g., hard drive).
The unique name of the policy within the swarm.
OptionalsetOptional function to set the list of banned clients. Overrides default ban list management if provided.
OptionalvalidateOptional function to validate incoming messages against custom policy rules. Overrides default validation if provided.
OptionalvalidateOptional function to validate outgoing messages against custom policy rules. Overrides default validation if provided.
Interface representing the schema for configuring a policy. Defines how policies enforce rules and manage bans within the swarm.