OBLYTECH Logo
OBLYTECH Logo

Connect the agent to the MID Web Server using TLS

To connect the agent to the MID Web Server using TLS, add the CA certificate to the agent host’s trust store, set insecure-skip-tls-verify to false in acc.yml, and point backend-url to the MID Server’s fully qualified domain name. Restart the agent and verify its connection in the logs before configuring mTLS.

Prepare the connection after installing the .pem certificate

This procedure starts after the .pem file has been installed and the MID Web Server has been set up. Its purpose is to establish a verified TLS connection from Agent Client Collector to that server. That connection provides the starting point for configuring certificate authentication in both directions. In the Event Management setup, this step is part of the MID Web Server and agent mTLS Authentication sequence under the MID Web Server extension.

The role required for this TLS connection procedure is agent_client_collector_admin. Arrange the host access needed to import certificates, edit the agent configuration, and restart its service. Keep the instance role and operating system access separate in your change plan: having the application role does not establish that a person can change the host’s certificate store.

Collect the CA certificate file, the MID Server’s fully qualified domain name, the MID Web Server port, and the location of the active acc.yml file. The certificate examples below use labcacert.pem. Substitute the actual file and paths from your certificate setup rather than creating another certificate with that example name.

The steps here follow Brazil behavior. Check paths and service handling against your instance, release, and operating system; the Linux commands use the CentOS 7 layout. For host preparation beyond certificates, use the MID Server requirements guide.

Understand what the TLS connection proves

With TLS, the agent checks the server certificate against a certificate authority it trusts. The agent therefore needs access to the CA certificates used to validate the certificate presented by the MID Web Server. Installing a .pem file on the server and establishing trust on the agent host are separate parts of the connection.

mTLS adds a second check: the agent presents its own certificate, and the MID Web Server authenticates that client. A working TLS connection is an intermediate checkpoint. It establishes server authentication before the server and agent are configured for mutual authentication.

In this product, the MID Web Server extension takes the server role and the agent takes the client role, and each side authenticates the other. The TLS step covers only the direction in which the agent checks the server, so treat its result as evidence about that one direction.

Some TLS implementations also check whether the presented certificate has been revoked. They do this with the Online Certificate Status Protocol (OCSP): the verifying side sends a request to the OCSP responder set up by the certificate authority that issued the certificate, and the response says whether it is revoked. The responder’s address is typically embedded in the certificates the CA issues, so when you read a revocation result, check which certificate it refers to.

Keep the two results separate in your change record. Record whether the agent connected with certificate verification enabled, then record the later mTLS result independently. This makes a subsequent failure easier to locate because you can distinguish an already tested server connection from newly introduced client authentication settings. Carry the same details into the handoff: the host identity, CA filename, endpoint components, configuration location, restart time, and relevant log entries. List any unresolved observations explicitly, so the next person can repeat the checks without guessing which agent or certificate was tested.

If the distinction between the MID Server and its connection responsibilities is unclear, start with the plain-language MID Server guide before changing the agent endpoint.

Trust the MID Web Server certificate on a Linux agent host

Add the CA certificate to the host trust store

Copy labcacert.pem into /etc/pki/ca-trust/source/anchors/ using sudo cp -a with the actual source path. Next, run sudo update-ca-trust extract to update the trust material available on the host. Treat copying the file and extracting the updated trust store as two steps in the same change.

Run openssl verify followed by the full path to labcacert.pem. The expected result ends with labcacert.pem: OK. Check the filename in that result so that you know which certificate was tested. If verification fails, resolve that failure before making the agent connection your next test.

Update acc.yml and restart the agent

Open the agent’s acc.yml file and set insecure-skip-tls-verify to false. Configure backend-url to use the MID Server’s fully qualified domain name with the secure WebSocket scheme wss, the MID Web Server port, and the /ws/events endpoint. Retain the configuration file’s expected structure when entering the value.

Review those components together before restarting. Importing the certificate says nothing about whether the agent configuration points to the intended server or port. Compare the configured destination against the connection details collected for this change, rather than relying on an endpoint left from an earlier setup.

Restart the agent with systemctl restart acc. Then inspect its logs for evidence that it connected to the MID Server. The Linux Agent Client Collector log is /var/log/servicenow/agent-client-collector/acc.log. Use entries from after the restart so the result reflects the configuration you just changed.

Establish the same verified connection on Windows

Import and verify the CA certificate

Import labcacert.pem into the Windows Certificate Store with certutil -addstore -f “Root”, followed by the certificate’s actual path. Run openssl verify with -CAfile pointing to that file and supply the certificate path as the verification target. The expected output ends with labcacert.pem: OK.

A successful import records a change to the certificate store; the verification command provides another checkpoint for the certificate being used. Avoid moving directly to agent configuration while either result remains unresolved.

Edit the configuration and restart the service

The Windows configuration file is C:\ProgramData\servicenow\agent-client-collector\config\acc.yml. Set insecure-skip-tls-verify to false and set backend-url to the secure WebSocket destination containing the MID Server’s fully qualified domain name, the MID Web Server port, and /ws/events. The Windows example represents backend-url as a YAML list containing a quoted destination.

Restart through the Services app by selecting the Agent Client Collector entry and choosing Restart. Alternatively, use net stop AgentClientCollector followed by net start AgentClientCollector. Choose a restart method that fits your host administration process and record its completion before examining the connection result. The Services app and the command line both act on the same Agent Client Collector service, so the log check that follows applies to either method.

Check C:\ProgramData\ServiceNow\agent-client-collector\log\acc.log for the connection, or use the location specified by log-file if it has been changed. Compare the log time with the restart time. An older successful connection tells you nothing about whether the new configuration worked.

Use the connection result to decide the next action

Three checkpoints decide the next step: certificate verification, the saved acc.yml values, and the connection logged after restart. A certificate verification result concerns trust material; the configuration identifies what the agent should use; the log shows what happened when the restarted agent attempted its connection.

  • If certificate verification fails, revisit the CA file and trust-store steps before investigating later mTLS settings.
  • If the configured destination differs from the intended MID Server, correct the fully qualified domain name, port, or endpoint before repeating the connection test.
  • If the restart completed but the connection is unconfirmed, inspect the current log location and entries rather than treating service availability as connection success.

Keep insecure-skip-tls-verify set to false. Turning verification off would remove the certificate check this procedure is intended to establish. For a wider investigation after these connection checks, use the MID Server troubleshooting guide.

For help planning this work, see ServiceNow implementation.

Hand the verified TLS connection over to mTLS configuration

The next server-side procedure, configuring mTLS authentication for a MID Web Server, also requires agent_client_collector_admin. It includes importing the CA certificate into the MID trust store, checking that import, configuring applicable certificate revocation handling, setting Authentication type to mTLS, and restarting the MID Web Server.

The mTLS work has prerequisites of its own. Before mTLS is enabled, the keys and certificates must be created, the .pem file must be installed on the MID Server, and the agent must already be connected to the MID Server. This TLS procedure completes the last of those, so keep its connection evidence in the change record as the baseline for everything that follows.

The agent-side mTLS procedure requires agent_client_collector_admin as well. It introduces the agent key and signed certificate, permissions that let the agent read its key, and the key-file and cert-file parameters in acc.yml. Keep those changes after this TLS checkpoint so the initial connection result remains a clear baseline.

Before closing this stage, retain the successful connection evidence with the change record. That record becomes the comparison point if introducing the client certificate changes the agent’s ability to connect.