2017 © Pedro Peláez
 

symfony-bundle stepup-saml-bundle

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

image

surfnet/stepup-saml-bundle

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  • Monday, April 16, 2018
  • by joostd
  • Repository
  • 11 Watchers
  • 7 Stars
  • 16,883 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 17 Forks
  • 3 Open issues
  • 63 Versions
  • 6 % Grown

The README.md

SURFnet SamlBundle

A PHP Symfony bundle that adds SAML capabilities to your application using simplesamlphp/saml2, (*1)

Developed as part of the [OpenConext-Stepup Gateway][2] and related OpenConext-Stepup applications that use SAML 2.0, (*2)

Installation

  • Add the package to your Composer file sh composer require surfnet/stepup-saml-bundle

How to install with SF6, (*3)

  1. Require the bundle in the composer.json (version 4.1.9 or higher)
  2. Enable the bundle in config/bundles.php add to the return statement: Surfnet\SamlBundle\SurfnetSamlBundle::class => ['all' => true],
  3. Specify the bundle configuration in config/packages/surfnet_saml.yaml, consult the configuration section below for available options.
  4. Configure the templates to the Twig Bundle by adding '%kernel.project_dir%/vendor/surfnet/stepup-saml-bundle/templates': 'SurfnetSaml' to your twig.yaml config file(s)

Configuration

surfnet_saml:
    enable_authentication: false
    hosted:
        attribute_dictionary:
            ignore_unknown_attributes: false
        service_provider:
            enabled: true
            assertion_consumer_route: name_of_the_route_of_the_assertion_consumer_url
            public_key: %surfnet_saml_sp_publickey%
            private_key: %surfnet_saml_sp_privatekey%
        identity_provider:
            enabled: true
            service_provider_repository: service.name.of.entity_repository
            sso_route: name_of_the_route_of_the_single_sign_on_url
            public_key: %surfnet_saml_idp_publickey%
            private_key: %surfnet_saml_idp_privatekey%
        metadata:
            entity_id_route: name_of_the_route_of_metadata_url
            public_key: %surfnet_saml_metadata_publickey%
            private_key: %surfnet_saml_metadata_privatekey%
    remote:
        identity_provider:
            enabled: true
            entity_id: %surfnet_saml_remote_idp_entity_id%
            sso_url: %surfnet_saml_remote_idp_sso_url%
            certificate: %surfnet_saml_remote_idp_certificate%
        service_providers:
            - entity_id: "%surfnet_saml_remote_sp_entity_id%"
              certificate_file: "%surfnet_saml_remote_sp_certificate%"
              assertion_consumer_service_url: "%surfnet_saml_remote_sp_acs%"            

The hosted: configuration lists the configuration for the services (SP, IdP or both) that your application offers. SP and IdP functionality can be turned off and on individually through the repective enabled flags., (*4)

The remote: configuration lists, if enabled, the configuration for one or more remote service providers and identity providers to connect to. If your application authenticates with a single identity provider, you can use the identity_provider: option as shown above. The identity provider can be accessed runtime using the @surfnet_saml.remote.idp service., (*5)

If your application authenticates with more than one identity providers, you can omit the identity_provider: key from configuration and list all identity providers under identity_providers:. The identity providers can be accessed by using the @surfnet_saml.remote.identity_providers service., (*6)

    remote:
        identity_providers:
            -  enabled: true
               entity_id: %surfnet_saml_remote_idp_entity_id%
               sso_url: %surfnet_saml_remote_idp_sso_url%
               certificate: %surfnet_saml_remote_idp_certificate%

The inlined certificate in the last line can be replaced with certificate_file containing a filesystem path to a file which contains said certificate. It is recommended to use parameters as listed above. The various publickey and privatekey variables are the contents of the key in a single line, without the certificate etc. delimiters. The use of parameters as listed above is highly recommended so that the actual key contents can be kept out of the configuration files (using for instance a local parameters.yml file)., (*7)

The service_provider_repository is a repository of service providers for which you offer IdP services. The service configured must implement the Surfnet\SamlBundle\Entity\ServiceProviderRepository interface., (*8)

Service providers can be provided statically by using the remote.service_providers configuration option. To use these configured service providers keep in mind that you need to assign surfnet_saml.remote.service_providers as service_provider_repository., (*9)

Example Usage

Symfony Authentication

As of version 5 of this bundle, we started supporting SAML authentications via the Stepup SAML bundle. This ties into the Symfony Security component., (*10)

Details about how to install this into your SP, see the EXAMPLES.md., (*11)

Overriding the ACS processor

Your application will start to try and handle all SAML Responses that are posted to your apps ACS location. In most situations that's exactly what you want. However if you want to handle the response yourself. You can!, (*12)

  1. Ensure you add a RelayState statement to the AuthnRequest
  2. Configure that RelayState value in the rejected_relay_states parameter (in your app). This value defaults to []. So be sure to pass an array of string values
  3. Thats it.

Metadata Publishing

<?php

namespace Acme\SamlBundle

use Surfnet\SamlBundle\Http\XMLResponse;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class MetadataController extends Controller
{
    public function metadataAction(Request $request)
    {
        /** @var \Surfnet\SamlBundle\Metadata\MetadataFactory $metadataFactory */
        $metadataFactory = $this->get('surfnet_saml.metadata_factory');

        return new XMLResponse($metadataFactory->generate());
    }
}

See more examples in EXAMPLES.md., (*13)

Release strategy

CHANGELOG.md

Please read: https://github.com/OpenConext/Stepup-Deploy/wiki/Release-Management for more information on the release strategy used in Stepup projects., (*14)

UPGRADING.md

When introducing backwards compatible breaking changes in the bundle. Please update the UPGRADING.md file to instruct users how to deal with these changes. This makes upgrading as painless as possible., (*15)

The Versions

16/04 2018

dev-master

9999999-dev

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/04 2018

4.1.0

4.1.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/04 2018

dev-develop

dev-develop

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/04 2018

dev-release/4.0

dev-release/4.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/04 2018

dev-feature/expose-request-acs-url

dev-feature/expose-request-acs-url

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

12/04 2018

dev-feature/fix-ignore-unknown-typo

dev-feature/fix-ignore-unknown-typo

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

21/03 2018

4.0.0

4.0.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

15/03 2018

dev-feature/specific-error-pages

dev-feature/specific-error-pages

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

08/03 2018

3.0.1

3.0.1.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

08/03 2018

dev-release/3.0

dev-release/3.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

17/01 2018

3.0.0

3.0.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

dev-release-3.x

dev-release-3.x

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

3.0.0-rc5

3.0.0.0-RC5

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

dev-bugfix/extension-parser-error

dev-bugfix/extension-parser-error

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

3.0.0-rc4

3.0.0.0-RC4

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

3.0.0-rc3

3.0.0.0-RC3

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

3.0.0-rc2

3.0.0.0-RC2

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

dev-bugfix/read-name-id-correctly-from-assertion

dev-bugfix/read-name-id-correctly-from-assertion

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

16/01 2018

3.0.0-rc1

3.0.0.0-RC1

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

15/01 2018

dev-feature/drop-old-php-version-support

dev-feature/drop-old-php-version-support

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

15/01 2018

dev-feature/saml2-upgrade

dev-feature/saml2-upgrade

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

09/01 2018

2.11.2

2.11.2.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

09/01 2018

dev-release-2.x

dev-release-2.x

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

09/01 2018

dev-feature/orcid-attribute-support

dev-feature/orcid-attribute-support

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

30/11 2017

2.11.1

2.11.1.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

22/11 2017

2.11.0

2.11.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

17/11 2017

2.10.1

2.10.1.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

17/11 2017

2.10.0

2.10.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

25/09 2017

2.9.0

2.9.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

25/09 2017

2.8.2

2.8.2.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

07/09 2017

2.8.2-beta

2.8.2.0-beta

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

06/09 2017

2.8.1-beta

2.8.1.0-beta

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

25/08 2017

dev-feature/http-post-binding-support

dev-feature/http-post-binding-support

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

24/08 2017

2.8.0-beta

2.8.0.0-beta

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

20/02 2017

2.7.0

2.7.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

27/01 2017

dev-feature/correct-repository-in-readme

dev-feature/correct-repository-in-readme

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

12/01 2017

2.7.0-beta

2.7.0.0-beta

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

12/12 2016

2.6.3

2.6.3.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

12/12 2016

2.6.2

2.6.2.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

19/10 2016

2.6.1

2.6.1.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

19/10 2016

2.6.0

2.6.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

01/07 2016

2.5.0

2.5.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

31/05 2016

2.4.0

2.4.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

30/03 2016

2.3.0

2.3.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

18/03 2016

2.2.0

2.2.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

27/01 2016

2.1.0

2.1.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

17/12 2015

2.0.0

2.0.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

15/12 2015

1.7.0

1.7.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

15/12 2015

dev-release-1.x

dev-release-1.x

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

04/12 2015

1.6.0

1.6.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

25/11 2015

1.5.0

1.5.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

24/11 2015

1.4.1

1.4.1.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

09/11 2015

1.4.0

1.4.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

13/07 2015

1.3.0

1.3.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

13/07 2015

1.2.0

1.2.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

13/07 2015

1.1.0

1.1.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

19/06 2015

1.0.0

1.0.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

11/06 2015

0.5.0

0.5.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

11/06 2015

dev-release-0.x

dev-release-0.x

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

04/05 2015

0.4.0

0.4.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

26/03 2015

0.3.0

0.3.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

27/02 2015

0.2.0

0.2.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup

20/01 2015

0.1.0

0.1.0.0

A Symfony2 bundle that integrates the simplesamlphp\saml2 library with Symfony

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

saml saml2 simplesamlphp surfnet stepup