Upgrade notes for SimpleSAMLphp 2.0

SimpleSAMLphp 2.0 is a major new release which has cleaned up support for a lot of things that have been marked deprecated in previous SimpleSAMLphp releases. The following changes are relevant for installers and/or developers.

Software requirements

Not all modules included by default

The set of modules included in the base installation has been reduced. If you used some of the modules that were shipped with SimpleSAMLphp, you now have to manually install them using Composer. For example, to use the LDAP module:

composer require simplesamlphp/simplesamlphp-module-ldap --update-no-dev

Functional changes

Configuration changes

Our assets have been moved from the www to the public directory. You will have to update your webserver to reflect this change.

Quite some options have been changed or removed. We recommend to start with a fresh template from config/config.php.dist and migrate the settings you require to the new config file manually.

The date formatting when specifying a custom logging string has been changed from PHP's deprecated strftime() format to PHP's date() format.

The format of the NameIDPolicy option has been changed: to omit sending the element entirely, you can no longer specify false but need to set it to an empty array ( [] ).

Configuration options that have been removed:

Changes relevant for (module) developers

The following changes are relevant for those having custom developed modules, authentication processing filters, themes, or that interface with the SimpleSAMLphp development API.

// Old style
$x = \SimpleSAML\Utils\Arrays::arrayize($someVar)
becomes:
  // New style
  $arrayUtils = new \SimpleSAML\Utils\Arrays();
  $x = $arrayUtils->arrayize($someVar);

Upgrading and EntityIDs

If you still have your 1.x installation available, the entityID you are using for your SP and IdP should be available in module.php/core/frontpage_federation.php location on your SimpleSAMLphp server.

For a service provider, if it was set as auto-generated in 1.19, it will likely have the form of ( https://yourhostname/simplesaml/module.php/saml/sp/metadata.php/default-sp ).

The EntityID is set in two locations, as the property 'entityID' for an SP and as the index in the $metadata array for an IdP. Examples of both are shown below.

For the SP you can set the EntityID as shown in the below fragment of authsources.php. In all of the below configuration fragments the EntityID is set to ( https://example.com/the-service/ ).

...
    'default-sp' => [
        'saml:SP',
        // The entity ID of this SP.
        'entityID' => 'https://example.com/the-service/',
...

One suggestion for forming an EntityID is to use the below scheme.

$entityid_sp = 'https://'
   . $_SERVER['HTTP_HOST']
   . '/simplesaml/module.php/saml/sp/metadata.php/default-sp';

For an IdP you might like to look at saml20-idp-hosted.php where the EntityID is used as the key in the metadata array.

...
$metadata['https://example.com/the-service/'] = [
...

If you use SimpleSAMLphp as an SP, the IdP you are using will have your correct entityID configured.