ERROR: Error retrieving OpenId metadata at https://api.aps.skype.com/v1/.well-known/openidconfiguration
Hi,
I have a strange issue :
When I test the connection to my Bot, the interface raised an "InternalServerError". On my server's log I found :
ERROR: Error retrieving OpenId metadata at https://api.aps.skype.com/v1/.well-known/openidconfiguration, error: Error: Hostname/IP doesn't match certificate's altnames: "Host: api.aps.skype.com. is not in the cert's altnames: DNS:*.aps.skype.com"
ERROR: ChatConnector: receive - invalid signing key or OpenId metadata document.
This error is raised by OpenIdMetadata.js when the method 'getKey' is called.
Configuration (RP3) :
- nodejs v6.9.1
- node red v0.15.2
- Linux 4.4.16-6-osmc arm LE
My RP3 is on my local Lan (NAT), I use a Let's Encrypt certificate (works fine on other platform)
Very similar to this note.
Regards,
Hi @ebrulato, I'm not sure what to make of this -- the snippet you provided shows that the Subject Alternative Name field contains the expected value ("*.aps.skype.com"). The only thing I can think of is that your SSL lib does not like wildcards in SANs. Is there another cert with a wildcard in the SAN that is working without problems?
Thanks, I will check the version of my SSL lib, but I've done a complete upgrade of my RP3... and I will try to find other sample to be sure there is no issue with the BotBuilder :) Regards,
Hi @dandriscoll
I still investigate this issue. If I use this code
var r = require('request');
var options = { method: 'GET', url: 'https://api.aps.skype.com/v1/.well-known/openidconfiguration', json: true };
r(options, function(err, response, body) { console.log('code='+response.statusCode); console.log(body); console.log('err='+err);
options.url = body.jwks_uri;
r(options,
function(err, response, body) {
console.log('code='+response.statusCode);
console.log(body);
console.log('err='+err);
});
} )
This code is very similar to the code of OpenIdMetadata.js The result is :
code=200 { issuer: 'https://api.botframework.com', authorization_endpoint: 'https://invalid.botframework.com', jwks_uri: 'https://api.aps.skype.com/v1/keys', id_token_signing_alg_values_supported: [ 'RSA256' ], token_endpoint_auth_methods_supported: [ 'private_key_jwt' ] } err=null code=200 { keys: [ { kty: 'RSA', use: 'sig', kid: 'e9d2Ej_yEdf2jCBDDJKVqsW-cXo', x5t: 'e9d2Ej_yEdf2jCBDDJKVqsW-cXo', n: '1X8Pa5XWh6Ol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'AQAB', x5c: [Object] }, { kty: 'RSA', use: 'sig', kid: 'yceHp93RzmN-kd8vCnKEulqI8Zo', x5t: 'yceHp93RzmN-kd8vCnKEulqI8Zo', n: 'uWfitwq1Pr_shNl3_qmR9c4ue6TM_uc-alWs6aY1Hif7HGMdQQGLWbh-o4WDO2bXhFJPXxB0eRm-GXrHqfBB1Ne5iWiTldOFYTbLXSEiILrbAi9A2rHdAuxuWIeQDDHPOb6tII_jvHNXA24q5paXktaSV0arn4fRpOMmi_eW4QQqPK0LeTNfd4LhGpKX26o8Fc3hu9RSUUbVXo1qMYyP3U75PBWSqYVGIXnFRu9FbLP8AmSCzZB0RI5kQEZQ-zs70cCnyBp1bGZI6J_qDwFlyQmH7Y-0kCfxONAItLe7vRNnCn1104EpObqg22oFKeYuwXD2jlZILfBifl_ETQPyvw', e: 'AQAB', x5c: [Object] } ] } err=null
I test the call of https://api.aps.skype.com/v1/.well-known/openidconfiguration with curl and have not the issue. I add some trace in OpenIdMetadata.js and the first call returns this error :
{ Error: Hostname/IP doesn't match certificate's altnames: "Host: api.aps.skype.com. is not in the cert's altnames: DNS:_.aps.skype.com"
at Object.checkServerIdentity (tls.js:199:17)
at TLSSocket.
Have you any other suggestion... idea ? The nodeJS version is the same, the request lib used have the same version... openssl version is "OpenSSL 1.0.1t 3 May 2016" Where is the difference ??? Why the MS Bot Framework has a different behavior ?
Regards,
Hi, I have made more investigation. I found other cases with the same issue (api.ai, ...) In fact I create a simple node for node-red
here is the code
var r = require("request"); // -------------------------------------------------------------------------- // NODE-RED // -------------------------------------------------------------------------- module.exports = function(RED) { const register = function(config) { RED.nodes.createNode(this, config);
this.on('input', (data) => { input(this, data, config, RED) });
}
RED.nodes.registerType("test", register, {});
};
const input = (node, data, config, RED) => {
var options = { method: 'GET', url: 'https://api.aps.skype.com/v1/.well-known/openidconfiguration', json: true };
r(options, function(err, response, body) { console.log('err='+err); console.log('response='+response); console.log('body='+body); }); node.send(data); };
and the result in node-red 0.15.2 with my RPi3 is
err=Error: Hostname/IP doesn't match certificate's altnames: "Host: api.aps.skype.com. is not in the cert's altnames: DNS:*.aps.skype.com" response=undefined body=undefined
:(
It seems that node-red override ssl I close this issue
Regards,