This is invalid. The config for the ``chain`` provider must be set for a provider. Here, the name of the provider would become ``chain`` and the ``providers`` would then be tried to be matched as a provider type.

the proper fix would be

```yaml
security:
    providers:
        some_name:
            chain:
                providers: [some_custom_provider, entity]