- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2019 08:00 AM
I have a service that returns a JSON blob over HTTPS. It works perfectly well if I hit it with my browser; it works perfectly well if I hit it from Postman. The server's using a "real" cert from Comodo that's officially trusted to secure the conversation, so there are no warnings or anything.
But...when I try to hit it from a ServiceNow REST message, using the test feature, I get this error message:
org.apache.commons.httpclient.HttpException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
Is there something I need to do to tell ServiceNow "It's okay, this service is legit and you can trust it?" I've scoured the documentation and forums and found some related information, but none of it seems to apply to this particular problem. There are discussions about OAuth and MID servers and etc. I don't think any of that should be necessary, but I'm fairly new to ServiceNow.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2019 03:45 PM
Bah. I figured it out. The problem had nothing to do with ServiceNow - the problem was my poorly-configured Node.js service. I had this:
var servers = https.createServer({
key: fs.readFileSync('/path/to/Certs/domain_net.key.txt'),
cert: fs.readFileSync('/path/to/Certs/domain_net.crt'),
}, app)
.listen(3001, function () {
// todo: something useful
})
where I needed this:
var servers = https.createServer({
key: fs.readFileSync('/path/to/Certs/domain_net.key.txt'),
cert: fs.readFileSync('/path/to/Certs/domain_net.crt'),
ca: fs.readFileSync('/path/to/Certs/domain_net.ca-bundle')
}, app)
.listen(3001, function () {
// todo: something useful
})
Note the addition of the "ca" line.
Sorry for the forum noise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2019 03:45 PM
Bah. I figured it out. The problem had nothing to do with ServiceNow - the problem was my poorly-configured Node.js service. I had this:
var servers = https.createServer({
key: fs.readFileSync('/path/to/Certs/domain_net.key.txt'),
cert: fs.readFileSync('/path/to/Certs/domain_net.crt'),
}, app)
.listen(3001, function () {
// todo: something useful
})
where I needed this:
var servers = https.createServer({
key: fs.readFileSync('/path/to/Certs/domain_net.key.txt'),
cert: fs.readFileSync('/path/to/Certs/domain_net.crt'),
ca: fs.readFileSync('/path/to/Certs/domain_net.ca-bundle')
}, app)
.listen(3001, function () {
// todo: something useful
})
Note the addition of the "ca" line.
Sorry for the forum noise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 07:38 AM
Can you let us know which Node.js file is updated? We are currently in Tokyo, and we still have the same issue