Client-side Secrets Management lets an instance store a credential that the instance cannot read back in plain text. The password is encrypted before storage, and the key that opens it stays on your MID Server. This guide explains how that arrangement works, which roles apply, and the setup order for the Brazil release.
How the key pair protects a credential
A symmetric key turns the readable password into ciphertext, and the same key reverses the change. That symmetric key is then wrapped by a public key stored on your instance, so the instance holds a password it has no means to open. The matching private key is the one piece able to reverse the wrap, and it lives in a keystore on the MID Server. For the wider role of the MID Server, see MID Server explained.
| Component | Where it lives | What it does |
|---|---|---|
| Symmetric key | Cryptographic module on the instance | Encrypts the clear text credential |
| Public key | Identity group on the instance | Wraps the symmetric key |
| Private key | Keystore on the MID Server | Unwraps the symmetric key so the MID Server can decrypt the credential |
| Self-signed certificate | Trusted Key Store on the instance | Lets the instance accept the public certificate |
For client-side groups, ServiceNow does not save the encryption key, so protection does not rest on ServiceNow’s own controls alone. In practice, if the private key on the MID Server is lost, the MID Server cannot decrypt the wrapped credential. ServiceNow does not save the encryption key for client-side groups, so there is no copy on the instance to fall back on.
Core and Enterprise editions
Secrets Management Core is available by default and needs no installation.
Enterprise is a paid plugin that ServiceNow personnel activate on a production instance, and it requires a ServiceNow Vault v1 license. It adds criteria based on scope, package, table, column and record, and the Secrets Management dashboard. Client-accessible secrets are an Enterprise feature, so confirm your edition before you start the setup. Secrets Management Enterprise has begun its End of Life process and has reached the End of Sale and End of Renewal milestones as of the Yokohama release. Password2 encryption with the Key Management Framework is the option for storing passwords with two-way encryption.
Basic groups versus groups with criteria
A basic secret group takes any secret you add by hand. A secret group with criteria collects secrets automatically when they share a scope, package, target table, secret column or filter record value. Either type can be instance accessible, so the instance decrypts its secrets, or client accessible, so decryption needs the private key on the MID Server.
New groups are inactive until you switch them on. Once a criteria group is saved, new matching records are encrypted into it, while existing records need a security job.
Setup sequence for the Brazil release
The release walks through seven steps, and the order matters.
Generate the key pair and certificate on your own machine
In a terminal, run the OpenSSL request that creates a 4096-bit RSA key and a self-signed certificate valid for 365 days. You are then prompted for country, locality, organisation, common name and email. Agree these values with your security team. On Linux, concatenate the private key and certificate into one bundle file.
Register the certificate in the Trusted Key Store
A self-signed certificate has no trusted root behind it, so the instance will not use it until it sits in the Trusted Key Store. Enter sys_certificate.LIST in the navigation filter, create a record with format PEM and type Trusted Store Cert, and paste the full certificate text, including the begin and end lines.
Create the criteria group and its identity group
Open Secret Groups with Criteria under Secrets Management and select New. Set the secret type to client accessible, keep Autogen module ticked, and choose target table as the criterion with SSH Credentials as the table. Save it and leave it inactive.
Select Manage client side access, create an identity group alias, and select Upload identity key. The identity key alias must match exactly the name you enter on the MID Server next, so copy it rather than retyping it. Import the public certificate, associate the secret group from the identity groups list, add your MID Server as an identity group member, then return to the secret group, tick Active and update it.
Load the key pair onto the MID Server
Build one line in a text file: the path to the manage-certificates batch file in your MID Server folder, the alias flag with your identity key alias, then the full path to the bundle. Paste it into PowerShell opened with Run as Administrator. A successful run reports that the certificate was installed under your alias. Then restart the MID Server and wait until it shows Up with validated set to Yes. For MID Server status checks, see the MID Server troubleshooting guide.
Create the SSH credential and check that it is wrapped
The creating user and the user logged in to the MID Server both need the admin, KMF admin, Secrets Management and cryptographic manager roles. Enter ssh_credentials.list, select New, set Applies to to Specific MID Servers, enter the user name and password, and attach a Credential-type alias through the lock icon.
Next, check the encryption. Use Show XML and copy the 32-character identifier inside the password tag. It names the symmetric key protecting the credential. Filter sys_kmf_module_key.list on it, and expect one record. Then filter sys_kmf_wrapped_module_key.list by your crypto module. The wrapped key material should show the symmetric key encrypted by your uploaded public key.
Build the Flow Designer action
Create a new action in Flow Designer. Add a Look Up Record step on the MID Server table, then an SSH step. If the SSH option is missing from the step list, check which plugins are active on your instance. In the SSH step, choose Define Connection Inline, select your credential alias, enter the host IP and port 22, and set MID selection to Specific MID Server, dragging the MID Server Record pill into that field. The example command is /bin/date redirected into sm_ig_text_file.txt. The Windows version of this test uses a PowerShell Get-Date command written to the same file name. It writes the current date and time to a text file on the host. For the general SSH step setup, see Integration Hub SSH steps.
Run the test and read the step output
Select Test in Workflow Studio, then Run Test. When the status reads Test Run Completed, open the Steps arrow and scroll to Step Output Data. Look for a status code of zero with the message Success, then check the host for the text file. If the status is not Success, read the step output first.
Testing a Windows credential end to end
A Windows Management Instrumentation credential proves the same chain works against a Windows host. It needs Integration Hub Enterprise active and the group and credential built above. Then run a PowerShell step through the MID Server that writes a file on the target host, and review the logs.
Running security jobs on existing secrets
Records that existed before a group was created are not encrypted by it automatically. A Secrets Management security job brings them in. It needs the KMF admin, security admin and Secrets Management admin roles, so elevate first. The job takes a start and end time window, entered in 24-hour format, and an enforcement level. All Tables covers the whole instance and can affect performance, so schedule it off-peak. Password2 to Secrets Management encrypts Password2 fields into each group’s cryptographic module. Data the instance cannot decrypt is not added to a group, which matters for client-side secrets. Force rekeying creates a new key, decrypts with the old one and re-encrypts with the new. For the key modules and their lifecycle, see Key Management Framework.
Cloning an instance
| Secret group origin | Behaviour after a clone |
|---|---|
| Original instance or client groups on the target | Work once the missing cryptographic module is imported manually |
| Cloned instance groups from the source | Do not work until set up manually |
| Cloned client groups from the source | Work once the group, identity group, alias and MID Server are configured manually |
Monitoring with the Secrets Management dashboard
Its overview tab charts groups by secret type and criterion type. Its warnings tab is the part to check regularly, since it flags groups missing an active access policy and identity groups with no members.
Roles for Secrets Management
| Role | Suits | Key points |
|---|---|---|
| Secrets administrator (sn_secrets.admin) | People who assign secrets roles | Same privileges as manager and viewer. Assigning it requires both admin and security admin |
| Secrets Management (sn_secrets.secret_manager) | People who build and maintain groups | Manages groups, filters, providers and secret placement. Cannot see secrets in plain text |
| Secrets viewer (sn_secrets.viewer) | People who inspect records | Views secret and secret group records |
How this differs from the vault console and external credential storage
Two related guides cover other credential routes. The vault console dashboard and setup guide covers the console that tracks vault-backed secrets. The external credential storage guide explains how vault-backed lookups fetch a credential from outside the instance.
This page describes a different mechanism. The credential sits on the instance as ciphertext, and the key that decrypts it sits on your MID Server. Use this guide if you want the instance to hold the encrypted value with the key under your control.
Frequently asked questions
Can ServiceNow decrypt a client-side secret on its own?
No. The instance holds the public key that wraps the symmetric key but not the private key. ServiceNow does not save the encryption key for client-side groups, so decryption happens on the MID Server.
Do I need a certificate from a certificate authority?
The setup steps in this guide use a self-signed certificate. Before the instance will use it, the certificate must be added to the Trusted Key Store.
Why does my secret group stay inactive after I save it?
New secret groups are inactive by default. Finish the identity group, add your MID Server as a member, then tick Active and update the group.
Why restart the MID Server after loading the key pair?
The restart synchronises the key pair into the MID keystore. Wait until the server shows Up with validated set to Yes before running any test.