Simplesaml blank page after login

1,661 views
Skip to first unread message

Sohrab Khan

unread,
Oct 26, 2016, 4:05:26 AM10/26/16
to SimpleSAMLphp
Hi, I've simplesaml configured on an nginx webserver. I can browse to all the pages of simplesamlphp which means the nginx config is good. I parsed the identity provider's metadata file & copied that to the saml20-idp-remote file. When testing the sso simplesaml redirects me to the login page of the identity provider, I login & am redirected back to simplesaml. But im only displayed a blank page.
I've switched on debug logs & there is no error thrown, the nginx logs are clean & the empty page is a 200 response. The only thing that looks suspicious is a line saying "validation of key 0 failed without an exception" in the simplesaml debug logs.

This error is thrown somewhere in modules/lib/saml/Messages.php (sorry if the path isn't correct as im not in front of my computer).

What can be the possible reason for this?

Jaime Perez Crespo

unread,
Oct 26, 2016, 4:12:19 AM10/26/16
to simple...@googlegroups.com
Hi Sohrab,
Blank pages are almost always a server error, like a syntax error or a fatal, uncaught exception. When you get a blank page, you should always look at the error log of your web server.

--
Jaime Pérez
UNINETT / Feide

jaime...@uninett.no
jaime...@protonmail.com
9A08 EA20 E062 70B4 616B 43E3 562A FE3A 6293 62C2

"Two roads diverged in a wood, and I, I took the one less traveled by, and that has made all the difference."
- Robert Frost

Sohrab Khan

unread,
Oct 26, 2016, 4:54:13 AM10/26/16
to SimpleSAMLphp
Hi Jaime,

The blank page is not a php white screen of death, it actually is a 200 response page and the server isn't catching any errors. 


I went through the code in the file modules/saml/www/sp/saml2-acs.php and found that the code doesn't go any further down than this lin:

sspmod_saml_SP_LogoutStore::addSession($sourceId, $nameId, $sessionIndex, $logoutExpire);

The log files go something like below:

- Redirect to 623 byte URL: https://exampleidp.com/adfs/ls/?SAMLRequest=xPIeb83wEIX&RelayState=https-example.com.php.php
- Loading state: '_403484e48e3bd56bf63332cacc6cd55094e2bba6aa'
- Received SAML2 Response from 'http://exampleidp.com/adfs/services/trust'.
- Has 1 candidate keys for validation.
- Validation with key #0 failed without exception.


Thanks

Sohrab

Jaime Perez Crespo

unread,
Oct 26, 2016, 5:16:34 AM10/26/16
to simple...@googlegroups.com
Hi again,

On 26 Oct 2016, at 10:54 AM, Sohrab Khan <sohr...@gmail.com> wrote:
> Hi Jaime,
>
> The blank page is not a php white screen of death, it actually is a 200 response page and the server isn't catching any errors.
>
> I'm redirected back from the login screen to https://example.com/simplesaml/module.php/saml/sp/saml2-acs.php/exampleidp
>
> I went through the code in the file modules/saml/www/sp/saml2-acs.php and found that the code doesn't go any further down than this lin:
> sspmod_saml_SP_LogoutStore::addSession($sourceId, $nameId, $sessionIndex, $logoutExpire);

That still looks like a white screen of death.

What data store have you configured in config/config.php? In case it is “sql” or “memcache”, can you connect to it from PHP?

Sohrab Khan

unread,
Oct 26, 2016, 6:29:05 AM10/26/16
to SimpleSAMLphp
It's a blank white screen where i can dump any value all the way until the line below of modules/saml/www/sp/saml2-acs.php:
sspmod_saml_SP_LogoutStore::addSession($sourceId, $nameId, $sessionIndex, $logoutExpire);

if i do:
echo "im here";

in modules/saml/lib/SP/LogoutStore.php on the first line of method addSession($authId, array $nameId, $sessionIndex, $expire). This echo message is not displayed, which is very bizarre. Seems to me the autoloader isn't working properly.

Thanks for ur help.

jes...@gmail.com

unread,
Aug 7, 2017, 10:42:35 AM8/7/17
to SimpleSAMLphp
Hello, in my case I had to enable display_errors in php.ini and then it all turned out that mb_strlen() function was not present. Then I searched the package repository for the mbstring library and php-mbstring showed up.
at last yum install php-mbstring did everything.
cheers
Jessian
Unesp - SP - Brasil
Reply all
Reply to author
Forward
0 new messages