Topic on Extension talk:SimpleSAMLphp

Configuration of SimpleSAMLphp, Pluggable Auth et Extension SimpleSAMLphp

9
Summary by CCicalese (WMF)

configuration error

80.78.5.111 (talkcontribs)

Hello !

I have a probleme with my media wiki, I try to config a SSO with SimpleSAMLphp and PluggableAuth, but I have this error message :

"Warning: require_once(/wiki/extensions/SimpleSAMLphp/lib/_autoload.php): failed to open stream: No such file or directory in /var/www/html/extensions/SimpleSAMLphp/includes/SimpleSAMLphp.php on line 204

Fatal error: require_once(): Failed opening required '/wiki/extensions/SimpleSAMLphp/lib/_autoload.php' (include_path='/var/www/html/vendor/pear/console_getopt:/var/www/html/vendor/pear/mail:/var/www/html/vendor/pear/mail_mime:/var/www/html/vendor/pear/net_smtp:/var/www/html/vendor/pear/net_socket:/var/www/html/vendor/pear/pear-core-minimal/src:/var/www/html/vendor/pear/pear_exception:.:/usr/local/lib/php') in /var/www/html/extensions/SimpleSAMLphp/includes/SimpleSAMLphp.php on line 204"


I run in Linux.

The version of my Mediawiki is 1.33, the extensions too and SimpleSAMLphp version is 1.17.


here is my LocalSettings.php :

#Other Extensions

        wfLoadExtension( 'SimpleSAMLphp' );

        wfLoadExtension( 'PluggableAuth' );

        #

        #         #Configuration of SimpleSAML

        $wgSimpleSAMLphp_InstallDir = '/wiki/extensions/SimpleSAMLphp/';

        $wgSimpleSAMLphp_AuthSourceId = 'default-sp';

        $wgSimpleSAMLphp_RealNameAttribute = "givenName";

        $wgSimpleSAMLphp_EmailAttribute = "mail";

        $wgSimpleSAMLphp_UsernameAttribute = "uid";

        #

        #         #Configuration of PluggableAuth

        $wgPluggableAuth_EnableAutoLogin = true;

        $wgPluggableAuth_EnableLocalLogin = false;

        $wgPluggableAuth_EnableLocalProperties = false;

        $wgPluggableAuth_ButtonLabelMessage = "Log In";

        $wgPluggableAuth_ButtonLabel = "Log In";

        $wgPluggableAuth_Class = "SimpleSAMLphp";

        #


And here the configuration fo SimpleSAMLphp.php (I would like to say that I change nothing in here) :

private static function getSAMLClient() {

                // Make MW core `SpecialPageFatalTest` pass

                if ( defined( 'MW_PHPUNIT_TEST' ) ) {

                        return new MediaWiki\Extension\SimpleSAMLphp\Tests\Dummy\SimpleSAML\Auth\Simple();

                }

                require_once rtrim( $GLOBALS['wgSimpleSAMLphp_InstallDir'], '/' )

                        . '/lib/_autoload.php';

                $class = 'SimpleSAML_Auth_Simple';

                if ( class_exists( 'SimpleSAML\Auth\Simple' ) ) {

                        $class = 'SimpleSAML\\Auth\\Simple';

                }

                return new $class( $GLOBALS['wgSimpleSAMLphp_AuthSourceId'] );

        }


I don't want to press, but it is an urgent problem that I must solve quickly...


Thanks a lot for your help !

Have a nice day !

Cindy.cicalese (talkcontribs)

Did you install and configure the SimpleSAMLphp PHP library (https://simplesamlphp.org/)? If so, in which directory did you install it? I see you have


$wgSimpleSAMLphp_InstallDir = '/wiki/extensions/SimpleSAMLphp/';


That should point to the directory where the SimpleSAMLphp PHP library is installed, not where the SimpleSAMLphp MediaWiki extension is installed.

I'm sorry for the confusion in the naming. If I were to go back and do it all again, I would have named the extension something different than the library.

80.78.5.106 (talkcontribs)

The SimpleSAMLphp PHP is installed in the directory extensions SimpleSAMLphp. I don't know where I must put it so... Sorry if it's wrong... I just beggin witch Mediawiki and everything around... And I must configure a SSo between WSO2 and Wiki...

I manage to made it the beginning was wrong it was supposed to be /html/extensions... and not /wiki/extensions

But now I have this error:

The configuration (config/authsources.php) is invalid: syntax error, unexpected entityID(T_CONSTANT_ENCAPSED_STRING), expecting ']'

And in the file, I have this :

// The entity ID of this SP.

        // Can be NULL/unset, in which case an entity ID is generated based on the metadata URL.

        'entityID' => null,


Thanks again for your help and sorry too...

Cindy.cicalese (talkcontribs)

Could you be missing a comma at the end of the line before the comments?

193.57.121.254 (talkcontribs)

I change nothing in this file that's why I don't understand, there is all the "]" That are needed and the "," too...

Cindy.cicalese (talkcontribs)
80.78.5.104 (talkcontribs)

Yes I've configured and tested it. I copy/paste the original configuration and it is working now... i must have delete a "]" by inadvertence...

Sorry again and thank you for your help ! ^^

FuscofrancescoItaly (talkcontribs)

I think you did not make a mistake. In the file authsource.php a comma is missing and precisely at the end of the row 'certificate' => 'saml.crt' and before the row 'entityID' ...

67.34.208.24 (talkcontribs)

this implies the simplesaml install directory is set wrong in local settings. Try providing an absolute path.

Reply to "Configuration of SimpleSAMLphp, Pluggable Auth et Extension SimpleSAMLphp"