My application need integration with SAML IDP, I am using passport-saml which is for node.js, below is the config
passport.use(new SamlStrategy(
{
issuer: 'http://192.168.1.5/assert',
entryPoint: 'https://wwww.aa.com/webservices/public/saml2sso?SPID=http://192.168.1.5/metadata.xml',
callbackUrl: 'http://192.168.1.5/assert',
decryptionPvk:fs.readFileSync(path.resolve(__dirname, '..', 'certs') + "/cert.pem").toString(),
privateCert: fs.readFileSync(path.resolve(__dirname, '..', 'certs') + "/key.pem").toString(),
cert: [fs.readFileSync(path.resolve(__dirname, '..', 'certs') + "/dev.cer").toString()],
},
function (profile, done) {
return done(null, profile);
}
))
I know the cert parmater is the certification (public key) from IDP, but what's the privateCert and decryptionPvk. I passed the private key key.pem as privateCert and public key (cert.pem) as decryptionPvk, but it not works. I generate the key and certification with following command: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -days 900