6

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.

Mark Austen
  • 127
  • 1
  • 9

1 Answers1

8

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.

Patrick
  • 3,901
  • 1
  • 25
  • 30
  • Many thanks for the quick reply, I'll have a try at this later in the week when I get back to the SSO project. Fortunately we're only using a bog-standard SImpleSAMLphp setup for the SP. – Mark Austen Apr 25 '16 at 10:40
  • Sorry for the delay in marking this as correct, I had to reengineer my applications to use a single Service Provider to make it work. But work it does, so many thanks. – Mark Austen May 20 '16 at 06:07
  • Ran into this issue today. I also have a custom module so that makes things complicated. I don't have access to the virtual host settings on production either. I guess I'll write a githook :( – REJH Feb 27 '19 at 15:22