Repository navigation
#169 - Allow to disable the security configuration overriding the application main firewall - #170
Merged
Merged
Conversation
…lication main firewall - New security.configure_firewall option (default true, same behaviour as before). The security configuration is added with loadFromExtension(), after the application one: it overrides the provider, login form and logout of the application main firewall. With false, no security configuration is added (neither the process_user_provider user provider nor the firewall): the application configures them, e.g. on a firewall dedicated to the UI. The option is read in prepend(), before the bundle configuration is processed: it must be a literal boolean. - monolog, doctrine_migrations and security configurations are skipped when the bundle is not enabled (getExtension() LogicException). - Docs: these configurations are appended, not prepended (only the Messenger one is); configuring the security in the application. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #169.
clever_age_ui_process.security.configure_firewalloption, defaulttrue(same behaviour as before). The bundle adds itssecurityconfiguration withloadFromExtension(), after the application one, so it overrides theprovider,form_loginandlogoutof the applicationmainfirewall. Withfalse, nosecurityconfiguration is added (neither theprocess_user_provideruser provider, which would also require an explicitprovideron every application firewall, nor the firewall): the application configures them, e.g. on a firewall dedicated to the UI.The option is read in
prepend(), before the bundle configuration is processed: it must be a literal boolean, a parameter or an environment variable fails with an explicit message.monolog,doctrine_migrationsandsecurityconfigurations are skipped when the bundle is not enabled (instead of theLogicExceptionofgetExtension()).prependExtensionConfig()was not used forsecurity: the application values would then win, which breaks the applications relying on the current behaviour (e.g. the default Symfony recipe withprovider: users_in_memoryonmain, as in the demo). To be reconsidered for 4.0.Checked in process-bundle-demo:
debug:config security firewalls.maingivesprovider: process_user_provider, login and dashboard OK (unchanged);configure_firewall: falsewith the dedicatedprocessfirewall of the documentation:mainkeepsprovider: users_in_memory;/processredirects to the login, login → dashboard (200), API with a wrong token → 401, logout → login.Requirements
Breaking changes
None: new option whose default keeps the current behaviour; the configurations skipped when their bundle is not enabled made the container fail before.
🤖 Generated with Claude Code