1## This Source Code Form is subject to the terms of the Mozilla Public 2## License, v. 2.0. If a copy of the MPL was not distributed with this 3## file, You can obtain one at https://mozilla.org/MPL/2.0/. 4## 5## Copyright (c) 2007-2021 VMware, Inc. or its affiliates. All rights reserved. 6 7defmodule RabbitMQ.CLI.Diagnostics.Commands.DisableAuthAttemptSourceTrackingCommand do 8 alias RabbitMQ.CLI.Core.DocGuide 9 @behaviour RabbitMQ.CLI.CommandBehaviour 10 11 use RabbitMQ.CLI.Core.MergesNoDefaults 12 use RabbitMQ.CLI.Core.AcceptsNoPositionalArguments 13 use RabbitMQ.CLI.Core.RequiresRabbitAppRunning 14 15 def run([], %{node: node_name}) do 16 :rabbit_misc.rpc_call(node_name, :application, :set_env, 17 [:rabbit, :track_auth_attempt_source, :false]) 18 end 19 use RabbitMQ.CLI.DefaultOutput 20 21 def usage, do: "disable_track_auth_attempt_source" 22 23 def usage_doc_guides() do 24 [ 25 DocGuide.access_control(), 26 DocGuide.monitoring() 27 ] 28 end 29 30 def help_section(), do: :configuration 31 32 def description(), do: "Disables the tracking of peer IP address and username of authentication attempts" 33 34 def banner([], _), do: "Disabling authentication attempt source tracking ..." 35end 36