Running Delinea MidServer Setup Utility for Secret Server
After establishing the basic requirements for creating a service account and a discovery secret, you need to run the Delinea MidServer Setup Utility. This utility is designed to generate all necessary parameters while providing a secure and reliable method for storing user credentials, avoiding the use of plain text in the MidServer configuration file. It facilitates the configuration of the connection between your MID Server and Secret Server.
To run the Delinea MidServer Setup Utility:
-
Open a command prompt or terminal and navigate to the location of the
DelineaMidServerSetupUtility jar
JAR file. -
Run the command
Java -jar DelineaMidServerSetupUtility.jar
.You can use bundled Java to run the DelineaMIDServerSetupUtility.jar without any extra setup if using built-in Java.
Open Command Prompt, go to the following folder:
C:\servicenow\agent\jre\bin
Then run this command:
java -jar C:\servicenow\agent\extlib\DelineaMidServerSetupUtility.jar
This uses the same Java that the MID Server runs on, so it is compatible and no separate Java installation is needed for Delinea integration.
-
For additional information, enter the command
--help
for each question.
It is important to run this utility on each MID Server and ensure the Java version is at least 11. If not done correctly, the encryption and decryption process may not work as intended.
To set the complete configuration, enter the following information:
-
Do you want to setup the complete configuration ?(y/n)
-
Yes – Complete configuration setup (All parameters)
-
No – Only encrypts the credentials
-
-
Enter vault type (SS (Secret Server) or PAS (Privileged Access Service)): SS
-
Enter Secret Server or Platform URL: Provide SS URL
-
Using oauth2 grant file for token ?(y/n)
-
Yes – Provide the oauth2 grant file path in next question
-
No – Provide SS credentials in next questions
-
-
Enter the Secret Server or Platform username: Provide the SS username.
-
Enter the Secret Server or Platform password: Provide the SS password.
-
Do you want to use proxy ?(y/n)
-
Yes – Provide proxy details in the next questions.
-
No – Parameters generated without Proxy.
-
Find and copy the generated parameters from a configuration.txt file within the same folder and paste it into the config.xml file of the ServiceNow MID Server (Go to Mid Server path> agent folder and look for the file named config.xml).
DelineaMidServerSetupUtility validates Secret Server credentials at runtime. If the credentials are not validated, the process will stop.
Updating MidServer config.xml
The config.xml file contains the necessary configuration settings to establish the communication between the MID Server and Secret Server. Update the config.xml with the correct server URLs, authentication details, and any relevant settings for your credential storage.
(Optional) Running Delinea MidServer SetupUtility with Command Line Arguments
This is not needed when running the setup utility manually.
It is also possible to run the MidServer SetupUtility using command line arguments for automation.
To run the Delinea MidServer Setup Utility using command line arguments:
-
Open the command prompt.
-
Run the
java -jar DelineaMidServerSetupUtility.jar vault_type ss_or_platform_url username password proxy_host proxy_port proxy_username proxy_password
command. -
Specify the following parameters:
Argument Description vault_type
Use SS
orPAS
.ss_or_platform_url
Secret Server or Platform URL. username
Secret Server username. password
Secret Server password (no spaces allowed). proxy_host
(Optional) Proxy server IP. proxy_port
(Optional) Proxy port. proxy_username
(Optional) Proxy auth username. proxy_password
(Optional) Proxy auth password.
The command will only generate the ss_auth_str
and proxy_auth_str
parameters. You need to copy the remaining parameters manually into the config.xml file.
The Delinea MidServer Setup Utility.jar can only be run from the command line if the usernames and passwords contain no spaces. The password will be visible after you enter it in the command line.
Editing the Configuration File
The config.xml file will be modified to add additional elements for the credential resolver’s parameters. These are added at the end of the file just before the closing tag . To update the config file, follow the steps below:
-
Open the config.xml file located in the MID Server installation directory (<Mid Server path>\agent\config.xml) using a text editor.
-
Copy the relevant parameters generated by the setup utility from the configuration.txt file.
-
Paste these parameters just before the closing </parameters> tag at the end of the config.xml file.
-
Adjust any placeholder values as needed (for example, URLs or usernames).
-
Save the config.xml file and close your editor.
-
In the ServiceNow portal, navigate to MID Server > Servers, locate the MID Server you updated, and restart it to apply the new configuration.
Authentication Modes for Connecting Secret Server to ServiceNow
When integrating Secret Server with ServiceNow, there are two supported authentication methods:
-
Username and Password (Just-in-Time Mode)
-
OAuth2 Token File (Grant File Mode)
The table below outlines the parameters used in each mode:
Parameter Name | Usage in Authentication Modes |
---|---|
ss_or_platform_url
|
For both Just-in-Time and Grant File modes use the URL of your Secret Server or Delinea Platform instance. |
ss_or_platform_auth_str
|
|
oauth2_grant_file
|
|
allow_self_signed_certificate
|
For both Just-in-Time and Grant File modes, set to true to accept self-signed SSL certificates if applicable; otherwise, set to false. |
vault_type
|
For both Just-in-Time and Grant File modes, set to ss to indicate Secret Server and pas to indicate PAS. |
is_logging
|
For both Just-in-Time and Grant File modes, set to true or false to enable or disable verbose logging If not specified, defaults to true. |
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 printedLog Level 4 (Logs all): all above three logs type will get printed |
proxy_host
|
For both Just-in-Time and Grant File modes, specify proxy host if required. Leave blank if no proxy is needed. |
proxy_port
|
For both Just-in-Time and Grant File modes, specify proxy port if required. Leave blank if no proxy is needed. |
proxy_auth_str
|
For both Just-in-Time and Grant File modes, provide encrypted proxy credentials generated by the setup utility if a proxy requires authentication, otherwise leave blank |
search_secret_by_name
|
For both Just-in-Time and Grant File modes set to true to validate credentials using secret name instead of secret ID, otherwise, set to false. |
auto_comment
|
For both Just-in-Time and Grant File modes provide a string to include an auto comment when accessing secrets if Require comment is enabled in Secret Server, leave empty if not used. |
cache_url
|
For both Just-in-Time and Grant File modes provide the Delinea Credentials Cache URL in format https://host:port if credential caching is enabled. Leave blank if not used. |
Example: Just-in-Time (JIT) Authentication Configuration
Copy/paste this information into the config.xml file:
\<parameter name="ss_or_platform_url" value="\<replace\>"/>
\<parameter name=" ss_or_platform_auth_str" value="\<replace\>"/>
\<parameter name="allow_self_signed_certificates" value="false"/>
\<parameter name="vault_type" value="ss"/>
\<parameter name="is_logging" value="true/false"/>
\<parameter name="log_level" value="1/2/3/4"/>
<parameter name="proxy_port" value=""/>
<parameter name="proxy_host" value=""/>
<parameter name=" proxy_auth_str" value=""/>
<parameter name="search_secret_by_name" value="true/false"/>
<parameter name="auto_comment" value=""/>
<parameter name="cache_url" value=""/>
If you do not include the is_logging and log_level parameters in the configuration file, the plugin uses these defaults: is_logging: true, log_level: 3 (Error level).
Example: Grant File (OAuth2) Authentication Configuration
Copy/paste this information into the config.xml file:
\<parameter name="ss_or_platform_url" value="\<replace\>"/>
\<parameter name="oauth2_grant_file" value="oauth2_grant.json"/>
\<parameter name="allow_self_signed_certificates" value="false"/>
\<parameter name="vault_type" value="ss"/>
\<parameter name="is_logging" value="\<replace\>"/>
\<parameter name="log_level" value="1/2/3/4"/>
<parameter name="proxy_port" value=""/>
<parameter name="proxy_host" value=""/>
<parameter name=" proxy_auth_str" value=""/>
<parameter name="search_secret_by_name" value="true/false"/>
<parameter name="auto_comment" value=""/>
<parameter name="cache_url" value=""/>
If you do not include the is_logging and log_level parameters in the configuration file, the plugin uses these defaults: is_logging: true, log_level: 3 (Error level).
If you leave any of the proxy-related parameters blank, the plugin does not use a proxy server.
Enabling the Search Secret by Name
-
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"/\>
-
Pass the secret name from the ServiceNow MID Server in the Credential ID field.
-
Provide a complete name of the secret because a partial name will not work.
Searching for the secret by name is not recommended because Secret Server can have the same name for two different secrets. This functionality will not work correctly if multiple secrets have the same name.
Enabling Auto Comment on Secrets
-
In Secret Server, select your secret.
-
Go to the Security tab.
-
In the Other security section, select the edit pencil icon and select the Require comment checkbox. Select Save.
-
The Require comment field is now set to Yes.
-
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
To enable Delinea Credentials Cache, open the Mid Server config.xml file and set the cache URL (URL format should be url:port) parameter as follows: <parameter name="cache_url" value="https://10.XX.XX.XXX:80XX"/>. For more details, see Delinea Credentials Cache.
The Delinea Cred 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.