Configure the Client Agent

Configure the Client Agent

출처: HashiCorp Boundary docs The default configuration included with the Boundary Client Agent upon installation will be suitable for most users. If you want to make changes to the configuration, the configuration file is located in the following directory: /Library/Application Support/HashiCorp/Boundary/boundary-client-agent.hcl C:\Program Files\Hashicorp Boundary\boundary-client-agent.hcl

Configuration settings

The configuration file contains the following fields:

  • alias_refresh_interval - Specifies how often to refresh the alias cache. The default value is 1 minute. Example:alias_refresh_interval="60s"
  • dns_request_timeout - Specifies for how long the Client Agent DNS request handling, including any recursion, is allowed to run before it is canceled. Example:dns_request_timeout="300s"
  • interface_to_use - Specifies the interface to use instead of the default. Example:interface_to_use="en1"
  • log_file - Specifies where to write the Boundary Client Agent log file to. Example:log_file="/Library/Application\ /Support/HashiCorp/Boundary/boundary-client-agent.log"
  • log_level - Specifies the verbosity of the Client Agent logs. Example:log_level="DEBUG"
  • log_to_stdout - Logs to STDOUT in addition to the boundary-client-agent.log file. Example:log_to_stdout=false
  • operational_state_file - Specifies the file that tracks the Client Agent's operational state, or whether it is running or paused. The Client Agent uses this file to persist the operational state across restarts. Example:operational_state_file= "/Library/Application\ /Support/HashiCorp/Boundary/boundary-client-agent-operational-state.json"
  • override_upstream_dns_servers - Lists the DNS servers that should be used for recursing non-Boundary requests, overriding those configured on the system. Example:override_upstream_dns_servers = ["8.8.8.8", "8.8.4.4"]
  • state_file - Specifies where to write the Boundary Client Agent state file to. This is an ephemeral file which is removed on successful shutdown. Example:state_file="/Library/Application\ /Support/HashiCorp/Boundary/boundary-client-agent-state.json"
  • v4_prefix - Specifies an alternate prefix to use for generating IPs. Currently must be between /8 and /16 Example:v4_prefix=1.1.1.1/8

Change the configuration

Complete the following steps to change the configuration of the Client Agent:

  1. As a privileged user, open the Boundary Client Agent configuration file in the editor of your choice. By default, it is located in the following directory: /Library/Application Support/HashiCorp/Boundary/boundary-client-agent.hcl
  2. Change the configuration settings, and save the file.NoteYou must restart the Client Agent to update some configuration settings. However, when you restart the Client Agent, it closes any existing sessions. Other configuration settings can be updated by only reloading the configuration file, which does not affect any existing sessions.
  3. Either reload the configuration file or restart the Client Agent.You can change the following configuration values by reloading the configuration file, which will not disrupt any existing sessions:dns_request_timeoutlog_filelog_levelstate_fileoverride_upstream_dns_serversv4_prefixRun the following command to reload the configuration file:$ sudo pkill -1 boundary-client-agent If you want to update another configuration value, you can restart the Client Agent using the following commands, however it will close any existing sessions:$ sudo launchctl stop com.hashicorp.boundary.boundary-client-agent $ sudo launchctl start com.hashicorp.boundary.boundary-client-agent
  4. As a privileged user, open the Boundary Client Agent configuration file in the editor of your choice. By default, it is located in the following directory: C:\Program Files\Hashicorp Boundary\boundary-client-agent.hcl
  5. Change the configuration settings, and save the file.
  6. Run the following commands to restart the Client Agent.net stop BoundaryClientAgent net start BoundaryClientAgent Note that when you restart the Client Agent, it closes any existing sessions.