SAML error: Cannot read property 'toString' of undefined

247 views
Skip to first unread message

valery....@gmail.com

unread,
Jul 20, 2017, 10:20:18 AM7/20/17
to Sandstorm Development
Hi guys,

I have a problem with the SAML Identity Provider.

Everything was working correctly up to now (only the SAML provider was enabled).
For a demo, I just have re-enabled the GitHub provider (SAML and GitHub enabled). Both worked. Then I re-disabled GitHub (only SAML enabled), and now SAML is not working anymore !?!

In the log I only have:

TypeError: Cannot read property 'toString' of undefined
at [object Object].SAML.validateSignature (imports/server/accounts/saml-utils.js:180:21)
at imports/server/accounts/saml-utils.js:219:38
at Parser.<anonymous> (/programs/server/npm/node_modules/xml2js/lib/xml2js.js:255:20)
at emitOne (events.js:77:13)
at Parser.emit (events.js:169:7)
at Object.saxParser.onclosetag (/programs/server/npm/node_modules/xml2js/lib/xml2js.js:225:24)
at emit (/programs/server/npm/node_modules/sax/lib/sax.js:615:33)
at emitNode (/programs/server/npm/node_modules/sax/lib/sax.js:620:3)
at closeTag (/programs/server/npm/node_modules/sax/lib/sax.js:861:5)
at Object.write (/programs/server/npm/node_modules/sax/lib/sax.js:1293:29)

And the SAML login popup windows shows:

URL: https://MY_SERVER_FQDN/_saml/validate/default

"Sorry, an error occured

TypeError: Cannot read property 'toString' of undefined
Close Window View system log (admin only)"


Any idea?????

Cheers,
Valery

valery....@gmail.com

unread,
Jul 20, 2017, 10:38:18 AM7/20/17
to Sandstorm Development
Strange.

Restarting Chrome allows me to login with SAML (again). But if I 'Sign out', and try to login again, then the same error occurs?!?

Cheers,
V.

Kenton Varda

unread,
Jul 30, 2017, 6:49:39 PM7/30/17
to valery....@gmail.com, Sandstorm Development
Hi Valery,

Testing with my local setup which uses simplesamlphp, I'm not able to reproduce this. I can log in and out repeatedly and everything is fine.

Looking at the code, it looks like the error could occur if the SAML XML blob received from the IDP did not contain a signature in the place that Sandstorm expected it. So I think your SAML provider is for some reason providing a different message the second time you try to log in, compared to the first. Unfortunately I don't know why that would be. Can you perhaps compare them and see what's different?

-Kenton

PS. Sorry for the slow reply. Note that I tend to respond faster to e-mails sent to sup...@sandstorm.io, whereas I only check sandstorm-dev on weekends (and not on every weekend...).

--
You received this message because you are subscribed to the Google Groups "Sandstorm Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sandstorm-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sandstorm-dev/080eb3aa-5060-46d3-b97c-5e4320f65ab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages