4.x.x release notes
4.1.0.RELEASE
-
Requires Across 5.1.0
-
Changed
SwitchUserGrantedAuthority
usages 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:
-
SpringSecurityWebConfigurer
andSpringSecurityWebConfigurerAdapter
have been replaced by the singleAcrossWebSecurityConfigurer
interface -
SecurityPrincipalService
andSecurityPrincipalRetrievalStrategy
now always return Optional -
SecurityPrincipalException
has been removed
Additional, possibly breaking changes:
-
addition of
SecurityPrincipalId
and@CurrentSecurityPrincipal
and reworking of default authentication-
the
SecurityPrincipalAuthentication
no longer holds the actualSecurityPrincipal
internally but only theSecurityPrincipalId
-
use either
CurrentSecurityPrincipalProxy.getPrincipal(Class<? extends SecurityPrincipal>)
to retrieve the actualSecurityPrincipal
-
alternatively use
@CurrentSecurityPrincipal
instead of@AuthenticationPrincipal
(the latter now only returns theSecurityPrincipalId
)
-
-
CurrentSecurityPrincipalProxy.isAuthenticated()
now returnsfalse
with an anonymous authentication-
the
AuthenticationTrustResolver
is used to determine if an authentication should be considered anonymous
-
-
a new
SecurityPrincipalReference
has been provided which exposes aSecurityPrincipalId
-
it can be used to connect custom
Authentication
principals to aSecurityPrincipal
and allow theCurrentSecurityPrincipal
infrastructure to resolve the target -
a
SecurityPrincipalUserDetails
implementation has been provided as well, which extendsUserDetails
with a uniqueSecurityPrincipalId
-
-
an
AuthenticationSecurityPrincipalResolver
service is available for retrieving the possibleSecurityPrincipal
that is represented by anAuthentication
-
it supports different
SecurityPrincipal
representations: embeddedSecurityPrincipal
,SecurityPrincipalId
,SecurityPrincipalReference
orString
which 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
-