Configuring Delinea MidServer Utility for the Delinea Platform

This configuration applies to version 5.0 and above. Otherwise, manually run the Delinea MidServer Setup Utility.

After establishing the basic requirements for creating a service account and a discovery secret, run the Delinea MidServer Setup Utility to generate all necessary parameters and securely store credentials without using plain text in the MidServer configuration file.

Starting with version 5.0, the utility offers a graphical UI mode that simplifies configuration. The UI is designed for Windows installations and relies on standard Windows GUI components.

During Discovery, ServiceNow does not treat credentials as "once per device"; instead, credentials are resolved per probe and per discovery phase. For a single machine, different discovery activities such as port scanning, OS detection, and horizontal discovery run independently and may each request credentials on their own. As a result, the same credential can be resolved multiple times during a single discovery run. This behavior is by design in ServiceNow.

If the Linux system runs in a headless configuration (for example, when the DISPLAY environment variable is unset or no GUI session is active), JavaFX fails to initialize its graphics subsystem. As a result, the UI utility does not launch and throws a toolkit initialization exception.

If you cannot enable or access a graphical display session on the Linux VM, use the command-line utility (Manually Running the Delinea MidServer Utility for the Delinea Platform) instead. The command-line utility provides the same configuration capabilities and does not require a graphical environment.

Step 1: Run the Delinea MidServer Setup Utility

Before running the Delinea MidServer Setup Utility, ensure the following:

  • Java Requirement:

  • You can use the bundled Java included with the ServiceNow MID Server to run the setup utility. No separate Java installation is required.

  • Open Command Prompt and navigate to the following folder:

    C:\servicenow\agent\jre\bin

  • Then run the setup command to open the Delinea MID Server Setup Utility UI:

    java -jar C:\servicenow\agent\extlib\DelineaMidServerSetupUtility.jar

  • This uses the same built-in Java runtime that the ServiceNow MID Server uses (<MID Server>\agent\jre\bin), ensuring compatibility and eliminating the need for an external Java installation.

Step 2: Create New Configuration

When authenticating the Delinea Platform with ServiceNow using Just-in-Time mode or Grant File mode, there is one way to establish a connection. You can use your Delinea Platform username and password to authenticate or generate a token in the file.

For production environments and large-scale deployments, Grant File Mode is strongly recommended over Just-in-Time Mode to avoid API rate limiting issues and optimize performance. Grant File Mode prevents authentication token regeneration on every API call, which is critical for environments with thousands of devices or multiple discovery probes.
We recommend using the grant file authentication option to avoid issues with self-DDOS.

Grant File Mode (Recommended)

The Grant File Mode in the Delinea MidServer Setup Utility allows you to authenticate with the Delinea Platform using an OAuth2 grant file. This mode encrypts your credentials and produces both an oauth2_grant.json file and a config.xml file for your MID Server. By storing the authentication token locally, Grant File Mode prevents repeated token generation and significantly reduces API calls to Delinea Platform.

  1. In the Vault Type field, select Platform from the dropdown.

  2. Select the Create New Configuration checkbox.

  3. In the Mode field, select the Grant File checkbox.

    The Mode field determines how the Delinea MidServer Setup Utility authenticates with the Delinea Platform. Grant File Mode is strongly recommended to avoid self-DDOS scenarios and API rate limiting issues.

  4. Provide the following information:

    • In the Server URL field, enter the Delinea Platform URL.

    • Provide the Username and Password for the Platform service account.

  5. Click Generate oauth2_grant.json to create the grant file.

    When you select Generate oauth2_grant.json, the setup utility displays:

    OAuth2 grant file created successfully at: C:\servicenow\agent\extlib\oauth2_grant.json

  6. Click Save oauth2_grant.json to store it locally.

  7. Select additional parameters as needed.

    • If you want to allow self signed certificates select the Allow Self Signed Certificates checkbox.

    • If you know you want to use a proxy server, select the Use Proxy Server checkbox and then provide the Proxy host and port.

      • Default Parameters:

      1. Select the Enable Logging checkbox to enable additional logging other than the default one.

      2. The Log Level is set to 4 by default which means that all three logs type will get printed.

      3. Select the Search Secret by Name checkbox if you want to validate the secret based on the secret name. For detailed configuration, go here.

      4. Select the Enable Auto Comment checkbox if you want to enable auto comment. In the text box next to it type the comment. For detailed configuration, go here.

  8. Click Generate Configuration File and then select the Config.xml file available in the mid server's agent folder to save the updates.

    A confirmation message appears: Parameters updated in config.xml

  9. Click Ok.

  10. Open the config.xml file to see all the parameters that you just configured being reflected in the file.

Just-in-Time (JIT) Mode

JIT Mode should only be used for small test environments. For production deployments, use Grant File Mode instead.

The Just-in-Time (JIT) Mode in the Delinea MidServer Setup Utility lets you securely authenticate with the Delinea Platform using a service account. This mode generates all necessary parameters, encrypts credentials, and produces a config.xml file for your MID Server, ensuring a safe and reliable connection.

  1. In the Vault Type field, select Platform from the dropdown.

  2. Select the Create New Configuration checkbox.

  3. In the Mode field select the JIT Mode checkbox.

  4. The Mode field determines how the Delinea MidServer Setup Utility authenticates with the Delinea Platform

  5. Provide the following information:

    • In the Server URL field provide the Delinea Platform URL.

    • Enter the Username and Password for the Platform service account

  6. Select additional(optional) parameters as needed.

    1. If you want to allow self signed certificates select the Allow Self Signed Certificates checkbox.

    2. If you know you want to use a proxy server, select the Use Proxy Server checkbox and then provide the Proxy host and port.

    • Default Parameters:

      1. Select the Enable Logging checkbox to enable additional logging other than the default one.

      2. The Log Level is set to 4 by default which means that all three logs type will get printed.

      3. Select the Search Secret by Name checkbox if you want to validate the secret based on the secret name. For detailed configuration, go here.

      4. Select the Enable Auto Comment checkbox if you want to enable auto comment. In the text box next to it type the comment. For detailed configuration, go here.

      5. Select the Enable Cache URL checkbox if you want to use the Delinea Credential Cache.  In the text box next to it type the Cache URL (e.g: "https://10.XX.XX.XX:80XX"). For detailed configuration, go here.

  7. Click Generate Configuration File, and then select the Config.xml file located in the mid server's agent folder to save your updates.

    A confirmation message appears: Parameters updated in config.xml

  8. Click Ok.

  9. Open the config.xml file to see all the parameters that you just configured being reflected in the file.

Step 3: Update Existing Configuration

The Update Existing Configuration option lets you modify an existing config.xml file for your MID Server.

  1. In the Vault Type field, select Platform from the dropdown.

  2. Select the Update Existing Configuration checkbox.

  3. Click Load Parameters to import the current settings from your config.xml file.

  4. Mode is selected by default.

    The Mode field determines how the Delinea MidServer Setup Utility authenticates with the Delinea Platform. It is selected based on your config.xml file, but you can change the Mode or any parameter values as needed before generating the configuration file.

  5. Modify any parameters as needed.

  6. Click Generate Configuration File and then select the Config.xml file to save the updates.

    The config.xml file contains the following attributes:

    Attribute Value Description
    platform_url URL for your Delinea Platform.
    oauth2_grant_file Grant File Mode authentication. When present, indicates the MID Server uses stored OAuth2 tokens instead of generating new tokens on each API call.
    platform_auth_str This parameter is set to an encrypted string generated by the encryption utility, which contains the Delinea Platform username and password. Used in Just-in-Time (JIT) Mode.
    allow_self_signed_certificate Set to true if you are using a self-signed cert for Delinea Platform instance.
    vault_type This parameter should be set to Platform to validate the credentials with Delinea Platform
    is_logging This parameter can be set to either true or false to enable additional logging other than the default one.
    log_level
    • Log Level 1 (Logs Info): logs Information

    • Log Level 2 (Logs Debug): logs for developer

    • Log Level 3 (Logs Error): if any error logs will get printed.

    • Log Level 4 (Logs all): all above three logs type will get printed. Recommended for troubleshooting API performance issues.

    proxy_host This field will likely be blank, unless you know a proxy to be used to get out to the internet from your MidServer.
    proxy_port This field will likely be blank, unless you know a proxy to be used to get out to the internet from your MidServer.
    proxy_auth_str This parameter is set to an encrypted string generated by the encryption utility containing the username and password of the Proxy Server.
    search_secret_by_name This field can be set as true/false. In case you want to validate credentials using secret name, set this field as true.
    auto_comment

    This parameter is set as a string.

    cache_url For Just-in-Time mode, provide the Delinea Credentials Cache URL in format https://host:port if credential caching is enabled. Leave blank if not used. Note: When using Grant File mode, Credential Cache is generally not needed as Grant File Mode already provides efficient token management.

If you do not provide an is_logging and log_level parameter in the config file, the default value will be true and 3.

Enabling the Search Secret by Name

  1. Set the following parameter as true in the MID Server config.xml file to enable secret search by name.

    \<parameter name="**search_secret_by_name**" value="true"/\>

  2. Pass the secret name from the ServiceNow MID Server in the Credential ID field.

  3. Provide a complete name of the secret because a partial name will not work.

    Searching for the secret by name is not recommended because Delinea Platform can have the same name for two different secrets. This functionality will not work correctly if multiple secrets have the same name.

Enabling the Auto Comment

  1. In Delinea Platform, go to Secret > Security > Other Security > Require comment and select Yes.

  2. In the Mid Server config.xml file, set the following parameter as a string as follows: <parameter name="auto_comment " value="Enter your comment"/>.

If the auto_comment parameter is empty, it will not provide any comment while viewing the secret.

Enabling Delinea Credentials Cache

Delinea Credential Cache should only be configured when using Just-in-Time (JIT) Mode. When using Grant File Mode, Credential Cache is not needed as Grant File Mode already provides efficient authentication token management and eliminates the need for additional caching infrastructure. Using Grant File Mode is the recommended approach to avoid API rate limiting without requiring Credential Cache servers.

To enable Delinea Credential Cache for JIT Mode, check the checkbox and set the cache url: "https://10.XX.XX.XX:80XX". For more details, see Delinea Credentials Cache.

The Delinea Credential Cache does not support validating credentials using a secret name. Users can only validate the credentials using the secret ID. Also, it does not support SSH private key credentials.