{"comment":{"created_at":"2011-10-23T21:48:26Z","body":"Changing security config will introduce risk for users. We should avoid that","updated_at":"2011-10-23T21:48:26Z","url":"https://api.github.com/repos/symfony/symfony/issues/comments/2498117","id":2498117,"user":{"avatar_url":"https://secure.gravatar.com/avatar/75f5fb3ddda052e46f1daed314ae69ab?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"75f5fb3ddda052e46f1daed314ae69ab","url":"https://api.github.com/users/beberlei","id":26936,"login":"beberlei"}},"action":"created","issue":{"number":2454,"created_at":"2011-10-23T12:58:54Z","pull_request":{"diff_url":"https://github.com/symfony/symfony/pull/2454.diff","patch_url":"https://github.com/symfony/symfony/pull/2454.patch","html_url":"https://github.com/symfony/symfony/pull/2454"},"body":"Bug fix: no\r\nFeature addition: yes\r\nBC break: no (for now)\r\nTests pass: yes\r\n\r\nThis adds a way to extend the ``providers`` section of the security config so that other bundles can hook their stuff into it. An example is available in DoctrineBundle which is now responsible to handle the entity provider (needs some cleanup as the service definition is still in SecurityBundle currently). This will allow PropelBundle to provide a ``propel:`` provider for instance.\r\n\r\nIn order to keep BC with the existing configuration for the in-memory and the chain providers, I had to allow using a prototyped node instead of forcing using an array node with childrens. This introduces some issues:\r\n\r\n- impossible to validate easily that a provider uses only one setup as prototyped node always have a default value (the empty array)\r\n- the ``getFixableKey`` method is needed in the interface to support the XML format by pluralizing the name.\r\n\r\nHere is my non-BC proposal for the configuration to clean this:\r\n\r\n```yaml\r\nsecurity:\r\n    providers:\r\n        first:\r\n            in_memory: # BC break here by adding a level before the users\r\n                users:\r\n                     joe: { password: foobar, roles: ROLE_USER }\r\n                     john: { password: foobarbaz, roles: ROLE_USER }\r\n        second:\r\n            entity: # this one is BC\r\n                class: Acme\\DemoBundle\\Entity\\User\r\n        third:\r\n            id: my_custom_provider # also BC\r\n        fourth:\r\n            chain: # BC break by adding a level before the providers\r\n                 providers: [first, second, third]\r\n```\r\n\r\nWhat do you think about it ? Do we need to keep the BC in the config of the bundle or no ?\r\n\r\nBtw note that the way to register the factories used by the firewall section should be refactored using the new way to provide extension points in the extensions (as done here) instead of relying on the end user to register factories, which would probably mean a BC break anyway.","comments":3,"title":"[WIP][SecurityBundle] Added a way to extend the providers section of the config","updated_at":"2011-10-23T21:48:26Z","url":"https://api.github.com/repos/symfony/symfony/issues/2454","id":2026601,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/7894bbdf1c05b18a1444ad8c76c9d583?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"7894bbdf1c05b18a1444ad8c76c9d583","url":"https://api.github.com/users/stof","id":439401,"login":"stof"},"html_url":"https://github.com/symfony/symfony/issues/2454","labels":[],"state":"open"},"legacy":{"issue_id":2026601,"comment_id":2498117}}