OBLYTECH Logo
OBLYTECH Logo

Certificate Discovery in ServiceNow: Choosing the Right Method

Certificate discovery in ServiceNow collects TLS certificates from URLs, certificate files, endpoint ports, cloud certificate managers, Java KeyStores, Windows stores, Microsoft certificate authorities, F5 load balancers and root certificates kept off-server. Each source has its own schedule type and prerequisites, so the first step is matching where a certificate lives to the right method.

Matching each certificate source to a discovery method

Where the certificate lives Discovery method Check before the first run
Named web addresses URL scans Discovery Admin Workspace v1.20.0
Certificate files on a host File import with the Import SSL Certificate pattern TLS_keepOriginalCertificate set to False
Ports on an endpoint Agent Client Collector for Visibility Content Latest ACC-VC and the agent_client_collector_admin role
AWS, GCP and Azure certificate managers Cloud Discovery patterns Certificate Inventory and Management 3.4.0 or later
Java KeyStore and Windows certificate store Collect Certificates extension jks credentials of type java_keystore
Microsoft certificate authority Microsoft CA – Certificate Management pattern CA process running on the host
F5 BIG-IP load balancers F5-SSH-SSL Certification extension Discovery SSH account with Terminal Access set to TMSH
Root certificates stored off-server Import SSL Certificate pattern on a schedule A Discovery schedule with the pattern attached

Scanning named web addresses with URL scans

URL scans suit the case where you already know which endpoints matter. Discovery visits each URL you list and collects the certificate that address serves, which is the alternative to finding certificates through ports during IP-based discovery.

Setting up a URL scan on the newest releases

On the Brazil release, go to Workspaces, then Discovery Admin Workspace, then Schedules, and select New Discovery. Choose Certificate discovery, then Discover via URL scans. The user needs the discovery_admin role, the workspace at version 1.20.0, and Certificate Inventory and Management at version 4.2.4. The platform runs the Brazil, Australia or Zurich release at Patch 8 or later. The Discovery Admin Workspace configuration guide covers the workspace in more depth.

Choose a MID Server cluster, a single validated MID Server that is up, or automatic selection at run time. Tick the URLs in the Available URLs list, add a missing one with Add URL, and check the Selected URLs list before moving on. Finish and run creates the schedule and runs it at once. Finish creates the schedule without running it, and Discover Now starts it later.

Working with the older URL source list

Add the URLs under All > Certificate Management > Certificate Discovery Source URLS, one scheme://host:port entry per address (port optional). The port can be left out. Then create a Discovery schedule with Discovery set to Certificates and the type set to URL Certificate Discovery. Each run links each URL to its schedule in a mapping table.

Checking what a scan will see

A URL scan collects the certificate the server presents during the scan. A certificate that a server does not present at that moment cannot be found by that scan. Before scheduling a large list, test a sample address with openssl s_client and the showcerts option.

Importing certificate files from a host

File import handles certificates stored as files rather than served live. Accepted extensions are cert, pem, txt, der and cer. Set TLS_keepOriginalCertificate to False first, because larger payloads can cause out-of-memory problems. The four parameters depend on where the files sit:

Parameter What to enter
Server Host name or IP address. Enter localhost when the files are on the MID Server.
server_certificates_folder Folder path holding the certificate files
Temporary MID Server folder field Temporary MID Server folder for copied files. Leave it empty when importing from the MID Server.
TLS_keepOriginalCertificate False

Create the schedule with Discovery: Import Certificates and Specific MID Server as the selection method, add credentials for the host holding the files, then attach the Import SSL Certificate pattern. The role needed is discovery_admin or admin.

Reading certificates from endpoint ports with Agent Client Collector

Agent Client Collector for Visibility Content, or ACC-VC, collects TLS and SSL certificates from the ports running on the agent’s own server. Enable the TLS SSL Certificate Capture policy under Agent Client Collector, then Policies. Set the port list in sn_acc_vis_content.tls_ssl_scanner_ports as a comma-separated list. To keep the original certificate, set sn_acc_vis_content.tls_ssl_keep_original to true. The guide to installing Agent Client Collector on servers and endpoints covers the agent itself.

The Brazil release also offers sn_acc_vis_content.tls_ssl_scan_all_open_ports, which scans all available open ports when set to true. That property does not appear in the older Xanadu wording, so do not assume it on older releases. Results go to Discovered Certificates, Unique Certificates and Installed Certificates, with a relationship to the agent’s server.

Cloud certificate managers: AWS, GCP and Azure

All three cloud patterns need Certificate Inventory and Management at 3.4.0 or later, Discovery and Service Mapping Patterns at 1.12.0 or later, and a MID Server with the ALL capability or the matching cloud capability. Create the schedule in the Cloud Discovery Workspace and download the Cloud Discovery patterns spreadsheet, which lists the required permissions. New patterns arrive quarterly, so re-download it periodically.

The AWS pattern reads AWS Certificate Manager. Test the IAM role’s permissions with AWS CLI list, describe and get calls before the first run. The GCP patterns cover Certificate Manager and classic certificates, and their field list omits fingerprints, so match certificates across clouds on serial number and subject details. The Azure pattern reads Key Vault certificates.

The issuer lookup property sn_itom_pattern.issuer_certificate_search_by_idn needs a different value for Azure:

Cloud Value Reason
AWS false Issuers and root issuers are found by certificate fingerprint
GCP false Issuers and root issuers are found by certificate fingerprint
Azure Key Vault true Fingerprints cannot be calculated for each certificate in the chain, because Key Vault PFX records do not contain chains

Check this property before the first Azure schedule. Renewal tracking creates priority 3 tasks for expiring certificates when glide.discovery.certs.enable_renewal_task_creation_for_discovered_certificates is true, so review it before enabling.

Java KeyStore and Windows certificate store discovery

The Collect Certificates extension in the Linux Server and Windows OS – Servers patterns finds certificates in a Java KeyStore or Windows certificate store. The extension is disabled by default, so confirm its Active field is true. Java KeyStore access needs a credential of type java_keystore, set on the jks credentials record in the Discovery Credentials module. Results show the certificate in Unique Certificates, with validity dates displayed in your time zone there, and host-level detail in the Installed Certificate table.

Microsoft certificate authority certificates

The Microsoft CA – Certificate Management pattern reads certificates issued by a Microsoft certificate authority. The CA process must be running on the host, and a Windows host must have been discovered earlier. Run the discovery on a serverless schedule that targets the CA host. From version 1.27.0 of Discovery and Service Mapping Patterns, the subject alternative name is collected for both the all-request-IDs and template-ID methods. The pattern creates no CI relationships.

F5 load balancer certificates

The F5-SSH-SSL Certification extension finds certificates used by running F5 BIG-IP nodes, inside the F5 load balancer and F5 load balancer SSH patterns. For F5 load balancers on IPv6, only SSH is supported. F5 SNMP is not supported, and the MID Server cannot run REST APIs over IPv6. The Discovery SSH account on the appliance needs Terminal Access set to TMSH.

Root certificates hosted outside your server

Create a Discovery schedule, save it, then add a serverless execution pattern that uses Import SSL Certificate and follow the file import parameters above. Run the schedule with Discover Now, then open Unique Certificates to confirm the root was collected. The role needed is Admin, discovery_admin or Certificate administrator. The next step is to link an intermediate certificate to that root to complete the chain.

Frequently asked questions

Which method should I use for a certificate on a web server?

Use URL scans when you know the addresses and want the certificate each one serves. Use ACC-VC when the agent on that server should report what its own ports present.

Why might a URL scan miss a certificate that exists on the server?

The scan collects what the server presents at the moment of the scan. A certificate that is installed but not presented during that connection will not appear in the run.

Does the Azure Key Vault pattern need a different issuer setting from AWS?

Yes. Key Vault PFX records do not carry chains, so Azure searches issuers by distinguished name. AWS and GCP use fingerprints and need that property set to false.

How do I record a root certificate kept off the server?

Create a Discovery schedule with the Import SSL Certificate pattern, run it with Discover Now, and confirm the root in Unique Certificates. Then link an intermediate certificate to the root to complete the chain.