Skip to content

Commit

Permalink
Prepare for Spring Security 6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jzheaux committed Jun 22, 2023
1 parent 2e4b417 commit fb910e2
Show file tree
Hide file tree
Showing 13 changed files with 5,175 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public BeanDefinition parse(Element element, ParserContext pc) {
if (!namespaceMatchesVersion(element)) {
pc.getReaderContext().fatal("You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd or "
+ "spring-security-3.1.xsd schema or spring-security-3.2.xsd schema or spring-security-4.0.xsd schema "
+ "with Spring Security 6.1. Please update your schema declarations to the 6.1 schema.", element);
+ "with Spring Security 6.2. Please update your schema declarations to the 6.2 schema.", element);
}
String name = pc.getDelegate().getLocalName(element);
BeanDefinitionParser parser = this.parsers.get(name);
Expand Down Expand Up @@ -218,7 +218,7 @@ private boolean namespaceMatchesVersion(Element element) {

private boolean matchesVersionInternal(Element element) {
String schemaLocation = element.getAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "schemaLocation");
return schemaLocation.matches("(?m).*spring-security-6\\.1.*.xsd.*")
return schemaLocation.matches("(?m).*spring-security-6\\.2.*.xsd.*")
|| schemaLocation.matches("(?m).*spring-security.xsd.*")
|| !schemaLocation.matches("(?m).*spring-security.*");
}
Expand Down
6 changes: 4 additions & 2 deletions config/src/main/resources/META-INF/spring.schemas
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.1.xsd
http\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.2.xsd
http\://www.springframework.org/schema/security/spring-security-6.2.xsd=org/springframework/security/config/spring-security-6.2.xsd
http\://www.springframework.org/schema/security/spring-security-6.1.xsd=org/springframework/security/config/spring-security-6.1.xsd
http\://www.springframework.org/schema/security/spring-security-6.0.xsd=org/springframework/security/config/spring-security-6.0.xsd
http\://www.springframework.org/schema/security/spring-security-5.8.xsd=org/springframework/security/config/spring-security-5.8.xsd
Expand All @@ -21,7 +22,8 @@ http\://www.springframework.org/schema/security/spring-security-2.0.xsd=org/spri
http\://www.springframework.org/schema/security/spring-security-2.0.1.xsd=org/springframework/security/config/spring-security-2.0.1.xsd
http\://www.springframework.org/schema/security/spring-security-2.0.2.xsd=org/springframework/security/config/spring-security-2.0.2.xsd
http\://www.springframework.org/schema/security/spring-security-2.0.4.xsd=org/springframework/security/config/spring-security-2.0.4.xsd
https\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.1.xsd
https\://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-6.2.xsd
https\://www.springframework.org/schema/security/spring-security-6.2.xsd=org/springframework/security/config/spring-security-6.2.xsd
https\://www.springframework.org/schema/security/spring-security-6.1.xsd=org/springframework/security/config/spring-security-6.1.xsd
https\://www.springframework.org/schema/security/spring-security-6.0.xsd=org/springframework/security/config/spring-security-6.0.xsd
https\://www.springframework.org/schema/security/spring-security-5.8.xsd=org/springframework/security/config/spring-security-5.8.xsd
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class XsdDocumentedTests {

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

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

XmlSupport xml = new XmlSupport();

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/security org/springframework/security/config/spring-security-6.1.xsd">
http://www.springframework.org/schema/security org/springframework/security/config/spring-security-6.2.xsd">

<tx:annotation-driven />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public final class SpringSecurityCoreVersion {
* N.B. Classes are not intended to be serializable between different versions. See
* SEC-1709 for why we still need a serial version.
*/
public static final long SERIAL_VERSION_UID = 610L;
public static final long SERIAL_VERSION_UID = 620L;

static final String MIN_SPRING_VERSION = getSpringVersion();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This appendix provides a reference to the elements available in the security nam
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.
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.
The namespace is written in https://relaxng.org/[RELAX NG] Compact format and later converted into an XSD schema.
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.
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.
41 changes: 2 additions & 39 deletions docs/modules/ROOT/pages/whats-new.adoc
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
[[new]]
= What's New in Spring Security 6.1
= What's New in Spring Security 6.2

Spring Security 6.1 provides a number of new features.
Spring Security 6.2 provides a number of new features.
Below are the highlights of the release.

== Core

* https://github.com/spring-projects/spring-security/issues/12233[gh-12233] - SecuredAuthorizationManager allows customizing underlying AuthorizationManager
* https://github.com/spring-projects/spring-security/issues/12231[gh-12231] - Add Authority Collection Authorization Manager

== OAuth 2.0

* https://github.com/spring-projects/spring-security/issues/10309[gh-10309] - xref:servlet/oauth2/resource-server/jwt.adoc[(docs)] - Add Nimbus(Reactive)JwtDecoder#withIssuerLocation
* https://github.com/spring-projects/spring-security/issues/12907[gh-12907] - Configure principal claim name in ReactiveJwtAuthenticationConverter

== SAML 2.0

* https://github.com/spring-projects/spring-security/issues/12604[gh-12604] - Support AuthnRequestSigned metadata attribute
* https://github.com/spring-projects/spring-security/issues/12846[gh-12846] - Metadata supports multiple entities and EntitiesDescriptor
* https://github.com/spring-projects/spring-security/issues/11828[gh-11828] - xref:servlet/saml2/metadata.adoc[(docs)] - Add saml2Metadata to DSL
* 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
* 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
* https://github.com/spring-projects/spring-security/issues/12842[gh-12842] - Add RelyingPartyRegistration placeholder resolution component
* https://github.com/spring-projects/spring-security/issues/12845[gh-12845] - Support issuing LogoutResponse after already logged out

== Observability

* https://github.com/spring-projects/spring-security/issues/12534[gh-12534] - Customize Authentication and Authorization observation conventions

== Web

* https://github.com/spring-projects/spring-security/issues/12751[gh-12751] - Add RequestMatchers factory class
* https://github.com/spring-projects/spring-security/issues/12847[gh-12847] - Propagate variables through And and OrRequestMatcher

== Docs

In our ongoing efforts to update Spring Security's documentation, several additional sections were fully re-written:

* https://github.com/spring-projects/spring-security/issues/13088[gh-13088] - xref:servlet/authorization/index.adoc[(docs)] - Revisit Authorization documentation
* https://github.com/spring-projects/spring-security/issues/12681[gh-12681] - xref:servlet/authentication/session-management.adoc[(docs)] - Revisit Session Management documentation
* https://github.com/spring-projects/spring-security/issues/13062[gh-13062] - xref:servlet/authentication/logout.adoc[(docs)] - Revisit Logout documentation
* https://github.com/spring-projects/spring-security/issues/13089[gh-13089] - Revisit CSRF Documentation
2 changes: 1 addition & 1 deletion git/hooks/prepare-forward-merge
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require 'net/http'
require 'yaml'
require 'logger'

$main_branch = "6.1.x"
$main_branch = "6.2.x"

$log = Logger.new(STDOUT)
$log.level = Logger::WARN
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ springBootVersion=3.1.1
springFrameworkVersion=6.0.10
micrometerVersion=1.10.8
openSamlVersion=4.1.1
version=6.1.2-SNAPSHOT
version=6.2.0-SNAPSHOT
kotlinVersion=1.8.22
samplesBranch=main
org.gradle.jvmargs=-Xmx3g -XX:+HeapDumpOnOutOfMemoryError
Expand Down
2 changes: 1 addition & 1 deletion taglibs/src/main/resources/META-INF/security.tld
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
version="2.0">
<description>Spring Security Authorization Tag Library</description>

<tlib-version>6.1</tlib-version>
<tlib-version>6.2</tlib-version>
<short-name>security</short-name>
<uri>http://www.springframework.org/security/tags</uri>

Expand Down

0 comments on commit fb910e2

Please sign in to comment.