MID Server ECC Queue
The External Communication Channel (ECC) Queue is a connection point between an instance and the MID Server. Jobs that the MID Server needs to perform are saved in this queue until the MID Server is ready to handle them.
|  |
Asynchronous Message Bus
The MID Server subscribes to messages published by the Asynchronous Message Bus (AMB), which notifies the MID Server that it has pending task records in the ECC Queue. If a task exists in the ECC Queue for that MID Server, the MID Server sets the status to "Processing". When finished working on a requested job, the MID Server reports back to the ECC queue with the results.
The MID Server opens a persistent connection to the instance through the AMB Client and listens on the /mid/server/<mid_sys_id> AMB channel. When an output record is inserted into the Queue [ecc_queue] table, an AMB message is sent to the MID Server's channel. The MID Server receives this message and immediately polls the ecc_queue table for work, unless the MID Server is busy and the message priority level is not Interactive.
The MID Server polls the ECC queue at the maximum regular interval defined in the mid.poll.time configuration parameter (40 seconds by default), regardless of AMB message activity. If the MID is busy and receeives an AMB message witrh a priority level other than Interactive, the queue poll time changes to mid.poll.time.standard (5 seconds by default). This polling of the ECC queue at a regular interval is done in case the AMB connection is dropped.
MID Server ECC queue polling process
Note: The AMB client on the MID Server does not work in all environments and might need to be disabled to avoid performance issues. To disable AMB in your environment, set the mid.disable_amb parameter to true. When you disable AMB, the MID Server no longer receives notifications for each new ECC queue output record. See mid.poll.time in MID Server parameters for more information.
ECC Queue information
You can access the ECC Queue by navigating any of these paths:
- Discovery > Output and Artifacts > ECC Queue
- Discovery > Discovery Schedules > {schedule name} > {Discovery status record}
- ECC > Queue
- {Discovery Status record} > ECC Queue
An ECC Queue provides the following information:
| Field | Input value | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Agent | The name of the external system that this messages is either from or to. If the message is from or to a MID Server, the agent name is in the form `mid.server.xxx`, where xxx is the name of a particular MID Server. | ||||||||
| Topic | The name of the probe the MID server ran. If you are using a pattern for discovery, the Horizontal Pattern probe Horizontal Pattern probe appears. | ||||||||
| Name | The actual command the probe ran. For example, if Topic is SSHCommand, then the Name field contains the actual shell command to run. If you are using a pattern for discovery, the following appears: Pattern Launcher: followed by the name of the pattern and the multipage number. | ||||||||
| Source | The IP address that the discovery is to run against. A few probes run against multiple IP addresses; in those cases, this field contains a human-readable description. | ||||||||
| Response to | This optional field contains a reference \(sys\_id\) to the ECC Queue message that this message is in response to. Discovery makes extensive use of this field to track the hierarchy of messages that result from a given scheduled Discovery. Click the record icon for the value in this field to open the ECC Queue record for the activity that spawned the current probe or sensor record. | ||||||||
| Queue | An indicator of whether this message was is an input message or an output message. | ||||||||
| State | The state of the current ECC queue record. States update automatically. | ||||||||
| Processed | The time when this message was processed. | ||||||||
| Created | The time when this message was created. | ||||||||
| Sequence | The unique sequence number for this message. This value is automatically generated when an ECC Queue record is inserted. Its use is deprecated. | ||||||||
| Error string | An error message, if an error occurred during processing. This field is hidden on the standard form unless there was an error. | ||||||||
| Payload | The body of the message in XML format. The returned XML has a root tag of `ECC queue controlsThe ECC Queue form contains these related links:
ECC Queue retry policyThe ECC Queue Retry Policy plugin (com.glideapp.ecc_retry_policy) needs to be activated to be able to view the ECC Queue Retry Policy and Queue Retry Activity modules. Manage ECC Queue content for a MID ServerThe ECC Queue allows you to create ECC Queue messages, access MID Server log entries, and retrieve statistics from an individual MID Server record. Before you beginRole required: admin, mid_server Procedure
ECC queue security considerationsThe ECC queue is a connection point between an instance and the MID Server. Because the ECC queue processes commands and scripts in managed environments, it is essential to understand the security boundaries and shared responsibilities for secure deployment. JavaScript sandbox bypassThe MID Server does not implement a full JavaScript sandbox. The credential access protection feature enables only digitally signed MID Script Includes to access the restricted Java packages used for credential retrieval. This feature runs in audit mode by default and protects discovery credentials, not all script execution. Harden the environment where the MID Server is deployed. Hardening measures include:
For more information, see Operating system security and Virtual infrastructure security. Server-side request forgery via HTTP probeThe ServiceNow platform addresses identified input validation gaps for allowed characters in HTTP probe URLs. The platform does not define which internal endpoints are sensitive within your environment. Plan and restrict which network destinations the MID Server host can reach. Enforce these restrictions at the host or network level based on your environment and use cases:
OS command injection via WMI Runner source parameterThe WMI Runner component executes WMI queries against Windows targets as part of the MID Server discovery process. Commands pass to the WMI Runner through the ECC queue. Input validation gaps can allow malformed input, such as command concatenation or injection, to pass through the ECC queue and reach the WMI Runner. The ServiceNow platform identifies and resolves input validation gaps in the MID Server that permit unauthorized characters or command injection through the ECC queue. Hardening measures include:
ECC firewall security control bypass via default accept policyThe ServiceNow platform provides two layers of control that work together to govern ECC message handling:
Used together, these features give you control over what executes on the MID Server. Review and configure
For more information, see |