Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Using two-way ssl edge being client - Seems to not be sending correct key

Playing around with two way ssl in a lab private cloud installation. I created a simple node server application that requires two-way ssl.

options = { key: fs.readFileSync(path.join(__dirname, 'example2', 'server-key.pem'))

, ca: fs.readFileSync(path.join(__dirname, 'example2', 'ca-crt.pem'))

, cert: fs.readFileSync(path.join(__dirname, 'example2', 'server-crt.pem'))

, requestCert: true , rejectUnauthorized: true };

I have some console code that will print out the subject CN of the client cert that is sent.

console.log(new Date()+' '+ req.connection.remoteAddress+' '+ req.socket.getPeerCertificate().subject.CN+' '+ req.method+' '+req.url);

I configured my keystore and truststore in edge . I've uploaded two client keys . CN (client1 and client2). I created one proxy in edge and would modify what client key to use. At one point I was seeing the expected behavior in my node server logs with the correct CN client1 or client2 depending on my proxy code. I have since made some changes to the names of my key and trust store. Now from a node server console log only client2 seems to be used. I've restarted message-processor and management-server but not seeing the correct CN in my server logs. Always sending the client2 key.

Has anyone seen this behavior? Wondering if some caching is occuring and I need to restart any other apigee services?

Thanks.

0 3 357
3 REPLIES 3