Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nodejs - Passport-saml implementation with One-login

I'm trying to run below passport-sample example with one login SSO. But I couldn't make it successful. I have given Onelogin HTTP-redirect url in the SAML entry point(config.js). It was redirecting to one login authentication page and redirecting back to application page but the application is not loading.

https://github.com/gbraad/passport-saml-example

Please advise what am I missing here.

module.exports = {
  development: {
    app: {
      name: 'Passport SAML strategy example',
      port: process.env.PORT || 3000
    },
    passport: {
      strategy: 'saml',
      saml: {
        path: process.env.SAML_PATH || '/login/callback',
        entryPoint: process.env.SAML_ENTRY_POINT || 'https://domain.onelogin.com/trust/saml2/http-redirect/slo/200908',
        issuer: 'passport-saml',
        cert: process.env.SAML_CERT || null
      }
    }
  }
};
like image 671
user2848031 Avatar asked Oct 27 '18 17:10

user2848031


1 Answers

The saml entryPoint doesn't look right in the passport saml configuration.

It is currently configured to the single logout service URL; whereas

the single sign on service URL should read similar to:

'https://domain.onelogin.com/trust/saml2/http-post/sso/200908'

The protocol binding used in entry point above is also ascertained to be the right one because the AuthNRequest sent in passport-saml module at version 0.5.0 uses http-post protocol binding for the authentication request with the identity provider and not http-redirect protocol binding.

like image 172
Oluwafemi Sule Avatar answered Nov 10 '22 20:11

Oluwafemi Sule