@ -8,7 +8,7 @@ As a major release version, the Spring Security team took the opportunity to mak
@@ -8,7 +8,7 @@ As a major release version, the Spring Security team took the opportunity to mak
A complete listing of non-passive changes between 3.x and 4.x can be found in https://jira.spring.io/issues/?jql=project%20%3D%20SEC%20AND%20status%20in%20(Resolved%2C%20Closed)%20AND%20fixVersion%20in%20(4.0.0.M1%2C%204.0.0.M2%2C%204.0.0.RC1%2C%204.0.0.RC2)%20AND%20labels%20%3D%20passivity[JIRA]
A complete listing of non-passive changes between 3.x and 4.x can be found in https://jira.spring.io/issues/?jql=project%20%3D%20SEC%20AND%20status%20in%20(Resolved%2C%20Closed)%20AND%20fixVersion%20in%20(4.0.0%2C%204.0.0.M1%2C%204.0.0.M2%2C%204.0.0.RC1%2C%204.0.0.RC2)%20AND%20labels%20%3D%20passivity[JIRA]
This guide is intended to help users migrate from Spring Security 3.x to Spring Security 4.x.
NOTE: It is expected that users will be able to easily perform a successful migration within an hour.
@ -17,9 +17,31 @@ NOTE: It is expected that users will be able to easily perform a successful migr
@@ -17,9 +17,31 @@ NOTE: It is expected that users will be able to easily perform a successful migr
== Migrate XML Namespace Defaults
We updated the default values for many of the Spring Security XML Namespace Elements.
If you do not use XML based configuration, you may safely skip this section and proceed to <<m3to4-filter-urls>>
You can find a detailed list of changes and how to address them below.
NOTE: If you do not use XML based configuration, you may safely skip this section and proceed to <<m3to4-filter-urls>>
[[m3to4-xmlnamespace-related]]
=== Related Links
For thoroughness we have include the related links in the table below.
new DefaultPermissionGrantingStrategy(auditLogger);
new EhCacheBasedAclCache(ehCache, permissionGrantingStrategy);
----
=== spring-security-cas
==== ServiceAuthenticationDetailsSource
`ServiceAuthenticationDetailsSource` removed the deprecated construtors that defaulted the `ServiceProperties`.
[source,java]
----
@Deprecated
public ServiceAuthenticationDetailsSource() {
...
}
@Deprecated
public ServiceAuthenticationDetailsSource(final String artifactParameterName) {
...
}
----
This means that an `ServiceAuthenticationDetailsSource` was being created with these constructors:
[source,java]
----
new ServiceAuthenticationDetailsSource();
new ServiceAuthenticationDetailsSource(artifactId);
----
it needs to be updated to pass in the `ServiceProperties` as shown below:
[source,java]
----
new ServiceAuthenticationDetailsSource(serviceProperties);
new ServiceAuthenticationDetailsSource(serviceProperties, artifactId);
----
=== spring-security-config
==== filter-invocation-definition-source
The XML element `filter-invocation-definition-source` was removed in favor of <<nsa-filter-security-metadata-source,filter-security-metadata-source>>.
This means if you have something like this:
[source,xml]
----
<filter-invocation-definition-source ...>
...
</filter-invocation-definition-source>
----
it needs to be replaced with:
[source,xml]
----
<filter-security-metadata-source ...>
...
</filter-security-metadata-source>
----
==== http@access-denied-page
The XML attribute `http@access-denied-page` was removed in favor of <<nsa-access-denied-handler-error-page,access-denied-handler@error-page>>.
This means if you have something like this:
[source,xml]
----
<http ... access-denied-page="/denied">
...
</http>
----
it needs to be replaced with:
[source,xml]
----
<http ...>
<access-denied-handler error-page="/denied"/>
</http>
----
==== http@path-type
The XML attribute `http@path-type` was removed in favor of <<nsa-http-request-matcher,http@request-matcher>>.
This means if you have something like this:
[source,xml]
----
<http ... path-type="regex">
...
</http>
----
it needs to be replaced with:
[source,xml]
----
<http ... request-matcher="regex">
...
</http>
----
==== filter-chain-map@path-type
The XML attribute `filter-chain-map@path-type` was removed in favor of <<nsa-filter-chain-map-request-matcher,filter-chain-map@request-matcher>>.
This means if you have something like this:
[source,xml]
----
<filter-chain-map ... path-type="regex">
...
</filter-chain-map>
----
it needs to be replaced with:
[source,xml]
----
<filter-chain-map ... request-matcher="regex">
...
</filter-chain-map>
----
==== filter-security-metadata-source@path-type
The XML attribute `filter-security-metadata-source@path-type` was removed in favor of <<nsa-filter-security-metadata-source-request-matcher,filter-security-metadata-source@request-matcher>>.