Skip to content

Open-ITOM/docker-mid-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Docker Pulls Docker Cloud Build Status Build New MID Images

ServiceNow MID Server

Alpine based simplified Service-Now MID Server as Docker container forked from https://hub.docker.com/r/moers/mid-server

A note on Apache Log4j Vulnerability (CVE-2021-44228)

According to KB1000959 the MID servers are not affected by this vulnerability.
However, as the MID Server does contain the files for log4j 2.14.0, theoretically the vulnerability is still present. Therefore the JndiLookup.class is removed from the log4j-core*.jar in all versions of the Docker MID server.
Make sure you pull the latest version of the Docker image.

Start a MID server instance

Mandatory parameters:

$ docker run -d --name docker-mid-rome \
  --env SN_HOST_NAME=dev12345.service-now.com \
  --env USER_NAME=username \
  --env PASSWORD=password \
  kuchiriel/mid-server:rome

Supported Environment Variables

ENV SN_HOST_NAME "FQDN of the ServiceNow instance (replacement for $HOST)"
ENV USER_NAME "mid user name"
ENV PASSWORD "mid user password"
ENV HOSTNAME "the MID server name (suffixed by '-mid.docker') [optional]"
ENV PIN "disable auto upgrade and pin the mid to this version [optional]"
ENV PROXY "proxy-host [optional]"
ENV PROXY_PORT "proxy-port [optional]"
ENV CUSTOM_CA_CERT "custom cert in one line [optional]"
ENV CUSTOM_CA_ALIAS "alias used for the cert (default dockerExtraCaCerts) [optional]"
ENV HOST "the <host>.service-now.com subdomain [legacy]"
ENV EXT_PARAMS "additional parameters to be added or replaced in config.xml"

Custom Ca Certificate

If you run the MID server behind a company firewall and need to inject a self signed certificate following options are available:

  1. bind mount a custom.crt file to /opt/agent/custom_ca.crt
  2. replace the new lines in the certificate with \n and set it to the CUSTOM_CA_CERT var.

Extended Parameters

Use the EXT_PARAMS variable to add or update any parameter in the config.xml file.

Below JSON will add/update following parameter in the config.xml file:

  • <parameter name="mid.ssl.bootstrap.default.check_cert_revocation" value="false"/>
  • <parameter name="mid.ssl.bootstrap.default.target_endpoint" value="sn.local"/>
[
    {
        "name": "mid.ssl.bootstrap.default.target_endpoint",
        "value": "sn.local",
        "type": "add"
    },
    {
        "name": "mid.ssl.bootstrap.default.check_cert_revocation",
        "value": "false"
    }
]

Complete Example

$ docker run -d --name docker-mid-latest \
  --env SN_HOST_NAME=dev12345.service-now.com \
  --env USER_NAME=username \
  --env PASSWORD=password \
  --env PROXY=gateway.company.com \
  --env PROXY_PORT=8080 \
  -v "$(pwd)"/customer.crt:/opt/agent/custom_ca.crt \
  --env CUSTOM_CA_ALIAS=myCompanyCustomCrt \
  --env 'EXT_PARAMS=[{ "name": "mid.ssl.bootstrap.default.check_cert_revocation", "value": "false", "type":"update" }]' \
  --health-cmd='pgrep -af /opt/agent/bin/./wrapper-linux-x86-64 | grep `cat /opt/agent/work/mid.pid` || exit 1' \
  --health-interval=15s \
  --health-retries=6 \
  --health-timeout=5s \
  --health-start-period=30s \
  kuchiriel/mid-server

About

ServiceNow MID Server as Docker Container

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published