Skip to content

Commit fb910e2

Browse files
committed
Prepare for Spring Security 6.2
Closes gh-14316
1 parent 2e4b417 commit fb910e2

File tree

13 files changed

+5175
-52
lines changed

13 files changed

+5175
-52
lines changed

config/src/main/java/org/springframework/security/config/SecurityNamespaceHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public BeanDefinition parse(Element element, ParserContext pc) {
9595
if (!namespaceMatchesVersion(element)) {
9696
pc.getReaderContext().fatal("You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd or "
9797
+ "spring-security-3.1.xsd schema or spring-security-3.2.xsd schema or spring-security-4.0.xsd schema "
98-
+ "with Spring Security 6.1. Please update your schema declarations to the 6.1 schema.", element);
98+
+ "with Spring Security 6.2. Please update your schema declarations to the 6.2 schema.", element);
9999
}
100100
String name = pc.getDelegate().getLocalName(element);
101101
BeanDefinitionParser parser = this.parsers.get(name);
@@ -218,7 +218,7 @@ private boolean namespaceMatchesVersion(Element element) {
218218

219219
private boolean matchesVersionInternal(Element element) {
220220
String schemaLocation = element.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation");
221-
return schemaLocation.matches("(?m).*spring-security-6\\.1.*.xsd.*")
221+
return schemaLocation.matches("(?m).*spring-security-6\\.2.*.xsd.*")
222222
|| schemaLocation.matches("(?m).*spring-security.xsd.*")
223223
|| !schemaLocation.matches("(?m).*spring-security.*");
224224
}

config/src/main/resources/META-INF/spring.schemas

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.1.xsd
1+
http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.2.xsd
2+
http\://www.springframework.org/schema/security/spring-security-6.2.xsd=org/springframework/security/config/spring-security-6.2.xsd
23
http\://www.springframework.org/schema/security/spring-security-6.1.xsd=org/springframework/security/config/spring-security-6.1.xsd
34
http\://www.springframework.org/schema/security/spring-security-6.0.xsd=org/springframework/security/config/spring-security-6.0.xsd
45
http\://www.springframework.org/schema/security/spring-security-5.8.xsd=org/springframework/security/config/spring-security-5.8.xsd
@@ -21,7 +22,8 @@ http\://www.springframework.org/schema/security/spring-security-2.0.xsd=org/spri
2122
http\://www.springframework.org/schema/security/spring-security-2.0.1.xsd=org/springframework/security/config/spring-security-2.0.1.xsd
2223
http\://www.springframework.org/schema/security/spring-security-2.0.2.xsd=org/springframework/security/config/spring-security-2.0.2.xsd
2324
http\://www.springframework.org/schema/security/spring-security-2.0.4.xsd=org/springframework/security/config/spring-security-2.0.4.xsd
24-
https\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.1.xsd
25+
https\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.2.xsd
26+
https\://www.springframework.org/schema/security/spring-security-6.2.xsd=org/springframework/security/config/spring-security-6.2.xsd
2527
https\://www.springframework.org/schema/security/spring-security-6.1.xsd=org/springframework/security/config/spring-security-6.1.xsd
2628
https\://www.springframework.org/schema/security/spring-security-6.0.xsd=org/springframework/security/config/spring-security-6.0.xsd
2729
https\://www.springframework.org/schema/security/spring-security-5.8.xsd=org/springframework/security/config/spring-security-5.8.xsd

config/src/main/resources/org/springframework/security/config/spring-security-6.2.rnc

Lines changed: 1346 additions & 0 deletions
Large diffs are not rendered by default.

config/src/main/resources/org/springframework/security/config/spring-security-6.2.xsd

Lines changed: 3812 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
spring-security-6.1.xsd
1+
spring-security-6.2.xsd

config/src/test/java/org/springframework/security/config/doc/XsdDocumentedTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public class XsdDocumentedTests {
6565

6666
String schema31xDocumentLocation = "org/springframework/security/config/spring-security-3.1.xsd";
6767

68-
String schemaDocumentLocation = "org/springframework/security/config/spring-security-6.1.xsd";
68+
String schemaDocumentLocation = "org/springframework/security/config/spring-security-6.2.xsd";
6969

7070
XmlSupport xml = new XmlSupport();
7171

@@ -151,7 +151,7 @@ public void sizeWhenReadingFilesystemThenIsCorrectNumberOfSchemaFiles() throws I
151151
.list((dir, name) -> name.endsWith(".xsd"));
152152
// @formatter:on
153153
assertThat(schemas.length)
154-
.withFailMessage("the count is equal to 23, if not then schemaDocument needs updating").isEqualTo(23);
154+
.withFailMessage("the count is equal to 24, if not then schemaDocument needs updating").isEqualTo(24);
155155
}
156156

157157
/**

config/src/test/resources/org/springframework/security/config/method-security.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
xmlns:tx="http://www.springframework.org/schema/tx"
77
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd
88
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd
9-
http://www.springframework.org/schema/security org/springframework/security/config/spring-security-6.1.xsd">
9+
http://www.springframework.org/schema/security org/springframework/security/config/spring-security-6.2.xsd">
1010

1111
<tx:annotation-driven />
1212

core/src/main/java/org/springframework/security/core/SpringSecurityCoreVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public final class SpringSecurityCoreVersion {
4343
* N.B. Classes are not intended to be serializable between different versions. See
4444
* SEC-1709 for why we still need a serial version.
4545
*/
46-
public static final long SERIAL_VERSION_UID = 610L;
46+
public static final long SERIAL_VERSION_UID = 620L;
4747

4848
static final String MIN_SPRING_VERSION = getSpringVersion();
4949

docs/modules/ROOT/pages/servlet/appendix/namespace/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ This appendix provides a reference to the elements available in the security nam
66
If you haven't used the namespace before, please read the xref:servlet/configuration/xml-namespace.adoc#ns-config[introductory chapter] on namespace configuration, as this is intended as a supplement to the information there.
77
Using a good quality XML editor while editing a configuration based on the schema is recommended as this will provide contextual information on which elements and attributes are available as well as comments explaining their purpose.
88
The namespace is written in https://relaxng.org/[RELAX NG] Compact format and later converted into an XSD schema.
9-
If you are familiar with this format, you may wish to examine the https://raw.githubusercontent.com/spring-projects/spring-security/main/config/src/main/resources/org/springframework/security/config/spring-security-6.1.rnc[schema file] directly.
9+
If you are familiar with this format, you may wish to examine the https://raw.githubusercontent.com/spring-projects/spring-security/main/config/src/main/resources/org/springframework/security/config/spring-security-6.2.rnc[schema file] directly.
Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,6 @@
11
[[new]]
2-
= What's New in Spring Security 6.1
2+
= What's New in Spring Security 6.2
33

4-
Spring Security 6.1 provides a number of new features.
4+
Spring Security 6.2 provides a number of new features.
55
Below are the highlights of the release.
66

7-
== Core
8-
9-
* https://github.com/spring-projects/spring-security/issues/12233[gh-12233] - SecuredAuthorizationManager allows customizing underlying AuthorizationManager
10-
* https://github.com/spring-projects/spring-security/issues/12231[gh-12231] - Add Authority Collection Authorization Manager
11-
12-
== OAuth 2.0
13-
14-
* https://github.com/spring-projects/spring-security/issues/10309[gh-10309] - xref:servlet/oauth2/resource-server/jwt.adoc[(docs)] - Add Nimbus(Reactive)JwtDecoder#withIssuerLocation
15-
* https://github.com/spring-projects/spring-security/issues/12907[gh-12907] - Configure principal claim name in ReactiveJwtAuthenticationConverter
16-
17-
== SAML 2.0
18-
19-
* https://github.com/spring-projects/spring-security/issues/12604[gh-12604] - Support AuthnRequestSigned metadata attribute
20-
* https://github.com/spring-projects/spring-security/issues/12846[gh-12846] - Metadata supports multiple entities and EntitiesDescriptor
21-
* https://github.com/spring-projects/spring-security/issues/11828[gh-11828] - xref:servlet/saml2/metadata.adoc[(docs)] - Add saml2Metadata to DSL
22-
* https://github.com/spring-projects/spring-security/issues/12843[gh-12843] - xref:servlet/saml2/logout.adoc[(docs)] - Allow Relying Party to be Deduced from LogoutRequest
23-
* https://github.com/spring-projects/spring-security/issues/10243[gh-10243] - xref:servlet/saml2/login/authentication.adoc[(docs)] - Allow Relying Party to be Deduced from SAML Response
24-
* https://github.com/spring-projects/spring-security/issues/12842[gh-12842] - Add RelyingPartyRegistration placeholder resolution component
25-
* https://github.com/spring-projects/spring-security/issues/12845[gh-12845] - Support issuing LogoutResponse after already logged out
26-
27-
== Observability
28-
29-
* https://github.com/spring-projects/spring-security/issues/12534[gh-12534] - Customize Authentication and Authorization observation conventions
30-
31-
== Web
32-
33-
* https://github.com/spring-projects/spring-security/issues/12751[gh-12751] - Add RequestMatchers factory class
34-
* https://github.com/spring-projects/spring-security/issues/12847[gh-12847] - Propagate variables through And and OrRequestMatcher
35-
36-
== Docs
37-
38-
In our ongoing efforts to update Spring Security's documentation, several additional sections were fully re-written:
39-
40-
* https://github.com/spring-projects/spring-security/issues/13088[gh-13088] - xref:servlet/authorization/index.adoc[(docs)] - Revisit Authorization documentation
41-
* https://github.com/spring-projects/spring-security/issues/12681[gh-12681] - xref:servlet/authentication/session-management.adoc[(docs)] - Revisit Session Management documentation
42-
* https://github.com/spring-projects/spring-security/issues/13062[gh-13062] - xref:servlet/authentication/logout.adoc[(docs)] - Revisit Logout documentation
43-
* https://github.com/spring-projects/spring-security/issues/13089[gh-13089] - Revisit CSRF Documentation

git/hooks/prepare-forward-merge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require 'net/http'
44
require 'yaml'
55
require 'logger'
66

7-
$main_branch = "6.1.x"
7+
$main_branch = "6.2.x"
88

99
$log = Logger.new(STDOUT)
1010
$log.level = Logger::WARN

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ springBootVersion=3.1.1
55
springFrameworkVersion=6.0.10
66
micrometerVersion=1.10.8
77
openSamlVersion=4.1.1
8-
version=6.1.2-SNAPSHOT
8+
version=6.2.0-SNAPSHOT
99
kotlinVersion=1.8.22
1010
samplesBranch=main
1111
org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError

taglibs/src/main/resources/META-INF/security.tld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
version="2.0">
2121
<description>Spring Security Authorization Tag Library</description>
2222

23-
<tlib-version>6.1</tlib-version>
23+
<tlib-version>6.2</tlib-version>
2424
<short-name>security</short-name>
2525
<uri>http://www.springframework.org/security/tags</uri>
2626

0 commit comments

Comments
 (0)