Before configuring mTLS authentication on the agent, you must run a series of commands that enable configuring Transport Layer Security (TLS) authentication.
始める前に
Role required: agent_client_collector_admin
手順
-
Generate a key for your agent.
openssl ecparam -out labacc/acc.key -name prime256v1 -genkey
-
Generate a certificate request for your agent, according to the following format:
openssl req -new -key labacc/acc.key -out labacc/acc.csr -subj "/C=<country>/ST=<state>/L=<location>/O=<organization>/OU=<organization unit>/CN=<cn abbreviation>/emailAddress=<email address>"
For example:
openssl req -new -key labacc/acc.key -out labacc/acc.csr -subj "/C=US/ST=NC/L=Raleigh/O=ServiceNow/OU=ITOM Lab/CN=acclinux/emailAddress=john.smith@servicenow.com"
-
Generate a signed certificate for your agent.
openssl x509 -req -days 365 -in labacc/acc.csr -CA labca/labcacert.pem -CAkey labca/ec-labcakey.pem -CAcreateserial -extensions client -out labacc/acc.crt
-
In the labacc folder, copy your key and certificate files to the agent host's virtual machine.
cp ./acc.key <agent host config folder>
cp ./acc.crt <agent host config folder>
The configuration folder paths depend on your OS.
- Linux: /etc/servicenow/agent-client-collector/
- Windows: C:\ProgramData\servicenow\agent-client-collector\config\
- macOS: /Library/Application\ Support/servicenow/agent-client-collector/
-
Navigate to the location where you copied the .key and .crt files from.
-
Run the following commands to update the files' read permissions and enable the agent to read from them.
- Linux:
chown servicenow:servicenow acc.key
chmod 0400 acc.key
- Windows:
- Select and hold (or right-click) the .key file and select the Security tab from the file properties.
- Add the servicenow user to the list of users with read access to the file.
- macOS:
chown _servicenow:_servicenow acc.key
chmod 0400 acc.key
注: The agent must be run with the default servicenow user.
-
In the acc.yml configuration file, add the following parameters to specify the path to your key and certificate files.
key-file: "<path to acc.key file>/acc.key"
cert-file: "<path to acc.cert file>/acc.crt"
-
Restart the agent.
- Linux:
systemctl restart acc
- Windows:
- Open the Services application.
- Select and hold (or right-click) the Agent Client Collector entry and select Restart.
- macOS:
launchctl unload -w /Library/LaunchDaemons/com.sn.acc.plist
launchctl load -w /Library/LaunchDaemons/com.sn.acc.plist
-
Check the logs to verify that the agent was able to connect to the instance using TLS.
Agent Client Collector logs are accessible from: