node-saml / passport-saml

SAML 2.0 authentication with Passport
MIT License
862 stars 473 forks source link

Need help with SSO #305

Closed mattratliff-excella closed 6 years ago

mattratliff-excella commented 6 years ago

I'm sending a saml request to my IDP and am getting the following error message in the process:

Unhandled error for request GET /ssoauth: Error: Missing attribute value for attribute Destination of element samlp:AuthnRequest

Where /ssoauth is the path on my server that the client uses to initiate the request.

Here is my passport.js file:

var passport = require('passport'); var config = require('./samlConfig'); var SamlStrategy = require('passport-saml').Strategy;

var samlOptions = { entryPoint: config.entryPoint, issuer: config.callbackUrl, callbackUrl: config.callbackUrl, cert: config.cert, identifierFormat: null };

passport.serializeUser(function(user, done) { done(null, user.id); });

passport.deserializeUser(function(id, done) { done(err, user); });

passport.use(new SamlStrategy( samlOptions, function(profile, done) { findByEmail(profile.email, function(err, user) { if (err) { return done(err); } return done(null, user); }); } ));

module.exports = passport;

Samlconfig.js:

var entryPoint = 'https://sso.jumpcloud.com/saml2/excellacentral'; var issuer = 'passport-saml'; var callbackUrl = 'https://localhost:5000/login/callback'; var identifierFormat = 'identifierFormat: null'; var cert = '......';

Also, in the Chrome console here is the response from the request:

image

xylude commented 6 years ago

I'm not sure this issue is with passport-saml. If that's really your whole Samlconfig.js it appears you aren't actually exporting any of those variables. So everything would be undefined that you're passing in to samlOptions.

markstos commented 6 years ago

Support is not provided in this issue tracker. Try posting on StackOverflow the [passport-saml] tag.

mattratliff-excella commented 6 years ago

Great thank you for all of your help. I’m using SAML2 instead so that way I can actually get this done.

Matthew Ratliff Excella Consulting, Extension Center Mentor/Senior Consultant Direct: (540) 808-3518 / matthew.ratliff@excella.commailto:matthew.ratliff@excella.com @excellaco / www.excella.comhttp://www.excella.com

Excella Consulting is an equal opportunity/affirmative action employer. All qualified applicants will receive consideration for employment without regard to sex, gender identity, sexual orientation, race, color, religion, national origin, disability, protected veteran status, age, or any other characteristic protected by law

On Sep 29, 2018, at 8:41 PM, Mark Stosberg notifications@github.com<mailto:notifications@github.com> wrote:

Closed #305https://github.com/bergie/passport-saml/issues/305.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/bergie/passport-saml/issues/305#event-1875157001, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ae5Dm0iiJXnTOvWDhI1ar-ypJVyKHmAWks5ugBM8gaJpZM4W8sSA.