- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
4 hours ago - edited 4 hours ago
Understanding Serverless Discovery: Why SSL Certificates Are Required for MID Server
đ Purpose
While implementing Kubernetes and Nutanix discovery in ServiceNow, I learned about a different approach to discovery called "Serverless Discovery". This article explains what serverless discovery is, why it requires SSL/TLS certificates on the MID Server, and how it differs from traditional discovery methods.
đ¯ What is Serverless Discovery?
During my implementation of Kubernetes and Nutanix discovery, I encountered the term "Serverless Discovery" in the discovery schedule type dropdown. This was different from the traditional "Configuration Items" discovery I was familiar with.
My Initial Confusion
When I first saw "Serverless" as a discovery type, I was confused:
- đ¤ Does this mean no servers are involved?
- đ¤ Why is it called "serverless" when we're discovering servers?
- đ¤ How is this different from normal discovery?
What I Learned
Serverless Discovery is a ServiceNow discovery method that uses REST API calls over HTTPS instead of traditional network scanning protocols like SSH, WMI, or SNMP.
The term "serverless" refers to the discovery method, not the infrastructure being discovered. It means:
- â No traditional SSH/WMI/SNMP probe infrastructure needed
- â No direct server-level access required and uses a Discovery Pattern
- â API-driven communication over HTTPS
- â Ideal for cloud-native platforms and containerized environments
đ Traditional vs Serverless Discovery: What I Observed
Here's the key difference I noticed during my implementations:
Traditional Discovery (What I Was Used To)
Example: Windows Server Discovery
Characteristics:
- Multiple ports and protocols required
- Direct OS-level access (SSH for Linux, WMI for Windows)
- Uses credentials like SSH keys or Windows domain accounts
- Discovery schedule type: "Configuration Items"
Serverless Discovery (What I Implemented for Kubernetes & Nutanix)
Example: Kubernetes Discovery
Example: Nutanix Discovery
Characteristics:
- Single HTTPS endpoint (one port: 443, 6443, or 9440)
- No direct OS access needed
- API-based authentication (tokens or basic auth)
- Discovery schedule type: "Serverless" or "Cloud Application"
Comparison Table
Aspect | Traditional Discovery | Serverless Discovery |
---|---|---|
Method | Network scanning (SSH, WMI, SNMP) | REST API calls (HTTPS) |
Protocols | SSH (22), WMI (135/445), SNMP (161) | HTTPS only (443/6443/9440) |
Authentication | SSH keys, Windows credentials | API tokens, Basic auth |
Network Access | Multiple ports per device | Single HTTPS endpoint |
Schedule Type | "Configuration Items" | "Serverless" |
Use Cases | Traditional servers, databases, network devices | Cloud platforms, Kubernetes, containers, hypervisors |
Example Platforms | Linux/Windows servers, Oracle DB, Cisco switches | Kubernetes, AWS, Azure, VMware, Nutanix |
đ Why SSL/TLS Certificates Are Required for MID Server
This was the most confusing part of my implementation. Here's what I learned:
The Problem I Encountered
When I first ran my Kubernetes discovery schedule, it failed with this error:
â Error:
Translation: The MID Server doesn't trust the SSL certificate from the Kubernetes API server.
Understanding the HTTPS Connection
Serverless discovery patterns connect to API endpoints using HTTPS (secure HTTP). When the MID Server attempts to connect, an SSL/TLS handshake must occur:
At Step 3, the MID Server checks: "Do I trust this certificate?"
If the certificate isn't in the MID Server's trust store, the connection fails.
Why This Security Check Exists
The SSL/TLS handshake ensures:
- Server Identity Verification - Confirms we're connecting to the real Kubernetes/Nutanix API, not an imposter
- Encrypted Communication - Protects credentials and data in transit
- Certificate Chain Validation - Verifies the certificate is issued by a trusted authority
đ§ Why Java Keystore? (The Part That Confused Me Most)
My Initial Mistake
When I first encountered the certificate error, I thought:
- "I'll just install the certificate in Windows Certificate Store"
- "Maybe I need to add it to the Linux system trust store"
Both were wrong! â
What I Learned
The MID Server runs on Java, and Java maintains its own certificate trust store completely separate from the operating system.
This means:
- â Installing in Windows Certificate Store â MID Server can't see it
- â Installing in Linux
/etc/ssl/certs/
â MID Server can't see it - â
Installing in Java keystore (
cacerts
) â MID Server can see it! â
Java Truststore Location
This cacerts
file is Java's trusted certificate store - like a phonebook of "certificates I trust."
đ The Certificate Import Process (High-Level)
Here's the general workflow I followed for both Kubernetes and Nutanix:
1Export the SSL Certificate
From the target platform (Kubernetes API server, Nutanix Prism):
- Using a web browser (view certificate â export)
- Using OpenSSL command
- Using platform-specific tools
Result: A .cer
or .crt
file containing the public certificate
2Transfer to MID Server
Copy the certificate file to your MID Server host (Windows or Linux)
3Import into Java Keystore
Use the keytool
command (comes with Java):
Windows:
Linux:
Key Parameters:
-alias
â A friendly name for the certificate-keystore
â Path to Java's cacerts file-file
â Path to the certificate file-storepass
â Password for keystore (default ischangeit
)
4Verify Import
5Restart MID Server
The MID Server reads the truststore at startup. Without a restart, it won't see the new certificate.
đ Real-World Examples: What I Implemented
I successfully implemented serverless discovery for two platforms:
Example 1: Kubernetes Discovery
What I Discovered:
- Kubernetes Clusters
- Nodes (worker and master)
- Namespaces
- Pods, Services, Deployments
- ReplicaSets
Authentication Method: Bearer Token (Kubernetes Service Account)
Certificate Source: Kubernetes API Server (https://<k8s-api>:6443
)
đ Full Implementation Guide:
Kubernetes Discovery with ServiceNow - Complete Se... - ServiceNow Community
Example 2: Nutanix Discovery
What I Discovered:
- Nutanix Clusters
- AHV Hypervisor Hosts
- Virtual Machines
- Storage Containers
- Networks
Authentication Method: Basic Authentication (username/password)
Certificate Source: Nutanix Prism Central/Element (https://<prism-ip>:9440
)
đ Full Implementation Guide:
Knowledge Article: Supplemental Guide to Nutanix A... - ServiceNow Community
â ī¸ Common Certificate Errors I Encountered
1. SSLHandshakeException: PKIX Path Building Failed
Error Message:
What It Means: Certificate not in Java truststore
Solution: Import certificate using keytool and restart MID Server
2. Certificate Name Mismatch
Error Message:
What It Means: Certificate was issued for a hostname/FQDN, but you're connecting using an IP address
Solutions:
- Use the FQDN in your discovery target instead of IP
- Regenerate the certificate with the IP in Subject Alternative Name (SAN)
3. MID Server Not Restarted
Symptom: Certificate imported successfully, but discovery still fails with SSL error
What It Means: MID Server hasn't reloaded the truststore
Solution: Always restart MID Server service after certificate changes
4. Wrong Java Truststore Modified
Symptom: Certificate shows in keystore listing, but discovery still fails
What It Means: Multiple Java installations on server; modified the wrong one
Solution:
- Check which Java the MID Server uses (check wrapper.conf)
- Import certificate to the correct Java installatio
đ ī¸ Best Practices I Learned
1. Certificate Management
Track Expiration Dates:
- Most SSL certificates expire after 1-2 years
- When certificates renew on the target platform, re-import to MID Server
- Set calendar reminders 30 days before expiration
Check Certificate Expiration:
2. Multiple MID Server Environments
If you have DEV, TEST, PROD MID Servers:
- â Import certificates to each MID Server separately
- â Document which certificates are on which servers
- â Keep certificate files in a secure, accessible location
3. Use Descriptive Certificate Aliases
Good naming:
Avoid generic names:
4. Always Test Before Production
My workflow:
- â Export certificate from target platform
- â Import to DEV MID Server first
- â Test discovery in DEV environment
- â Document the process
- â Repeat for TEST and PROD MID Servers
5. Security Reminder
NEVER disable SSL verification in production!
While testing, you might see suggestions like:
- Using
-k
flag in curl - "Skip certificate validation" options
â Do not do this in production!
Disabling SSL verification:
- Exposes credentials to man-in-the-middle attacks
- Cannot verify server identity
- Violates security compliance
Always use proper certificate trust!
đ When to Use Serverless Discovery
Based on my experience, serverless discovery is ideal for:
â Good Fit for Serverless Discovery:
- Cloud platforms (AWS, Azure, GCP)
- Container orchestration (Kubernetes, OpenShift)
- Hypervisors with REST APIs (Nutanix, VMware vCenter)
- SaaS applications with APIs
- Load balancers (F5, Citrix NetScaler)
- Public cloud services
â Not Ideal for Serverless Discovery:
- Traditional Windows/Linux servers (use traditional WMI/SSH)
- Network switches without REST APIs (use SNMP)
- Legacy systems without API support
- Databases on standalone servers (use native protocols)
Rule of Thumb: If the platform has a REST API endpoint, consider serverless discovery!
đ Key Takeaways: What I Want You to Remember
After implementing both Kubernetes and Nutanix discovery, here's what's most important:
1. Serverless â No Servers
"Serverless" refers to the discovery method (API-based), not the infrastructure. Servers still exist; we're just discovering them differently.
2. HTTPS Means SSL Certificates
Serverless discovery uses HTTPS for security. This means:
- SSL/TLS certificates are mandatory
- Certificates must be in the MID Server's Java truststore
- Certificate issues are the #1 cause of discovery failures
3. Java Truststore â OS Certificate Store
The MID Server uses Java's own certificate store, completely separate from Windows or Linux system trust stores.
Always import to Java keystore!
4. Always Restart MID Server
After importing certificates, always restart the MID Server service. Java reads the truststore at startup.
5. Test, Document, Repeat
For each platform:
- Test certificate export/import process
- Document the steps
- Test discovery in non-production
- Apply to production with confidence
đ Additional Resources
Java Keytool:
đĄ Final Thoughts
When I started implementing Kubernetes and Nutanix discovery, I was confused by the term "serverless" and frustrated by SSL certificate errors. Through trial and error (mostly error! đ ), I learned:
- Serverless discovery is just a different approach - using APIs instead of traditional protocols
- SSL certificates aren't optional - they're fundamental to HTTPS security
- Java truststore management is key - you must understand where certificates go
- Documentation helps everyone - that's why I'm sharing this!
If you found this helpful, please mark it as 'Helpful' below. This helps other community members find solutions faster!
For detailed implementation steps for specific platforms, please refer to my Kubernetes and Nutanix guides linked above.
âšī¸ Article Information
Concept Explanation Lessons Learned
Last Updated: October 2025
Platforms Referenced: Kubernetes, Nutanix
Author: Community Contributor
â ī¸ Disclaimer: This article reflects my personal implementation experience and lessons learned. For detailed implementation steps, refer to the platform-specific guides linked above. Always consult official ServiceNow documentation and test in non-production environments.
Questions or feedback? Please comment below or reach out via the ServiceNow Community!
Thank you for reading! đ
Keywords: ServiceNow Discovery, Serverless Discovery, SSL Certificates, TLS, MID Server, Java Keystore, Certificate Trust, API-Based Discovery, ITOM, Discovery Troubleshooting, Kubernetes, Nutanix