After upgrading simplesamlphp from 1.13.2. to 1.14.0, I'm now intermittently getting NOSTATE errors when I go to my site's /simplesaml folder.
SimpleSAML_Error_NoState: NOSTATE
Backtrace:
2 /var/simplesamlphp/lib/SimpleSAML/Auth/State.php:263 (SimpleSAML_Auth_State::loadState)
1 /var/simplesamlphp/modules/saml/www/sp/saml2-acs.php:78 (require)
0 /var/simplesamlphp/www/module.php:127 (N/A)
And I also get the same error when trying to login to my Drupal site with a federated login. If I go back and then try again sometimes it will let me login.
I followed the upgrade instructions for upgrading simplesamlphp.
Any help would be appreciated.
Thanks.
Cyndi
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | metadata.png | 122.01 KB | gurunathan |
| #14 | authentication.png | 125.17 KB | gurunathan |
Comments
Comment #2
Stevel commentedIs this still an issue for you? I'm currently running the latest version (1.14) without problems.
Perhaps the info on https://simplesamlphp.org/docs/development/simplesamlphp-nostate can help?
Comment #3
cyndih commentedI just tried with Simplesamlphp 1.14.4 and am still getting the NOSTATE errors.
Comment #4
Stevel commentedDoes it work when you try the Simplesamlphp module itself? e.g. try to log in to your SP on /sites/all/libraries/simplesamlphp/module.php/core/authenticate.php
Comment #5
cyndih commentedNo, that is when I get the NOSTATE errors. With the simplesamlphp module itself. It works with 1.13.2 though.
Comment #6
Stevel commentedThe problem then is within the Simplesamlphp library, not in this module. Try to get the login working at /sites/all/libraries/simplesamlphp/module.php/core/authenticate.php, then this module should also work.
Comment #7
Stevel commentedClosing this ticket because there seems to be no problem with this module.
Comment #8
gurunathan commented@Stevel,
I get the same error in our site when we click the site URL from a MS word or powerpoint hyperlink.
I created a ticket #2859075 related to this.
Comment #9
gurunathan commentedComment #10
gurunathan commentedLine #215 in simplesamlphp_auth.module
$_simplesamlphp_auth_saml_attributes = $_simplesamlphp_auth_as->getAttributes();
This returns empty array. I think that's the reason for this issue.
Comment #11
pthornhi6 commentedI am getting this same error. And my system DOES authenticate properly when used directly /module.php/core/authenticate.php?as=default-sp
Comment #12
gurunathan commentedMy system also authenticate properly when used directly /module.php/core/authenticate.php?as=default-sp
Comment #13
snufkin commentedBy authenticating correctly you mean you get the necessary attributes as well? If getAttributes returns an empty array, that suggests to me that the SimpleSAML library could not populate the attributes, and therefore Drupal can not identify the user. This means that the change is introduced by the library, not the module.
Does a reroll of the library to 1.13.2 fixes the issue?
Comment #14
gurunathan commented@Sufkin,
I'm using libary version 1.13.2.
When I execute authenticate.php, I get the atttibutes. But I get error when I execute matadata.php. I have attached the screenshots. We get the error for the 'deafult-sp' instance only. We have two other instances 'stage-sp', 'live-sp'. We don't face the error with the metadata for this two instances.
Comment #15
snufkin commentedUnfortunately thats impossible for me to debug as the problem is highly circumstantial. I'll put this to postponed unless you can figure out where in the module code the bug is and how the issue is reproducible for others.
Comment #16
gurunathan commentedThe attributes arraqy was empty becuase it was mentioned NULL in 'config/authsources.php'.
'default-sp' => array(
...........
................
'attributes' => NULL,
);
I removed it. Now the Metadata page is loading fine. (https://example.com/simplesaml/module.php/saml/sp/metadata.php/default-s...).
But the issue is we redirect to the wrong page after login. But the user login happnes correctly in backend. So redirect URL is the only issue here. This is the the page to which the redirects happen after login.
https://example.com/simplesaml/module.php/saml/sp/saml2-acs.php/default-sp
Another important thing:
Type site URL in browser => Redirect to SAML Login page => After login redirect to the correct page. (This flow is correct).
Click URL in MsWord document => Redirect to SAML Login page => After login redirect to the wrong page. (This flow is wrong).
Any idea?
Comment #17
gurunathan commentedComment #18
Stevel commentedAre you sure the link in your word document (visible if you hover the link text) has the same target as the URL you type in the browser? I don't see how a link from word could trigger different behavior from typing in the link in your browser directly.
Comment #19
gurunathan commented@Stevel,
I use the same link in the word document
Comment #20
alvm commentedHi, any solution to this?.
I'm having the same problem, my "/module.php/core/authenticate.php?as=default-sp" works ok.
The first login and logout also works fine, but after that I am getting the "SimpleSAML_Error_NoState: NOSTATE"
I've already tried different versions of simpleSamlPhp and module, simplesaml configuration and sql and memcache store.type .
Also I read and apply the recommendations of the simpleSamlPhp documentation without luck.
Anyone can point me in the right direction?
Thanks!