janus-ssp / janus

Fully featured metadata registration administration module built on top of simpleSAMLphp.
Other
13 stars 8 forks source link

Importing edugain triggers Authsource 'default-sp' is invalid #557

Closed thijskh closed 9 years ago

thijskh commented 9 years ago

Go to an entity. On the import tab, enter http://mds.edugain.org and submit. The following error appears:


SimpleSAML_Error_Error: UNHANDLEDEXCEPTION

Backtrace:
0 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/www/module.php:180 (N/A)
Caused by: Symfony\Component\Security\Core\Exception\AuthenticationException: Authsource 'default-sp' is invalid
Backtrace:
8 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/src/Janus/ServiceRegistry/Security/Authentication/Provider/SspProvider.php:39 (Janus\ServiceRegistry\Security\Authentication\Provider\SspProvider::authenticate)
7 /var/cache/janus-ssp/janus/classes.php:2451 (Symfony\Component\Security\Core\Authentication\AuthenticationProviderManager::authenticate)
6 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/lib/DiContainer.php:177 (sspmod_janus_DiContainer::authenticate)
5 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/lib/DiContainer.php:130 ({closure})
4 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/vendor/pimple/pimple/lib/Pimple.php:126 ({closure})
3 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/vendor/pimple/pimple/lib/Pimple.php:83 (Pimple::offsetGet)
2 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/lib/DiContainer.php:185 (sspmod_janus_DiContainer::getSecurityContext)
1 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/modules/janus/www/importentity.php:10 (require)
0 /opt/openconext/OpenConext-serviceregistry-5.0.1/simplesamlphp-1.12.0/www/module.php:135 (N/A)

Most likely this is still the problem #506, but the triggered error message seems completely wrong and indicative of a problem somewhere.

relaxnow commented 9 years ago
Notice: MemcachePool::set(): Server localhost (tcp 11211, udp 0) failed with: 
SERVER_ERROR object too large for cache
 (3) in /opt/www/OpenConext-serviceregistry-5.1.0/simplesamlphp-1.13.2/
      lib/SimpleSAML/Memcache.php on line 134
relaxnow commented 9 years ago

OpenConext-serviceregistry uses the memcached session store, which seems a bit pointless as Engine just uses PHP sessions.

thijskh commented 9 years ago

Alright, but how is that related to Authsource 'default-sp' is invalid?

relaxnow commented 9 years ago

It seems like failing to set session data it clears the object from memcached all together. Which in effect just ends the session. Note that after a failed import you're logged out. That's because there simply isn't any session data any more.

relaxnow commented 9 years ago

Ah, reading more on this it appears that memcached upon receiving an object that is too large truncates the data. Thereby breaking the serialized PHP object.

Also just verified that phpsession store works fine.