17 KiB
CHANGELOG
6.4
- Deprecate
Security::ACCESS_DENIED_ERROR,AUTHENTICATION_ERRORandLAST_USERNAMEconstants, use the ones onSecurityRequestAttributesinstead - Allow an array of
patternin firewall configuration - Add
$badgesargument toSecurity::login - Deprecate the
require_previous_sessionconfig option. Setting it has no effect anymore - Add
LogoutRouteLoader
6.3
- Deprecate enabling bundle and not configuring it
- Add
_statelessattribute to the request when firewall is stateless and the attribute is not already set - Add
StatelessAuthenticatorFactoryInterfacefor authenticators targetingstatelessfirewalls only and that don't require a user provider - Modify "icon.svg" to improve accessibility for blind/low vision users
- Make
Security::login()return the authenticator response - Deprecate the
security.firewalls.logout.csrf_token_generatorconfig option, usesecurity.firewalls.logout.csrf_token_managerinstead - Make firewalls event dispatcher traceable on debug mode
- Add
TokenHandlerFactoryInterface,OidcUserInfoTokenHandlerFactory,OidcTokenHandlerFactoryandServiceTokenHandlerFactoryforAccessTokenFactory
6.2
- Add the
Securityhelper class - Deprecate the
Symfony\Component\Security\Core\Securityservice alias, useSymfony\Bundle\SecurityBundle\Securityinstead - Add
Security::getFirewallConfig()to help to get the firewall configuration associated to the Request - Add
Security::login()to login programmatically - Add
Security::logout()to logout programmatically - Add
security.firewalls.logout.enable_csrfto enable CSRF protection using the default CSRF token generator - Add RFC6750 Access Token support to allow token-based authentication
- Add
security.firewalls.switch_user.target_routeoption to configure redirect target route on switch user - Deprecate the
security.enable_authenticator_managerconfig option
6.1
- The
security.access_controlnow accepts aRequestMatcherInterfaceunder therequest_matcheroption as scope configuration - The
security.access_controlnow accepts anattributesarray to match request attributes in theRequestMatcher - The
security.access_controlnow accepts arouteoption to match request route in theRequestMatcher - Display the inherited roles of the logged-in user in the Web Debug Toolbar
6.0
- The
security.authorization_checkerandsecurity.token_storageservices are now private - Remove
UserPasswordEncoderCommandclass and the correspondinguser:encode-passwordcommand, useUserPasswordHashCommandanduser:hash-passwordinstead - Remove the
security.encoder_factory.genericservice, thesecurity.encoder_factoryandSymfony\Component\Security\Core\Encoder\EncoderFactoryInterfacealiases, usesecurity.password_hasher_factoryandSymfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterfaceinstead - Remove the
security.user_password_encoder.genericservice, thesecurity.password_encoderand theSymfony\Component\Security\Core\Encoder\UserPasswordEncoderInterfacealiases, usesecurity.user_password_hasher,security.password_hasherandSymfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterfaceinstead - Remove the
logout.success_handlerandlogout.handlersconfig options, register a listener on theLogoutEventevent instead - Remove
FirewallConfig::getListeners(), useFirewallConfig::getAuthenticators()instead
5.4
- Deprecate
FirewallConfig::getListeners(), useFirewallConfig::getAuthenticators()instead - Deprecate
security.authentication.basic_entry_pointandsecurity.authentication.retry_entry_pointservices, the logic is moved into theHttpBasicAuthenticatorandChannelListenerrespectively - Deprecate
FirewallConfig::allowsAnonymous()and theallows_anonymousfrom the data collector data, there will be no anonymous concept as of version 6. - Deprecate not setting
$authenticatorManagerEnabledtotrueinSecurityDataCollectorandDebugFirewallCommand - Deprecate
SecurityFactoryInterfaceandSecurityExtension::addSecurityListenerFactory()in favor ofAuthenticatorFactoryInterfaceandSecurityExtension::addAuthenticatorFactory() - Add
AuthenticatorFactoryInterface::getPriority()which replacesSecurityFactoryInterface::getPosition() - Deprecate passing an array of arrays as 1st argument to
MainConfiguration, pass a sorted flat array of factories instead. - Deprecate the
always_authenticate_before_grantingoption - Display the roles of the logged-in user in the Web Debug Toolbar
- Add the
security.access_decision_manager.strategy_serviceoption - Deprecate not configuring explicitly a provider for custom_authenticators when there is more than one registered provider
5.3
- The authenticator system is no longer experimental
- Login Link functionality is no longer experimental
- Add
required_badgesfirewall config option - [BC break] Add
login_throttling.lock_factorysetting defaulting tonull(instead oflock.factory) - Add a
login_throttling.interval(insecurity.firewalls) option to change the default throttling interval. - Add the
debug:firewallcommand. - Deprecate
UserPasswordEncoderCommandclass and the correspondinguser:encode-passwordcommand, useUserPasswordHashCommandanduser:hash-passwordinstead - Deprecate the
security.encoder_factory.genericservice, thesecurity.encoder_factoryandSymfony\Component\Security\Core\Encoder\EncoderFactoryInterfacealiases, usesecurity.password_hasher_factoryandSymfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterfaceinstead - Deprecate the
security.user_password_encoder.genericservice, thesecurity.password_encoderand theSymfony\Component\Security\Core\Encoder\UserPasswordEncoderInterfacealiases, usesecurity.user_password_hasher,security.password_hasherandSymfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterfaceinstead - Deprecate the public
security.authorization_checkerandsecurity.token_storageservices to private - Not setting the
enable_authenticator_managerconfig option totrueis deprecated - Deprecate the
security.authentication.provider.*services, use the new authenticator system instead - Deprecate the
security.authentication.listener.*services, use the new authenticator system instead - Deprecate the Guard component integration, use the new authenticator system instead
- Add
form_login.form_onlyoption
5.2.0
- Added
FirewallListenerFactoryInterface, which can be implemented by security factories to add firewall listeners - Added
SortFirewallListenersPassto make the execution order of firewall listeners configurable by leveragingSymfony\Component\Security\Http\Firewall\FirewallListenerInterface - Added ability to use comma separated ip address list for
security.access_control - [BC break] Removed
EntryPointFactoryInterface, authenticators must now implementAuthenticationEntryPointInterfaceif they require autoregistration of a Security entry point.
5.1.0
- Added XSD for configuration
- Added security configuration for priority-based access decision strategy
- Marked the
AnonymousFactory,FormLoginFactory,FormLoginLdapFactory,GuardAuthenticationFactory,HttpBasicFactory,HttpBasicLdapFactory,JsonLoginFactory,JsonLoginLdapFactory,RememberMeFactory,RemoteUserFactoryandX509Factoryas@internal - Renamed method
AbstractFactory#createEntryPoint()toAbstractFactory#createDefaultEntryPoint()
5.0.0
- The
switch_user.statelessfirewall option has been removed. - Removed the ability to configure encoders using
argon2iorbcryptas algorithm, useautoinstead - The
simple_formandsimple_preauthauthentication listeners have been removed, use Guard instead. - The
SimpleFormFactoryandSimplePreAuthenticationFactoryclasses have been removed, use Guard instead. - Removed
LogoutUrlHelperandSecurityHelpertemplating helpers, use Twig instead - Removed the
logout_on_user_changefirewall option - Removed the
threadsencoder option - Removed the
security.authentication.trust_resolver.anonymous_classparameter - Removed the
security.authentication.trust_resolver.rememberme_classparameter - Removed the
security.user.provider.in_memory.userservice.
4.4.0
- Added
anonymous: lazymode to firewalls to make them (not) start the session as late as possible - Added
migrate_fromoption to encoders configuration. - Added new
argon2idencoder, undeprecated thebcryptandargon2iones (usingautois still recommended by default.) - Deprecated the usage of "query_string" without a "search_dn" and a "search_password" config key in Ldap factories.
- Marked the
SecurityDataCollectorclass as@final.
4.3.0
- Added new encoder types:
auto(recommended),nativeandsodium - The normalization of the cookie names configured in the
logout.delete_cookiesoption is deprecated and will be disabled in Symfony 5.0. This affects to cookies with dashes in their names. For example, starting from Symfony 5.0, themy-cookiename will deletemy-cookie(with a dash) instead ofmy_cookie(with an underscore).
4.2.0
- Using the
security.authentication.trust_resolver.anonymous_classandsecurity.authentication.trust_resolver.rememberme_classparameters to define the token classes is deprecated. To use custom tokens extend the existingSymfony\Component\Security\Core\Authentication\Token\AnonymousToken. orSymfony\Component\Security\Core\Authentication\Token\RememberMeToken. - Added
Symfony\Bundle\SecurityBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass - Added
json_login_ldapauthentication provider to use LDAP authentication with a REST API. - Made remember-me cookies inherit their default config from
framework.session.cookie_*and added an "auto" mode to their "secure" config option to make them secure on HTTPS automatically. - Deprecated the
simple_formandsimple_preauthauthentication listeners, use Guard instead. - Deprecated the
SimpleFormFactoryandSimplePreAuthenticationFactoryclasses, use Guard instead. - Added
portin access_control - Added individual voter decisions to the profiler
4.1.0
- The
switch_user.statelessfirewall option is deprecated, use thestatelessoption instead. - The
logout_on_user_changefirewall option is deprecated. - deprecated
SecurityUserValueResolver, useSymfony\Component\Security\Http\Controller\UserValueResolverinstead.
4.0.0
- removed
FirewallContext::getContext() - made
FirewallMap::$containerand::$mapprivate - made the first
UserPasswordEncoderCommand::_construct()argument mandatory UserPasswordEncoderCommanddoes not extendContainerAwareCommandanymore- removed support for voters that don't implement the
VoterInterface - removed HTTP digest authentication
- removed command
acl:setalong withSetAclCommandclass - removed command
init:aclalong withInitAclCommandclass - removed
aclconfiguration key and related services, use symfony/acl-bundle instead - removed auto picking the first registered provider when no configured provider on a firewall and ambiguous
- the firewall option
logout_on_user_changeis now always true, which will trigger a logout if the user changes between requests - the
switch_user.statelessfirewall option istruefor stateless firewalls
3.4.0
- Added new
security.helperservice that is an instance ofSymfony\Component\Security\Core\Securityand provides shortcuts for common security tasks. - Tagging voters with the
security.votertag without implementing theVoterInterfaceon the class is now deprecated and will be removed in 4.0. - [BC BREAK]
FirewallContext::getListeners()now returns\Traversable|array - added info about called security listeners in profiler
- Added
logout_on_user_changeto the firewall options. This config item will trigger a logout when the user has changed. Should be set to true to avoid deprecations in the configuration. - deprecated HTTP digest authentication
- deprecated command
acl:setalong withSetAclCommandclass - deprecated command
init:aclalong withInitAclCommandclass - Added support for the new Argon2i password encoder
- added
statelessoption to theswitch_userlistener - deprecated auto picking the first registered provider when no configured provider on a firewall and ambiguous
3.3.0
- Deprecated instantiating
UserPasswordEncoderCommandwithout its constructor arguments fully provided. - Deprecated
UserPasswordEncoderCommand::getContainer()and relying on theContainerAwareCommandsub class orContainerAwareInterfaceimplementation for this command. - Deprecated the
FirewallMap::$mapand$containerproperties. - [BC BREAK] Keys of the
usersnode forin_memoryuser provider are no longer normalized. - deprecated
FirewallContext::getListeners()
3.2.0
- Added the
SecurityUserValueResolverto inject the security users in actions viaSymfony\Component\Security\Core\User\UserInterfacein the method signature.
3.0.0
- Removed the
security.contextservice.
2.8.0
- deprecated the
keysetting ofanonymous,remember_meandhttp_digestin favor of thesecretsetting. - deprecated the
intentionfirewall listener setting in favor of thecsrf_token_id.
2.6.0
- Added the possibility to override the default success/failure handler to get the provider key and the options injected
- Deprecated the
security.contextservice for thesecurity.token_storageandsecurity.authorization_checkerservices.
2.4.0
- Added 'host' option to firewall configuration
- Added 'csrf_token_generator' and 'csrf_token_id' options to firewall logout listener configuration to supersede/alias 'csrf_provider' and 'intention' respectively
- Moved 'security.secure_random' service configuration to FrameworkBundle
2.3.0
- allowed for multiple IP address in security access_control rules
2.2.0
- Added PBKDF2 Password encoder
- Added BCrypt password encoder
2.1.0
-
[BC BREAK] The custom factories for the firewall configuration are now registered during the build method of bundles instead of being registered by the end-user (you need to remove the 'factories' keys in your security configuration).
-
[BC BREAK] The Firewall listener is now registered after the Router one. This means that specific Firewall URLs (like /login_check and /logout must now have proper route defined in your routing configuration)
-
[BC BREAK] refactored the user provider configuration. The configuration changed for the chain provider and the memory provider:
Before:
security: providers: my_chain_provider: providers: [my_memory_provider, my_doctrine_provider] my_memory_provider: users: toto: { password: foobar, roles: [ROLE_USER] } foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] }After:
security: providers: my_chain_provider: chain: providers: [my_memory_provider, my_doctrine_provider] my_memory_provider: memory: users: toto: { password: foobar, roles: [ROLE_USER] } foo: { password: bar, roles: [ROLE_USER, ROLE_ADMIN] } -
[BC BREAK] Method
equalswas removed fromUserInterfaceto its own newEquatableInterface. The user class can now implement this interface to override the default implementation of users equality test. -
added a validator for the user password
-
added 'erase_credentials' as a configuration key (true by default)
-
added new events:
security.authentication.successandsecurity.authentication.failurefired on authentication success/failure, regardless of authentication method, events are defined in new event class:Symfony\Component\Security\Core\AuthenticationEvents. -
Added optional CSRF protection to LogoutListener:
security: firewalls: default: logout: path: /logout_path target: / csrf_parameter: _csrf_token # Optional (defaults to "_csrf_token") csrf_provider: security.csrf.token_generator # Required to enable protection intention: logout # Optional (defaults to "logout")If the LogoutListener has CSRF protection enabled but cannot validate a token, then a LogoutException will be thrown.
-
Added
logout_urltemplating helper and Twig extension, which may be used to generate logout URL's within templates. The security firewall's config key must be specified. If a firewall's logout listener has CSRF protection enabled, a token will be automatically added to the generated URL.