4.x.x release notes
4.1.0.RELEASE
-
Requires Across 5.1.0
-
Changed
SwitchUserGrantedAuthorityusages to non-null parameter forAuthentication -
Switched to JUnit5
4.0.0.RELEASE
This release requires Across 5.0.1 and has been updated to work with Spring Security 5.
Additionally the SecurityPrincipal infrastructure has been extended to work more through a SecurityPrincipalId.
This should ensure better interoperability with regular Spring security as well as avoid typical serialization problems (as authentication tokens are often serialized, eg in session storage).
Breaking changes:
-
SpringSecurityWebConfigurerandSpringSecurityWebConfigurerAdapterhave been replaced by the singleAcrossWebSecurityConfigurerinterface -
SecurityPrincipalServiceandSecurityPrincipalRetrievalStrategynow always return Optional -
SecurityPrincipalExceptionhas been removed
Additional, possibly breaking changes:
-
addition of
SecurityPrincipalIdand@CurrentSecurityPrincipaland reworking of default authentication-
the
SecurityPrincipalAuthenticationno longer holds the actualSecurityPrincipalinternally but only theSecurityPrincipalId -
use either
CurrentSecurityPrincipalProxy.getPrincipal(Class<? extends SecurityPrincipal>)to retrieve the actualSecurityPrincipal -
alternatively use
@CurrentSecurityPrincipalinstead of@AuthenticationPrincipal(the latter now only returns theSecurityPrincipalId)
-
-
CurrentSecurityPrincipalProxy.isAuthenticated()now returnsfalsewith an anonymous authentication-
the
AuthenticationTrustResolveris used to determine if an authentication should be considered anonymous
-
-
a new
SecurityPrincipalReferencehas been provided which exposes aSecurityPrincipalId-
it can be used to connect custom
Authenticationprincipals to aSecurityPrincipaland allow theCurrentSecurityPrincipalinfrastructure to resolve the target -
a
SecurityPrincipalUserDetailsimplementation has been provided as well, which extendsUserDetailswith a uniqueSecurityPrincipalId
-
-
an
AuthenticationSecurityPrincipalResolverservice is available for retrieving the possibleSecurityPrincipalthat is represented by anAuthentication-
it supports different
SecurityPrincipalrepresentations: embeddedSecurityPrincipal,SecurityPrincipalId,SecurityPrincipalReferenceorStringwhich represents theSecurityPrincipalId
-
-
SpringSecurityInfrastructureModule (automatically added to an Across context) now extends AcrossContextInfrastructureModule instead of bootstrapping its own
ApplicationContext-
this is a minor performance improvement
-
any code directly using SpringSecurityInfrastructureModule bean factory should switch to the AcrossContextInfrastructureModule bean factory instead
-