Skip to content

Upgrade to 4.4 requires defining a security provider #34596

Closed
@alexander-schranz

Description

@alexander-schranz

Symfony version(s) affected: 4.4.0

Description

We had the following security configuration in sulu for our test environment e.g.:

I currently fixed it by adding now set a default provider to the firewall setting:

security:
    # ...
    firewalls:
        admin:
            # ...
            anonymous: ~
+            provider: sulu
            # ...

Strangely I couldn't find this configuraiton in https://symfony.com/doc/current/reference/configuration/security.html#firewalls I just saw it that the SecurityExtension is accessing it here

How to reproduce

After upgrading a Project to Symfony 4.4 the following error does happens:

Not configuring explicitly the provider for the "anonymous" listener on "admin" firewall is ambiguous as there is more than one registered provider.

Possible Solution

None.

I couldn't see why this did work with 4.3. 🤔 couldn't see any changes in the SecurityExtension which could make problems.

Additional context

Happens only if providing multiple user providers but don't have a single provider defined ad firewell level not on form_login or json_login level.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions