The Symfony bundle "hslavich/OneloginSamlBundle" give me a firewall error on login check

318 Views Asked by At

I'm using Symfony 3.4 and the OneloginSamlBundle (https://github.com/hslavich/OneloginSamlBundle) on version 1.8.2 for my EZ Platform.

My security.yml configuration file:

security:
    providers:
        ezpublish:
            id: AppBundle\EzAdminUi\Infrastructure\Security\UserProvider
        user_provider:
            entity:
                class: 'Symfony\Component\Security\Core\User\User'
        saml_provider:
            saml:
                user_class: 'Symfony\Component\Security\Core\User\User'
                default_roles: [ 'ROLE_USER' ]

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        app:
            pattern: ^/
            anonymous: true
            saml:
                username_attribute: email
                use_attribute_friendly_name: false
                login_path: '/saml/login'
                check_path: '/saml/login_check'
                persist_user: true
            logout:
                path: '/saml/logout'

    access_control:
        - { path: ^/saml/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/saml/metadata, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/_trans, roles: ROLE_TRANSLATIONS }

I get this error on /saml/login_check POST.

Uncaught PHP Exception RuntimeException: "You must configure the check path to be handled by the firewall."

I'm stuck, and I don't know what else to do.

1

There are 1 best solutions below

1
On

Did you try check_path: '/saml/acs'?

Source: https://github.com/hslavich/OneloginSamlBundle