Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

simplesamlphp with composer overwrites the configuration files when updating

I have installed SimpleSAMLphp in my project using Composer, configured it and have it working nicely.

Unfortunately, every time I do a composer update the config.php, authsources.php and saml20-idp-remote.php files are deleted.

The documentation suggests a way of providing an alternative location or the config.php file but not for the other two.

Can anyone suggest a setting up SimpleSAMLphp with these files located outside of the vendor\SimpleSAMLphp folder?

I'm currently using a script to copy locally stored copies of these files back to the correct folder on a post-update trigger, but it seems to me to be a bit of a kludge.

Thanks.

like image 933
Mark Austen Avatar asked Apr 20 '16 10:04

Mark Austen


1 Answers

SIMPLESAMLPHP_CONFIG_DIR lets you specify the config directory with an env variable. SSP will look in that folder for config.php and authsources.php. You can define where the metadata files are stored with a variable inside config.php

'metadata.sources' => array(
     array('type' => 'flatfile', 'directory' =>  '/your/path/metadata'),
),

The above example will tell SSP to look in /your/path/metadata for saml20-idp-remote.php (and other metadata files)

There can be some other challenges using SSP installed this way - in particular if you need to install additional modules SSP expects them to be in (or symlinked from) it's modules directory.

like image 183
Patrick Avatar answered Oct 28 '22 19:10

Patrick