From 39588bc7fbad9d26b58c372c041e3c84c5be4f05 Mon Sep 17 00:00:00 2001 From: Ludovic Orban Date: Wed, 4 Nov 2020 17:25:11 +0100 Subject: [PATCH 01/45] add GPG key and developer tag Signed-off-by: Ludovic Orban --- KEYS.txt | 1 + pom.xml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/KEYS.txt b/KEYS.txt index 5db338b664f..a06df399e97 100644 --- a/KEYS.txt +++ b/KEYS.txt @@ -6,3 +6,4 @@ Joakim Erdfelt B59B 67FD 7904 9843 67F9 3180 0818 Joakim Erdfelt BFBB 21C2 46D7 7768 3628 7A48 A04E 0C74 ABB3 5FEA Simone Bordet 8B09 6546 B1A8 F026 56B1 5D3B 1677 D141 BCF3 584D Olivier Lamy F254 B356 17DC 255D 9344 BCFA 873A 8E86 B437 2146 +Ludovic Orban E224 88CC 94F6 3E3F C928 536C 4241 C082 70D9 99C3 diff --git a/pom.xml b/pom.xml index 6ba95f15ebc..7b194897c5f 100644 --- a/pom.xml +++ b/pom.xml @@ -1668,6 +1668,14 @@ https://webtide.com Australia/Brisbane + + lorban + Ludovic Orban + lorban@bitronix.be + Webtide, LLC + https://webtide.com + 1 + From be955c7a98984d4fb94e44bdaa32e1c7721a7cb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 06:24:41 +0000 Subject: [PATCH 02/45] Bump maven-enforcer-plugin from 3.0.0-M2 to 3.0.0-M3 Bumps [maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.0.0-M2 to 3.0.0-M3. - [Release notes](https://github.com/apache/maven-enforcer/releases) - [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.0.0-M2...enforcer-3.0.0-M3) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f881dd28394..5299299df5f 100644 --- a/pom.xml +++ b/pom.xml @@ -519,7 +519,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.0.0-M2 + 3.0.0-M3 org.apache.maven.plugins From 8976f7966535a37b9d13537e9b0adaedcf0ed757 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 06:24:42 +0000 Subject: [PATCH 03/45] Bump maven.plugin-tools.version from 3.5.2 to 3.6.0 Bumps `maven.plugin-tools.version` from 3.5.2 to 3.6.0. Updates `maven-plugin-tools-api` from 3.5.2 to 3.6.0 - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.5.2...maven-plugin-tools-3.6.0) Updates `maven-plugin-annotations` from 3.5.2 to 3.6.0 - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.5.2...maven-plugin-tools-3.6.0) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f881dd28394..e778712cc6a 100644 --- a/pom.xml +++ b/pom.xml @@ -54,7 +54,7 @@ 3.2.0 3.2.1 3.3.1 - 3.5.2 + 3.6.0 3.0.0-M1 3.0.0-M1 From 921d9963a8e1f5cf660ff7e431dc69eae7652c9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 06:25:14 +0000 Subject: [PATCH 04/45] Bump testcontainers.version from 1.15.0-rc2 to 1.15.0 Bumps `testcontainers.version` from 1.15.0-rc2 to 1.15.0. Updates `testcontainers` from 1.15.0-rc2 to 1.15.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.0-rc2...1.15.0) Updates `junit-jupiter` from 1.15.0-rc2 to 1.15.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.0-rc2...1.15.0) Updates `mariadb` from 1.15.0-rc2 to 1.15.0 - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.15.0-rc2...1.15.0) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f881dd28394..8e4e2a9f32a 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ ${project.build.directory}/local-repo src/it/settings.xml 0 - 1.15.0-rc2 + 1.15.0 From fae61def7be52bfacb69ccb7d8c1ffe192dd4b63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 06:25:32 +0000 Subject: [PATCH 05/45] Bump hazelcast.version from 4.0.1 to 4.1 Bumps `hazelcast.version` from 4.0.1 to 4.1. Updates `hazelcast` from 4.0.1 to 4.1 - [Release notes](https://github.com/hazelcast/hazelcast/releases) - [Commits](https://github.com/hazelcast/hazelcast/compare/v4.0.1...v4.1) Updates `hazelcast-all` from 4.0.1 to 4.1 - [Release notes](https://github.com/hazelcast/hazelcast/releases) - [Commits](https://github.com/hazelcast/hazelcast/compare/v4.0.1...v4.1) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0834647a047..3c978a725d8 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 4.3.4.Final 2.8.6 2.0.10 - 4.0.1 + 4.1 2.5.1 9.0 1.26 From 4f9af21d591616a2b1d3459d26cb51a0c24f857a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 06:25:54 +0000 Subject: [PATCH 06/45] Bump tycho-version from 2.0.0 to 2.1.0 Bumps `tycho-version` from 2.0.0 to 2.1.0. Updates `tycho-pack200a-plugin` from 2.0.0 to 2.1.0 Updates `tycho-pack200b-plugin` from 2.0.0 to 2.1.0 Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0834647a047..b52e157e18b 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ 9.0 1.26 benchmarks - 2.0.0 + 2.1.0 5.7.0 3.6.3 1.6.1 From 4c172b5bbbcd367cd5e94e1e248d7e69152c4da1 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 9 Nov 2020 23:30:36 +1100 Subject: [PATCH 07/45] Fix xml tags using id instead of refid. Signed-off-by: Lachlan Roberts --- .../jetty-simple-webapp/src/base/etc/test-jetty.xml | 2 +- jetty-maven-plugin/src/main/resources/maven.xml | 6 +++--- .../src/main/config/etc/sessions/jdbc/session-store.xml | 2 +- .../sessions/session-data-cache/session-caching-store.xml | 6 +++--- .../test-jndi-webapp/src/main/webapp/WEB-INF/jetty-env.xml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/src/base/etc/test-jetty.xml b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/src/base/etc/test-jetty.xml index 52e0cc6be76..8c1d9dbef70 100644 --- a/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/src/base/etc/test-jetty.xml +++ b/jetty-maven-plugin/src/it/jetty-run-distro-mojo-it/jetty-simple-webapp/src/base/etc/test-jetty.xml @@ -1,7 +1,7 @@ - + diff --git a/jetty-maven-plugin/src/main/resources/maven.xml b/jetty-maven-plugin/src/main/resources/maven.xml index 8a454960d9d..7265993aed0 100644 --- a/jetty-maven-plugin/src/main/resources/maven.xml +++ b/jetty-maven-plugin/src/main/resources/maven.xml @@ -3,7 +3,7 @@ - + org.eclipse.jetty.webapp.WebInfConfiguration org.eclipse.jetty.maven.plugin.MavenWebInfConfiguration @@ -11,9 +11,9 @@ - + /etc/maven.props - + diff --git a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml index 6a96d65f167..3bc37112f87 100644 --- a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml +++ b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml @@ -13,7 +13,7 @@ - + - + @@ -17,8 +17,8 @@ - - + + diff --git a/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-env.xml b/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-env.xml index 3889288dbaf..2d6293562f6 100644 --- a/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-env.xml +++ b/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-env.xml @@ -30,7 +30,7 @@ svr - + From 5579b805e33d3c436a1ba4559c483577b01f09a7 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 9 Nov 2020 23:38:51 +1100 Subject: [PATCH 08/45] fix some formatting and comments in XML files Signed-off-by: Lachlan Roberts --- .../src/main/config/etc/home-base-warning.xml | 4 +- .../config/etc/jetty-customrequestlog.xml | 4 +- .../src/main/config/etc/jetty-debug.xml | 4 +- .../src/main/config/etc/jetty-debuglog.xml | 4 +- .../src/main/config/etc/jetty-gzip.xml | 7 +- .../src/main/config/etc/jetty-http.xml | 6 +- .../src/main/config/etc/jetty-https.xml | 6 +- .../src/main/config/etc/jetty-ipaccess.xml | 4 +- .../main/config/etc/jetty-lowresources.xml | 4 +- .../src/main/config/etc/jetty-requestlog.xml | 4 +- .../src/main/config/etc/jetty-ssl-context.xml | 4 +- .../src/main/config/etc/jetty-ssl.xml | 6 +- .../src/main/config/etc/jetty-stats.xml | 4 +- .../src/main/config/etc/jetty-threadlimit.xml | 4 +- .../etc/sessions/file/session-store.xml | 1 - .../main/config/etc/sessions/id-manager.xml | 3 +- .../config/etc/sessions/jdbc/datasource.xml | 1 - .../etc/sessions/jdbc/session-store.xml | 89 +++++++++---------- .../etc/sessions/session-cache-hash.xml | 1 - .../etc/sessions/session-cache-null.xml | 1 - .../session-caching-store.xml | 2 - .../modules/inetaccess/jetty-inetaccess.xml | 76 +++++++++------- .../logback-access/jetty-logback-access.xml | 4 +- 23 files changed, 141 insertions(+), 102 deletions(-) diff --git a/jetty-server/src/main/config/etc/home-base-warning.xml b/jetty-server/src/main/config/etc/home-base-warning.xml index 826eab99022..bab26b90ccf 100644 --- a/jetty-server/src/main/config/etc/home-base-warning.xml +++ b/jetty-server/src/main/config/etc/home-base-warning.xml @@ -1,4 +1,6 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-customrequestlog.xml b/jetty-server/src/main/config/etc/jetty-customrequestlog.xml index 4337978d144..a01217d126b 100644 --- a/jetty-server/src/main/config/etc/jetty-customrequestlog.xml +++ b/jetty-server/src/main/config/etc/jetty-customrequestlog.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-debug.xml b/jetty-server/src/main/config/etc/jetty-debug.xml index f362c234ac2..aba97811693 100644 --- a/jetty-server/src/main/config/etc/jetty-debug.xml +++ b/jetty-server/src/main/config/etc/jetty-debug.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-debuglog.xml b/jetty-server/src/main/config/etc/jetty-debuglog.xml index 283203c5e4a..646d544e6dc 100644 --- a/jetty-server/src/main/config/etc/jetty-debuglog.xml +++ b/jetty-server/src/main/config/etc/jetty-debuglog.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-gzip.xml b/jetty-server/src/main/config/etc/jetty-gzip.xml index e9b7db85e94..c7efdacd7d4 100644 --- a/jetty-server/src/main/config/etc/jetty-gzip.xml +++ b/jetty-server/src/main/config/etc/jetty-gzip.xml @@ -1,6 +1,11 @@ - + + + + + + diff --git a/jetty-server/src/main/config/etc/jetty-http.xml b/jetty-server/src/main/config/etc/jetty-http.xml index ba8a605febb..2dd3fd48fdb 100644 --- a/jetty-server/src/main/config/etc/jetty-http.xml +++ b/jetty-server/src/main/config/etc/jetty-http.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-server/src/main/config/etc/jetty-https.xml b/jetty-server/src/main/config/etc/jetty-https.xml index 99abd18df59..529b6d0ca89 100644 --- a/jetty-server/src/main/config/etc/jetty-https.xml +++ b/jetty-server/src/main/config/etc/jetty-https.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-server/src/main/config/etc/jetty-ipaccess.xml b/jetty-server/src/main/config/etc/jetty-ipaccess.xml index abe9d0eb16f..e9607a91abf 100644 --- a/jetty-server/src/main/config/etc/jetty-ipaccess.xml +++ b/jetty-server/src/main/config/etc/jetty-ipaccess.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-lowresources.xml b/jetty-server/src/main/config/etc/jetty-lowresources.xml index 8eea6a01b82..215b7b9df1b 100644 --- a/jetty-server/src/main/config/etc/jetty-lowresources.xml +++ b/jetty-server/src/main/config/etc/jetty-lowresources.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-requestlog.xml b/jetty-server/src/main/config/etc/jetty-requestlog.xml index b6e202d380a..569e362dd02 100644 --- a/jetty-server/src/main/config/etc/jetty-requestlog.xml +++ b/jetty-server/src/main/config/etc/jetty-requestlog.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-ssl-context.xml b/jetty-server/src/main/config/etc/jetty-ssl-context.xml index 73f4458a439..e1aaa00f157 100644 --- a/jetty-server/src/main/config/etc/jetty-ssl-context.xml +++ b/jetty-server/src/main/config/etc/jetty-ssl-context.xml @@ -1,6 +1,8 @@ - + + + + + + + + diff --git a/jetty-server/src/main/config/etc/jetty-stats.xml b/jetty-server/src/main/config/etc/jetty-stats.xml index fa00a88899c..8f695f375a0 100644 --- a/jetty-server/src/main/config/etc/jetty-stats.xml +++ b/jetty-server/src/main/config/etc/jetty-stats.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/jetty-threadlimit.xml b/jetty-server/src/main/config/etc/jetty-threadlimit.xml index 2eecc1f66b5..a16b37cf97b 100644 --- a/jetty-server/src/main/config/etc/jetty-threadlimit.xml +++ b/jetty-server/src/main/config/etc/jetty-threadlimit.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-server/src/main/config/etc/sessions/file/session-store.xml b/jetty-server/src/main/config/etc/sessions/file/session-store.xml index 430a8917a1a..238e3b686c5 100644 --- a/jetty-server/src/main/config/etc/sessions/file/session-store.xml +++ b/jetty-server/src/main/config/etc/sessions/file/session-store.xml @@ -2,7 +2,6 @@ - diff --git a/jetty-server/src/main/config/etc/sessions/id-manager.xml b/jetty-server/src/main/config/etc/sessions/id-manager.xml index 6a596ee188c..d64dad87649 100644 --- a/jetty-server/src/main/config/etc/sessions/id-manager.xml +++ b/jetty-server/src/main/config/etc/sessions/id-manager.xml @@ -2,7 +2,6 @@ - @@ -27,7 +26,7 @@ - + diff --git a/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml b/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml index 06ef0203916..bff833562c7 100644 --- a/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml +++ b/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml @@ -2,7 +2,6 @@ - diff --git a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml index 3bc37112f87..de30be29d72 100644 --- a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml +++ b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml @@ -3,7 +3,6 @@ - @@ -15,56 +14,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + diff --git a/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml b/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml index beb537dc674..d4e467476ea 100644 --- a/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml +++ b/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml @@ -2,7 +2,6 @@ - diff --git a/jetty-server/src/main/config/etc/sessions/session-cache-null.xml b/jetty-server/src/main/config/etc/sessions/session-cache-null.xml index a9dc52b83e6..0aac4cec2b5 100644 --- a/jetty-server/src/main/config/etc/sessions/session-cache-null.xml +++ b/jetty-server/src/main/config/etc/sessions/session-cache-null.xml @@ -2,7 +2,6 @@ - diff --git a/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml b/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml index bc592ade862..dd5231e61ce 100644 --- a/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml +++ b/jetty-server/src/main/config/etc/sessions/session-data-cache/session-caching-store.xml @@ -12,8 +12,6 @@ - - diff --git a/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml b/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml index c5680dbeecd..7491932bcaf 100644 --- a/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml +++ b/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml @@ -1,38 +1,46 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jetty-server/src/main/config/modules/logback-access/jetty-logback-access.xml b/jetty-server/src/main/config/modules/logback-access/jetty-logback-access.xml index 34fbdccb7c0..cec331b1606 100644 --- a/jetty-server/src/main/config/modules/logback-access/jetty-logback-access.xml +++ b/jetty-server/src/main/config/modules/logback-access/jetty-logback-access.xml @@ -1,6 +1,8 @@ - + + + From bd553d98e5fcf3831716ce384af37250389ffd1d Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 9 Nov 2020 23:51:35 +1100 Subject: [PATCH 09/45] fixing badly formatted XML comments Signed-off-by: Lachlan Roberts --- .../src/main/config/etc/jetty-decorate.xml | 4 +++- .../src/main/config/etc/jetty-deploy.xml | 8 ++++++- .../src/test/resources/jetty-http.xml | 6 ++++- jetty-deploy/src/test/resources/jetty.xml | 23 +++++++++++++++++-- .../src/main/resources/etc/jetty-setuid.xml | 4 +++- .../src/main/resources/etc/jetty-started.xml | 4 +++- .../main/resources/modules/jamon/jamon.xml | 4 +++- .../jettyhome/etc/jetty-http.xml | 6 ++++- .../jetty-http-boot-context-as-service.xml | 6 ++++- .../etc/jetty-http-boot-webapp-as-service.xml | 6 ++++- .../etc/jetty-http-boot-with-annotations.xml | 6 ++++- .../jetty-http-boot-with-javax-websocket.xml | 6 ++++- .../config/etc/jetty-http-boot-with-jsp.xml | 6 ++++- .../etc/jetty-http-boot-with-resources.xml | 6 ++++- .../etc/jetty-http-boot-with-websocket.xml | 6 ++++- .../src/test/config/etc/jetty-http.xml | 6 ++++- .../src/test/config/etc/jetty-http2-jdk9.xml | 4 +++- .../src/test/config/etc/jetty-http2.xml | 4 +++- .../src/test/config/etc/jetty-https.xml | 6 ++++- .../src/main/plus-config/etc/jetty-plus.xml | 4 +++- .../jetty-rewrite.xml | 8 ++++++- .../src/main/config/etc/jetty-spring.xml | 6 ++++- .../src/test/resources/DefaultHandler.xml | 8 ++++++- .../src/test/resources/RFC2616Base.xml | 8 ++++++- .../src/test/resources/test-jndi.xml | 4 +++- .../config/demo-base/webapps/test-jaas.xml | 4 +++- .../demo-base/etc/demo-rewrite-rules.xml | 4 +++- .../main/templates/jetty-test-jndi-header.xml | 4 +++- .../main/templates/plugin-context-header.xml | 4 +++- 29 files changed, 145 insertions(+), 30 deletions(-) diff --git a/jetty-deploy/src/main/config/etc/jetty-decorate.xml b/jetty-deploy/src/main/config/etc/jetty-decorate.xml index 9bbeba9f394..330ea79ae68 100644 --- a/jetty-deploy/src/main/config/etc/jetty-decorate.xml +++ b/jetty-deploy/src/main/config/etc/jetty-decorate.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-deploy/src/main/config/etc/jetty-deploy.xml b/jetty-deploy/src/main/config/etc/jetty-deploy.xml index a5c38d33d03..02fa9ae4de4 100644 --- a/jetty-deploy/src/main/config/etc/jetty-deploy.xml +++ b/jetty-deploy/src/main/config/etc/jetty-deploy.xml @@ -1,6 +1,12 @@ - + + + + + + + diff --git a/jetty-deploy/src/test/resources/jetty-http.xml b/jetty-deploy/src/test/resources/jetty-http.xml index 43ed57d5425..505d92a3abd 100644 --- a/jetty-deploy/src/test/resources/jetty-http.xml +++ b/jetty-deploy/src/test/resources/jetty-http.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-deploy/src/test/resources/jetty.xml b/jetty-deploy/src/test/resources/jetty.xml index 576d20a7d2f..5178d3aa2bb 100644 --- a/jetty-deploy/src/test/resources/jetty.xml +++ b/jetty-deploy/src/test/resources/jetty.xml @@ -1,8 +1,27 @@ - + + + + + + + + + + + + - + + + + + + + + + diff --git a/jetty-home/src/main/resources/etc/jetty-setuid.xml b/jetty-home/src/main/resources/etc/jetty-setuid.xml index 11550a4d455..891f1c02244 100644 --- a/jetty-home/src/main/resources/etc/jetty-setuid.xml +++ b/jetty-home/src/main/resources/etc/jetty-setuid.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-home/src/main/resources/etc/jetty-started.xml b/jetty-home/src/main/resources/etc/jetty-started.xml index 64af23e15aa..467cdb6c3fa 100644 --- a/jetty-home/src/main/resources/etc/jetty-started.xml +++ b/jetty-home/src/main/resources/etc/jetty-started.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-home/src/main/resources/modules/jamon/jamon.xml b/jetty-home/src/main/resources/modules/jamon/jamon.xml index f9447f41d09..7e3e49b9546 100644 --- a/jetty-home/src/main/resources/modules/jamon/jamon.xml +++ b/jetty-home/src/main/resources/modules/jamon/jamon.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-http.xml b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-http.xml index 412e644a2e2..26b9ce2fd15 100644 --- a/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-http.xml +++ b/jetty-osgi/jetty-osgi-boot/jettyhome/etc/jetty-http.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-context-as-service.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-context-as-service.xml index 8e2360b85ca..3bc26b74050 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-context-as-service.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-context-as-service.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-webapp-as-service.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-webapp-as-service.xml index bccf90e1204..7796b48efe0 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-webapp-as-service.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-webapp-as-service.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-annotations.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-annotations.xml index eab6f8936c8..28d3d6b5933 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-annotations.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-annotations.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-javax-websocket.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-javax-websocket.xml index dca7d650b74..fd7b71533a5 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-javax-websocket.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-javax-websocket.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-jsp.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-jsp.xml index 38b5a790496..c2a2040fe59 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-jsp.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-jsp.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-resources.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-resources.xml index 0ef75aa957b..f5530acdc29 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-resources.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-resources.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-websocket.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-websocket.xml index e6857ba7b89..665e5b40b7c 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-websocket.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http-boot-with-websocket.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml index 11c1650548d..369d18540cb 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2-jdk9.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2-jdk9.xml index 56777719fdf..84b0306abb2 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2-jdk9.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2-jdk9.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml index 5e85f018046..7b2af9508e6 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-http2.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-https.xml b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-https.xml index 30199cb8677..7abbc4551ec 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-https.xml +++ b/jetty-osgi/test-jetty-osgi/src/test/config/etc/jetty-https.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/jetty-plus/src/main/plus-config/etc/jetty-plus.xml b/jetty-plus/src/main/plus-config/etc/jetty-plus.xml index f96b7552f4e..fd6e8b3e933 100644 --- a/jetty-plus/src/main/plus-config/etc/jetty-plus.xml +++ b/jetty-plus/src/main/plus-config/etc/jetty-plus.xml @@ -1,6 +1,8 @@ - + + + diff --git a/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml b/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml index fa6bc790c4f..bb0d641375d 100644 --- a/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml +++ b/jetty-rewrite/src/test/resources/org.mortbay.jetty.rewrite.handler/jetty-rewrite.xml @@ -1,6 +1,12 @@ - + + + + + + + diff --git a/jetty-spring/src/main/config/etc/jetty-spring.xml b/jetty-spring/src/main/config/etc/jetty-spring.xml index ea72a385079..bb935fd361f 100644 --- a/jetty-spring/src/main/config/etc/jetty-spring.xml +++ b/jetty-spring/src/main/config/etc/jetty-spring.xml @@ -1,6 +1,10 @@ - + + + + + diff --git a/tests/test-integration/src/test/resources/DefaultHandler.xml b/tests/test-integration/src/test/resources/DefaultHandler.xml index 671af8b5735..ee2a3fac6fb 100644 --- a/tests/test-integration/src/test/resources/DefaultHandler.xml +++ b/tests/test-integration/src/test/resources/DefaultHandler.xml @@ -1,6 +1,12 @@ - + + + + + + + diff --git a/tests/test-integration/src/test/resources/RFC2616Base.xml b/tests/test-integration/src/test/resources/RFC2616Base.xml index 3feda75ff0d..dfa62d87e05 100644 --- a/tests/test-integration/src/test/resources/RFC2616Base.xml +++ b/tests/test-integration/src/test/resources/RFC2616Base.xml @@ -1,6 +1,12 @@ - + + + + + + + diff --git a/tests/test-quickstart/src/test/resources/test-jndi.xml b/tests/test-quickstart/src/test/resources/test-jndi.xml index 8a10be200bc..30d7f7b7b1d 100644 --- a/tests/test-quickstart/src/test/resources/test-jndi.xml +++ b/tests/test-quickstart/src/test/resources/test-jndi.xml @@ -1,6 +1,8 @@ - + + + diff --git a/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/webapps/test-jaas.xml b/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/webapps/test-jaas.xml index 001f420dab0..76f74a4aade 100644 --- a/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/webapps/test-jaas.xml +++ b/tests/test-webapps/test-jaas-webapp/src/main/config/demo-base/webapps/test-jaas.xml @@ -1,6 +1,8 @@ - + + + /test-jaas diff --git a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/demo-rewrite-rules.xml b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/demo-rewrite-rules.xml index f5524b34720..ba9033ca3d9 100644 --- a/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/demo-rewrite-rules.xml +++ b/tests/test-webapps/test-jetty-webapp/src/main/config/demo-base/etc/demo-rewrite-rules.xml @@ -1,6 +1,8 @@ - + + + diff --git a/tests/test-webapps/test-jndi-webapp/src/main/templates/jetty-test-jndi-header.xml b/tests/test-webapps/test-jndi-webapp/src/main/templates/jetty-test-jndi-header.xml index ee14078e125..ee02490a254 100644 --- a/tests/test-webapps/test-jndi-webapp/src/main/templates/jetty-test-jndi-header.xml +++ b/tests/test-webapps/test-jndi-webapp/src/main/templates/jetty-test-jndi-header.xml @@ -1,6 +1,8 @@ - + + + diff --git a/tests/test-webapps/test-jndi-webapp/src/main/templates/plugin-context-header.xml b/tests/test-webapps/test-jndi-webapp/src/main/templates/plugin-context-header.xml index 476a30d2285..653811f01e8 100644 --- a/tests/test-webapps/test-jndi-webapp/src/main/templates/plugin-context-header.xml +++ b/tests/test-webapps/test-jndi-webapp/src/main/templates/plugin-context-header.xml @@ -1,6 +1,8 @@ - + + + From 08bf00cef414e034ce44360ffc40d56653f33bcf Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 9 Nov 2020 06:56:23 -0600 Subject: [PATCH 10/45] Bump maven-site-plugin from 3.7.1 to 3.9.1 Signed-off-by: Joakim Erdfelt --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e05414b418c..6bd4c61ca5c 100644 --- a/pom.xml +++ b/pom.xml @@ -634,7 +634,7 @@ org.apache.maven.plugins maven-site-plugin - 3.7.1 + 3.9.1 org.apache.maven.plugins @@ -1235,7 +1235,7 @@ org.apache.maven.plugins maven-site-plugin - 3.7.1 + 3.9.1 build-site From e937b34a8225e9733c1dec19d6ceddb1ccc53f5c Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Tue, 10 Nov 2020 00:11:21 +1100 Subject: [PATCH 11/45] fixes to XML formatting Signed-off-by: Lachlan Roberts --- .../src/main/config/etc/home-base-warning.xml | 2 +- .../config/etc/sessions/jdbc/datasource.xml | 12 +++++------ .../main/config/etc/sessions/jdbc/driver.xml | 18 ++++++++--------- .../etc/sessions/jdbc/session-store.xml | 12 +++++------ .../etc/sessions/session-cache-hash.xml | 20 +++++++++---------- .../etc/sessions/session-cache-null.xml | 14 ++++++------- .../modules/inetaccess/jetty-inetaccess.xml | 16 ++++----------- 7 files changed, 43 insertions(+), 51 deletions(-) diff --git a/jetty-server/src/main/config/etc/home-base-warning.xml b/jetty-server/src/main/config/etc/home-base-warning.xml index bab26b90ccf..64a02e928be 100644 --- a/jetty-server/src/main/config/etc/home-base-warning.xml +++ b/jetty-server/src/main/config/etc/home-base-warning.xml @@ -3,4 +3,4 @@ - + diff --git a/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml b/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml index bff833562c7..0fed2156e51 100644 --- a/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml +++ b/jetty-server/src/main/config/etc/sessions/jdbc/datasource.xml @@ -2,11 +2,11 @@ - - - - - - + + + + + + diff --git a/jetty-server/src/main/config/etc/sessions/jdbc/driver.xml b/jetty-server/src/main/config/etc/sessions/jdbc/driver.xml index 05860a6885d..b6b66f3981d 100644 --- a/jetty-server/src/main/config/etc/sessions/jdbc/driver.xml +++ b/jetty-server/src/main/config/etc/sessions/jdbc/driver.xml @@ -2,14 +2,14 @@ - - - - - - - - - + + + + + + + + + diff --git a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml index de30be29d72..438c9b379a7 100644 --- a/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml +++ b/jetty-server/src/main/config/etc/sessions/jdbc/session-store.xml @@ -53,12 +53,12 @@ - - - - - - + + + + + + diff --git a/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml b/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml index d4e467476ea..941ea1e48f3 100644 --- a/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml +++ b/jetty-server/src/main/config/etc/sessions/session-cache-hash.xml @@ -6,16 +6,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/jetty-server/src/main/config/etc/sessions/session-cache-null.xml b/jetty-server/src/main/config/etc/sessions/session-cache-null.xml index 0aac4cec2b5..34a4343cd4c 100644 --- a/jetty-server/src/main/config/etc/sessions/session-cache-null.xml +++ b/jetty-server/src/main/config/etc/sessions/session-cache-null.xml @@ -6,13 +6,13 @@ - - - - - - - + + + + + + + diff --git a/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml b/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml index 7491932bcaf..6c538ea5b3a 100644 --- a/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml +++ b/jetty-server/src/main/config/modules/inetaccess/jetty-inetaccess.xml @@ -7,36 +7,28 @@ - - - + - - - + - - - + - - - + From d0a8fbcc31186915c5bbc944e489c48ee2606d44 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 9 Nov 2020 09:20:18 -0600 Subject: [PATCH 12/45] Bump jna from 5.5.0 to 5.6.0 Signed-off-by: Joakim Erdfelt --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e05414b418c..1905f4b0d90 100644 --- a/pom.xml +++ b/pom.xml @@ -1086,6 +1086,7 @@ junit-jupiter ${junit.version} + org.testcontainers testcontainers @@ -1099,7 +1100,7 @@ net.java.dev.jna jna - 5.5.0 + 5.6.0 From 082b163c3249da5f8a3ca185121aba15d8882a10 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 9 Nov 2020 09:34:35 -0600 Subject: [PATCH 13/45] Bump hazelcast from 3.12.6 to 3.12.10 Signed-off-by: Joakim Erdfelt --- jetty-hazelcast/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-hazelcast/pom.xml b/jetty-hazelcast/pom.xml index 038e94f23d6..a49987da6da 100644 --- a/jetty-hazelcast/pom.xml +++ b/jetty-hazelcast/pom.xml @@ -11,7 +11,7 @@ Jetty :: Hazelcast Session Manager - 3.12.6 + 3.12.10 ${project.groupId}.hazelcast From 1475e4e22596a8a79a26a4bc0b5782bbfb6571f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Nov 2020 15:39:17 +0000 Subject: [PATCH 14/45] Bump maven-bundle-plugin from 3.5.1 to 5.1.1 Bumps maven-bundle-plugin from 3.5.1 to 5.1.1. Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6bd4c61ca5c..0e8bffc2c02 100644 --- a/pom.xml +++ b/pom.xml @@ -700,7 +700,7 @@ org.apache.felix maven-bundle-plugin - 3.5.1 + 5.1.1 true From 075c665a77227e5acb6434c786b6690168791a2b Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Mon, 9 Nov 2020 17:28:19 +0100 Subject: [PATCH 15/45] Add more info to gcloud write debug logging. Signed-off-by: Jan Bartel --- .../eclipse/jetty/gcloud/session/GCloudSessionDataStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java b/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java index 4bb0ae4e233..e3af19ef3d0 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java +++ b/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java @@ -781,7 +781,7 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore if (e.isRetryable()) { if (LOG.isDebugEnabled()) - LOG.debug("Datastore put retry {} waiting {}ms", attempts, backoff); + LOG.debug(String.format("Datastore put retry=%s backoff=%s", attempts, backoff), e); try { From 36e0fffe645b6dff63486497dfd728dcc9393a22 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 9 Nov 2020 14:11:42 -0600 Subject: [PATCH 16/45] Fixing OSGi Export-Package typo Signed-off-by: Joakim Erdfelt --- jetty-gcloud/jetty-gcloud-session-manager/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml index e1107fe8390..2875237b7d0 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/pom.xml +++ b/jetty-gcloud/jetty-gcloud-session-manager/pom.xml @@ -74,7 +74,7 @@ - org.eclipse.jetty.gcloud.session.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"; + org.eclipse.jetty.gcloud.session.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" From 005053d63f52b776325c4a87728c048d97a0444b Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 9 Nov 2020 09:26:03 -0600 Subject: [PATCH 17/45] Bump tycho from 1.4.0 to 2.1.0 Signed-off-by: Joakim Erdfelt --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4d06b817f93..45c4f134403 100644 --- a/pom.xml +++ b/pom.xml @@ -33,7 +33,7 @@ 9.0 1.26 benchmarks - 1.4.0 + 2.1.0 5.7.0 3.6.3 1.6.1 From 9152fc313ef8909c7a54f12724d6fe675756ccc1 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 9 Nov 2020 14:20:37 -0600 Subject: [PATCH 18/45] Bump xmemcached from 2.4.5 to 2.4.6 Signed-off-by: Joakim Erdfelt --- jetty-memcached/jetty-memcached-sessions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-memcached/jetty-memcached-sessions/pom.xml b/jetty-memcached/jetty-memcached-sessions/pom.xml index 299fcac6335..22c594388fd 100644 --- a/jetty-memcached/jetty-memcached-sessions/pom.xml +++ b/jetty-memcached/jetty-memcached-sessions/pom.xml @@ -19,7 +19,7 @@ com.googlecode.xmemcached xmemcached - 2.4.5 + 2.4.6 org.slf4j From 63fba2763b34d3d608de8ef73f94af3d165b5f32 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Mon, 9 Nov 2020 14:40:15 -0600 Subject: [PATCH 19/45] Minor tweaks to dependabot.yml Signed-off-by: Joakim Erdfelt --- .github/dependabot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 981dc2d3d04..e5d381dd774 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,10 @@ updates: directory: "/" schedule: interval: "weekly" + time: "14:00" target-branch: "jetty-9.4.x" + # Encourage more pull requests from oldest branch + open-pull-requests-limit: 20 - package-ecosystem: "github-actions" directory: "/" From deef0b4e30e1d15209e587b6ee7a67b7a39cbdf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:26:52 +1000 Subject: [PATCH 20/45] Bump geronimo-jcdi_2.0_spec from 1.1 to 1.3 (#5607) Bumps geronimo-jcdi_2.0_spec from 1.1 to 1.3. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tests/test-webapps/test-owb-cdi-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-webapps/test-owb-cdi-webapp/pom.xml b/tests/test-webapps/test-owb-cdi-webapp/pom.xml index 9876e7bd2fd..4dc1222d883 100644 --- a/tests/test-webapps/test-owb-cdi-webapp/pom.xml +++ b/tests/test-webapps/test-owb-cdi-webapp/pom.xml @@ -45,7 +45,7 @@ org.apache.geronimo.specs geronimo-jcdi_2.0_spec - 1.1 + 1.3 org.apache.geronimo.specs From 195df90d3f42ad2e19db1ae63d148c9d3ae93480 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:27:44 +1000 Subject: [PATCH 21/45] Bump openpojo from 0.8.1 to 0.8.13 (#5609) Bumps [openpojo](https://github.com/oshoukry/openpojo) from 0.8.1 to 0.8.13. - [Release notes](https://github.com/oshoukry/openpojo/releases) - [Changelog](https://github.com/OpenPojo/openpojo/blob/master/doc/release_steps.txt) - [Commits](https://github.com/oshoukry/openpojo/compare/openpojo-0.8.1...openpojo-0.8.13) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- jetty-jmx/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml index a2f891e0395..c065897897c 100644 --- a/jetty-jmx/pom.xml +++ b/jetty-jmx/pom.xml @@ -37,7 +37,7 @@ com.openpojo openpojo - 0.8.1 + 0.8.13 test From 7c5e96050606c8b4ee009533beeb87556ba515e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:28:42 +1000 Subject: [PATCH 22/45] Bump derby from 10.14.2.0 to 10.15.2.0 (#5611) Bumps derby from 10.14.2.0 to 10.15.2.0. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6b34c6a466..37b4ff10d58 100644 --- a/pom.xml +++ b/pom.xml @@ -1146,7 +1146,7 @@ org.apache.derby derby - 10.14.2.0 + 10.15.2.0 org.apache.derby From 662f6cc949266434615a6f15da98d914e2e8d8eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:29:15 +1000 Subject: [PATCH 23/45] Bump exec-maven-plugin from 1.6.0 to 3.0.0 (#5616) Bumps [exec-maven-plugin](https://github.com/mojohaus/exec-maven-plugin) from 1.6.0 to 3.0.0. - [Release notes](https://github.com/mojohaus/exec-maven-plugin/releases) - [Commits](https://github.com/mojohaus/exec-maven-plugin/compare/exec-maven-plugin-1.6.0...exec-maven-plugin-3.0.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 37b4ff10d58..03edd3f711e 100644 --- a/pom.xml +++ b/pom.xml @@ -753,7 +753,7 @@ org.codehaus.mojo exec-maven-plugin - 1.6.0 + 3.0.0 org.codehaus.mojo From 759b61a6b2852b9504c63838a2fd498b32869e55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:30:27 +1000 Subject: [PATCH 24/45] Bump plexus-compiler-javac-errorprone from 2.8.2 to 2.8.8 (#5620) Bumps plexus-compiler-javac-errorprone from 2.8.2 to 2.8.8. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 03edd3f711e..4384fa592e6 100644 --- a/pom.xml +++ b/pom.xml @@ -1194,7 +1194,7 @@ org.codehaus.plexus plexus-compiler-javac-errorprone - 2.8.2 + 2.8.8 From b5c38359679eb052f819a7e83da923d678f98a11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:30:51 +1000 Subject: [PATCH 25/45] Bump maven-jar-plugin from 3.1.2 to 3.2.0 (#5624) Bumps [maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.1.2 to 3.2.0. - [Release notes](https://github.com/apache/maven-jar-plugin/releases) - [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.1.2...maven-jar-plugin-3.2.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4384fa592e6..a6a7f2efe6a 100644 --- a/pom.xml +++ b/pom.xml @@ -561,7 +561,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.1.2 + 3.2.0 ${project.build.outputDirectory}/META-INF/MANIFEST.MF From eb2faea107cd0bd8efcd2cc47f83e30d6dfd9de9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:32:01 +1000 Subject: [PATCH 26/45] Bump ant.version from 1.10.8 to 1.10.9 (#5627) Bumps `ant.version` from 1.10.8 to 1.10.9. Updates `ant` from 1.10.8 to 1.10.9 Updates `ant-launcher` from 1.10.8 to 1.10.9 Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a6a7f2efe6a..69da90ee93b 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 3.1.5.Final 3.4.1.Final 1.0.6 - 1.10.8 + 1.10.9 false From 35655acaabd65a47f9ab2bc3890f3c6c3a717251 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 14:33:27 +1000 Subject: [PATCH 27/45] Bump error_prone_core from 2.2.0 to 2.4.0 (#5628) Bumps [error_prone_core](https://github.com/google/error-prone) from 2.2.0 to 2.4.0. - [Release notes](https://github.com/google/error-prone/releases) - [Commits](https://github.com/google/error-prone/compare/v2.2.0...v2.4.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 69da90ee93b..5b8653cb0dc 100644 --- a/pom.xml +++ b/pom.xml @@ -1201,7 +1201,7 @@ com.google.errorprone error_prone_core - 2.2.0 + 2.4.0 From 85de903a9232b5a340fb5d47a36353a28628fb0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 15:44:27 +1000 Subject: [PATCH 28/45] Bump maven-project-info-reports-plugin from 3.0.0 to 3.1.1 (#5613) Bumps [maven-project-info-reports-plugin](https://github.com/apache/maven-project-info-reports-plugin) from 3.0.0 to 3.1.1. - [Release notes](https://github.com/apache/maven-project-info-reports-plugin/releases) - [Commits](https://github.com/apache/maven-project-info-reports-plugin/compare/maven-project-info-reports-plugin-3.0.0...maven-project-info-reports-plugin-3.1.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5b8653cb0dc..81b691f9cf8 100644 --- a/pom.xml +++ b/pom.xml @@ -609,7 +609,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.1 org.apache.maven.plugins @@ -1216,7 +1216,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.1 org.apache.maven.plugins From 9f30779f6363dcc96897471dd3dad8dc135193cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 15:44:48 +1000 Subject: [PATCH 29/45] Bump maven-project-info-reports-plugin from 3.0.0 to 3.1.1 (#5615) Bumps [maven-project-info-reports-plugin](https://github.com/apache/maven-project-info-reports-plugin) from 3.0.0 to 3.1.1. - [Release notes](https://github.com/apache/maven-project-info-reports-plugin/releases) - [Commits](https://github.com/apache/maven-project-info-reports-plugin/compare/maven-project-info-reports-plugin-3.0.0...maven-project-info-reports-plugin-3.1.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 95fe68bf452..296a46bf375 100644 --- a/pom.xml +++ b/pom.xml @@ -600,7 +600,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.1 org.apache.maven.plugins @@ -1222,7 +1222,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.0.0 + 3.1.1 org.apache.maven.plugins From f192edc1d67b543ff67e4af0ef656e224bdb42dd Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Tue, 10 Nov 2020 15:59:29 +1000 Subject: [PATCH 30/45] fix derby version and hazelcast version in mod files Signed-off-by: olivier lamy --- .../main/config/modules/session-store-hazelcast-embedded.mod | 2 +- .../main/config/modules/session-store-hazelcast-remote.mod | 4 ++-- pom.xml | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod index 49585db2eb5..090ce1d4fa9 100644 --- a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod +++ b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-embedded.mod @@ -13,7 +13,7 @@ session-store sessions [files] -maven://com.hazelcast/hazelcast/3.12.6|lib/hazelcast/hazelcast-3.12.6.jar +maven://com.hazelcast/hazelcast/3.12.10|lib/hazelcast/hazelcast-3.12.10.jar [xml] etc/sessions/hazelcast/default.xml diff --git a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod index a69092dda17..8adfdfb6d94 100644 --- a/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod +++ b/jetty-hazelcast/src/main/config/modules/session-store-hazelcast-remote.mod @@ -13,8 +13,8 @@ session-store sessions [files] -maven://com.hazelcast/hazelcast/3.12.6|lib/hazelcast/hazelcast-3.12.6.jar -maven://com.hazelcast/hazelcast-client/3.12.6|lib/hazelcast/hazelcast-client-3.12.6.jar +maven://com.hazelcast/hazelcast/3.12.10|lib/hazelcast/hazelcast-3.12.10.jar +maven://com.hazelcast/hazelcast-client/3.12.6|lib/hazelcast/hazelcast-client-3.12.10.jar [xml] etc/sessions/hazelcast/remote.xml diff --git a/pom.xml b/pom.xml index 81b691f9cf8..86aaad2d372 100644 --- a/pom.xml +++ b/pom.xml @@ -68,6 +68,7 @@ src/it/settings.xml 0 1.15.0 + 10.15.2.0 @@ -1146,12 +1147,12 @@ org.apache.derby derby - 10.15.2.0 + ${derby.version} org.apache.derby derbytools - 10.14.2.0 + ${derby.version} From 80bb1bce90ab809ef5d731c28cb1434e4f845ace Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 16:33:58 +1000 Subject: [PATCH 31/45] Bump javax.servlet.jsp.jstl from 1.2.2 to 1.2.5 (#5622) Bumps [javax.servlet.jsp.jstl](https://github.com/javaee/jstl-api) from 1.2.2 to 1.2.5. - [Release notes](https://github.com/javaee/jstl-api/releases) - [Commits](https://github.com/javaee/jstl-api/compare/1.2.2...impl-1.2.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- jetty-osgi/test-jetty-osgi/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 89c4c2653db..52a27baa1ca 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -193,7 +193,7 @@ org.glassfish.web javax.servlet.jsp.jstl - 1.2.2 + 1.2.5 javax.servlet.jsp.jstl From 949a89c15be1566a57fe7794448892f79e591ded Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 16:34:46 +1000 Subject: [PATCH 32/45] Bump geronimo-interceptor_1.2_spec from 1.1 to 1.2 (#5632) Bumps geronimo-interceptor_1.2_spec from 1.1 to 1.2. Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- tests/test-webapps/test-owb-cdi-webapp/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-webapps/test-owb-cdi-webapp/pom.xml b/tests/test-webapps/test-owb-cdi-webapp/pom.xml index 4dc1222d883..0372524fd69 100644 --- a/tests/test-webapps/test-owb-cdi-webapp/pom.xml +++ b/tests/test-webapps/test-owb-cdi-webapp/pom.xml @@ -55,7 +55,7 @@ org.apache.geronimo.specs geronimo-interceptor_1.2_spec - 1.1 + 1.2 org.apache.openwebbeans From f691ed81b960a806df03e8d5074c44d1137832e4 Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Tue, 10 Nov 2020 20:31:49 +1000 Subject: [PATCH 33/45] derby 10.15 not supporting java8 Signed-off-by: olivier lamy --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 86aaad2d372..8cdb82e9df8 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ src/it/settings.xml 0 1.15.0 - 10.15.2.0 + 10.14.2.0 From 2af2821a0e8ddb4690dbf5dbc02f265848232a9d Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Tue, 10 Nov 2020 20:34:23 +1000 Subject: [PATCH 34/45] Revert "Bump maven-bundle-plugin from 3.5.1 to 5.1.1" until we figure out the problem This reverts commit 1475e4e22596a8a79a26a4bc0b5782bbfb6571f5. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8cdb82e9df8..2de5de2d312 100644 --- a/pom.xml +++ b/pom.xml @@ -701,7 +701,7 @@ org.apache.felix maven-bundle-plugin - 5.1.1 + 3.5.1 true From 5ed40b251c462235dc7ff76308c1a27122471272 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:53:07 +0000 Subject: [PATCH 35/45] Bump maven-artifact-transfer from 0.11.0 to 0.12.0 Bumps [maven-artifact-transfer](https://github.com/apache/maven-artifact-transfer) from 0.11.0 to 0.12.0. - [Release notes](https://github.com/apache/maven-artifact-transfer/releases) - [Commits](https://github.com/apache/maven-artifact-transfer/compare/maven-artifact-transfer-0.11.0...maven-artifact-transfer-0.12.0) Signed-off-by: dependabot[bot] --- jetty-maven-plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-maven-plugin/pom.xml b/jetty-maven-plugin/pom.xml index 3371ba1c7a2..3cfaddf37b0 100644 --- a/jetty-maven-plugin/pom.xml +++ b/jetty-maven-plugin/pom.xml @@ -106,7 +106,7 @@ org.apache.maven.shared maven-artifact-transfer - 0.11.0 + 0.12.0 org.apache.maven From 0a345420ff2ac0430b9c0da139cf4d0844b8f9dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:53:24 +0000 Subject: [PATCH 36/45] Bump checkstyle from 8.36.2 to 8.37 Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 8.36.2 to 8.37. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](https://github.com/checkstyle/checkstyle/compare/checkstyle-8.36.2...checkstyle-8.37) Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2de5de2d312..340b94ff05b 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ https://eclipse.org/jetty UTF-8 1.5 - 8.36.2 + 8.37 1.7.30 2.11.2 3.4.2 From 21c27f6370dce8e1dec37ae82d6cd18d391e689b Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 10 Nov 2020 06:33:04 -0600 Subject: [PATCH 37/45] Fixing checkstyle violations Signed-off-by: Joakim Erdfelt --- .../main/java/org/eclipse/jetty/servlet/ServletHolder.java | 2 +- .../src/main/java/org/eclipse/jetty/test/InfoServlet.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java index f84d21c4a46..7a74be39d00 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java @@ -1262,7 +1262,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { if (LOG.isDebugEnabled()) - LOG.debug("Unavailable {}", req, _unavailableException); + LOG.debug("Unavailable {}", req, _unavailableException); if (_unavailableStart == null) { ((HttpServletResponse)res).sendError(HttpServletResponse.SC_NOT_FOUND); diff --git a/tests/test-webapps/test-cdi-common-webapp/src/main/java/org/eclipse/jetty/test/InfoServlet.java b/tests/test-webapps/test-cdi-common-webapp/src/main/java/org/eclipse/jetty/test/InfoServlet.java index c158735bb81..0e8b84f0bcc 100644 --- a/tests/test-webapps/test-cdi-common-webapp/src/main/java/org/eclipse/jetty/test/InfoServlet.java +++ b/tests/test-webapps/test-cdi-common-webapp/src/main/java/org/eclipse/jetty/test/InfoServlet.java @@ -51,7 +51,9 @@ public class InfoServlet extends HttpServlet { out.printf("%16s => %s%n", bean.getName(), bean); for (InjectionPoint ij : bean.getInjectionPoints()) - out.printf("%16s -> %s%n", "", ij); + { + out.printf("%16s -> %s%n", "", ij); + } } } } From 5ebc36c45059a6dd0a5825851f39d21d104b4d3f Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 11 Nov 2020 07:36:50 +1000 Subject: [PATCH 38/45] do not activate remote session tests for javadoc and compaact3 builds Signed-off-by: olivier lamy --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fa321ab3ad1..ef414a338a1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { container('jetty-build') { timeout( time: 120, unit: 'MINUTES' ) { - mavenBuild( "jdk8", "clean install -T3", "maven3", + mavenBuild( "jdk8", "clean install -T3 -Premote-session-tests", "maven3", [[parserName: 'Maven'], [parserName: 'Java']]) // Collect up the jacoco execution results (only on main build) jacoco inclusionPattern: '**/org/eclipse/jetty/**/*.class', @@ -42,7 +42,7 @@ pipeline { steps { container( 'jetty-build' ) { timeout( time: 120, unit: 'MINUTES' ) { - mavenBuild( "jdk11", "clean install -T3 -Djacoco.skip=true ", "maven3", + mavenBuild( "jdk11", "clean install -T3 -Djacoco.skip=true -Premote-session-tests", "maven3", [[parserName: 'Maven'], [parserName: 'Java']]) } } @@ -54,7 +54,7 @@ pipeline { steps { container( 'jetty-build' ) { timeout( time: 120, unit: 'MINUTES' ) { - mavenBuild( "jdk15", "clean install -T3 -Djacoco.skip=true ", "maven3", + mavenBuild( "jdk15", "clean install -T3 -Djacoco.skip=true -Premote-session-tests", "maven3", [[parserName: 'Maven'], [parserName: 'Java']]) } } @@ -138,7 +138,7 @@ def mavenBuild(jdk, cmdline, mvnName, consoleParsers) { "MAVEN_OPTS=-Xms2g -Xmx4g -Djava.awt.headless=true"]) { configFileProvider( [configFile(fileId: 'oss-settings.xml', variable: 'GLOBAL_MVN_SETTINGS')]) { - sh "mvn -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Premote-session-tests -Pci -fae -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + + sh "mvn -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -fae -V -B -e -Djetty.testtracker.log=true $cmdline -Dunix.socket.tmp=" + env.JENKINS_HOME } } From 8b3de3beb38141436b9896792db5baa55d834e8e Mon Sep 17 00:00:00 2001 From: olivier lamy Date: Wed, 11 Nov 2020 10:54:07 +1000 Subject: [PATCH 39/45] some build do not generate amnymore junit results Signed-off-by: olivier lamy --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ef414a338a1..02a0c484a5d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -145,7 +145,7 @@ def mavenBuild(jdk, cmdline, mvnName, consoleParsers) { } finally { - junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml' + junit testResults: '**/target/surefire-reports/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true if(consoleParsers!=null){ warnings consoleParsers: consoleParsers } From bb886ad9320c170b9b12a111e00f6671978c8cee Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Wed, 11 Nov 2020 17:48:08 +0100 Subject: [PATCH 40/45] Fix #5575 SEARCH method (#5576) + Added all IANA methods + Used Trie for most lookups + Fixed ArrayTernayTrie lookup + optimised GET, POST and HEAD Co-authored-by: Joakim Erdfelt --- .../org/eclipse/jetty/http/HttpMethod.java | 286 ++++++++++-------- .../eclipse/jetty/http/HttpParserTest.java | 30 +- .../jetty/http/jmh/HttpMethodBenchmark.java | 127 ++++++++ .../eclipse/jetty/util/ArrayTernaryTrie.java | 6 + 4 files changed, 321 insertions(+), 128 deletions(-) create mode 100644 jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java diff --git a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java index 83f6bfc7365..e0e035072dc 100644 --- a/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java +++ b/jetty-http/src/main/java/org/eclipse/jetty/http/HttpMethod.java @@ -26,137 +26,72 @@ import org.eclipse.jetty.util.StringUtil; import org.eclipse.jetty.util.Trie; /** - * + * Known HTTP Methods */ public enum HttpMethod { - GET, - POST, - HEAD, - PUT, - OPTIONS, - DELETE, - TRACE, - CONNECT, - MOVE, - PROXY, - PRI; + // From https://www.iana.org/assignments/http-methods/http-methods.xhtml + ACL(Type.IDEMPOTENT), + BASELINE_CONTROL(Type.IDEMPOTENT), + BIND(Type.IDEMPOTENT), + CHECKIN(Type.IDEMPOTENT), + CHECKOUT(Type.IDEMPOTENT), + CONNECT(Type.NORMAL), + COPY(Type.IDEMPOTENT), + DELETE(Type.IDEMPOTENT), + GET(Type.SAFE), + HEAD(Type.SAFE), + LABEL(Type.IDEMPOTENT), + LINK(Type.IDEMPOTENT), + LOCK(Type.NORMAL), + MERGE(Type.IDEMPOTENT), + MKACTIVITY(Type.IDEMPOTENT), + MKCALENDAR(Type.IDEMPOTENT), + MKCOL(Type.IDEMPOTENT), + MKREDIRECTREF(Type.IDEMPOTENT), + MKWORKSPACE(Type.IDEMPOTENT), + MOVE(Type.IDEMPOTENT), + OPTIONS(Type.SAFE), + ORDERPATCH(Type.IDEMPOTENT), + PATCH(Type.NORMAL), + POST(Type.NORMAL), + PRI(Type.SAFE), + PROPFIND(Type.SAFE), + PROPPATCH(Type.IDEMPOTENT), + PUT(Type.IDEMPOTENT), + REBIND(Type.IDEMPOTENT), + REPORT(Type.SAFE), + SEARCH(Type.SAFE), + TRACE(Type.SAFE), + UNBIND(Type.IDEMPOTENT), + UNCHECKOUT(Type.IDEMPOTENT), + UNLINK(Type.IDEMPOTENT), + UNLOCK(Type.IDEMPOTENT), + UPDATE(Type.IDEMPOTENT), + UPDATEREDIRECTREF(Type.IDEMPOTENT), + VERSION_CONTROL(Type.IDEMPOTENT), - /** - * Optimized lookup to find a method name and trailing space in a byte array. - * - * @param bytes Array containing ISO-8859-1 characters - * @param position The first valid index - * @param limit The first non valid index - * @return An HttpMethod if a match or null if no easy match. - */ - public static HttpMethod lookAheadGet(byte[] bytes, final int position, int limit) + // Other methods + PROXY(Type.NORMAL); + + // The type of the method + private enum Type { - int length = limit - position; - if (length < 4) - return null; - switch (bytes[position]) - { - case 'G': - if (bytes[position + 1] == 'E' && bytes[position + 2] == 'T' && bytes[position + 3] == ' ') - return GET; - break; - case 'P': - if (bytes[position + 1] == 'O' && bytes[position + 2] == 'S' && bytes[position + 3] == 'T' && length >= 5 && bytes[position + 4] == ' ') - return POST; - if (bytes[position + 1] == 'R' && bytes[position + 2] == 'O' && bytes[position + 3] == 'X' && length >= 6 && bytes[position + 4] == 'Y' && bytes[position + 5] == ' ') - return PROXY; - if (bytes[position + 1] == 'U' && bytes[position + 2] == 'T' && bytes[position + 3] == ' ') - return PUT; - if (bytes[position + 1] == 'R' && bytes[position + 2] == 'I' && bytes[position + 3] == ' ') - return PRI; - break; - case 'H': - if (bytes[position + 1] == 'E' && bytes[position + 2] == 'A' && bytes[position + 3] == 'D' && length >= 5 && bytes[position + 4] == ' ') - return HEAD; - break; - case 'O': - if (bytes[position + 1] == 'P' && bytes[position + 2] == 'T' && bytes[position + 3] == 'I' && length >= 8 && - bytes[position + 4] == 'O' && bytes[position + 5] == 'N' && bytes[position + 6] == 'S' && bytes[position + 7] == ' ') - return OPTIONS; - break; - case 'D': - if (bytes[position + 1] == 'E' && bytes[position + 2] == 'L' && bytes[position + 3] == 'E' && length >= 7 && - bytes[position + 4] == 'T' && bytes[position + 5] == 'E' && bytes[position + 6] == ' ') - return DELETE; - break; - case 'T': - if (bytes[position + 1] == 'R' && bytes[position + 2] == 'A' && bytes[position + 3] == 'C' && length >= 6 && - bytes[position + 4] == 'E' && bytes[position + 5] == ' ') - return TRACE; - break; - case 'C': - if (bytes[position + 1] == 'O' && bytes[position + 2] == 'N' && bytes[position + 3] == 'N' && length >= 8 && - bytes[position + 4] == 'E' && bytes[position + 5] == 'C' && bytes[position + 6] == 'T' && bytes[position + 7] == ' ') - return CONNECT; - break; - case 'M': - if (bytes[position + 1] == 'O' && bytes[position + 2] == 'V' && bytes[position + 3] == 'E' && length >= 5 && bytes[position + 4] == ' ') - return MOVE; - break; - - default: - break; - } - return null; + NORMAL, + IDEMPOTENT, + SAFE } - /** - * Optimized lookup to find a method name and trailing space in a byte array. - * - * @param buffer buffer containing ISO-8859-1 characters, it is not modified. - * @return An HttpMethod if a match or null if no easy match. - */ - public static HttpMethod lookAheadGet(ByteBuffer buffer) - { - if (buffer.hasArray()) - return lookAheadGet(buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.arrayOffset() + buffer.limit()); - - int l = buffer.remaining(); - if (l >= 4) - { - HttpMethod m = CACHE.getBest(buffer, 0, l); - if (m != null) - { - int ml = m.asString().length(); - if (l > ml && buffer.get(buffer.position() + ml) == ' ') - return m; - } - } - return null; - } - - public static final Trie INSENSITIVE_CACHE = new ArrayTrie<>(); - - static - { - for (HttpMethod method : HttpMethod.values()) - { - INSENSITIVE_CACHE.put(method.toString(), method); - } - } - - public static final Trie CACHE = new ArrayTernaryTrie<>(false); - - static - { - for (HttpMethod method : HttpMethod.values()) - { - CACHE.put(method.toString(), method); - } - } - - private final ByteBuffer _buffer; + private final String _method; private final byte[] _bytes; + private final ByteBuffer _buffer; + private final Type _type; - HttpMethod() + HttpMethod(Type type) { - _bytes = StringUtil.getBytes(toString()); + _method = name().replace('_', '-'); + _type = type; + _bytes = StringUtil.getBytes(_method); _buffer = ByteBuffer.wrap(_bytes); } @@ -170,6 +105,28 @@ public enum HttpMethod return toString().equalsIgnoreCase(s); } + /** + * An HTTP method is safe if it doesn't alter the state of the server. + * In other words, a method is safe if it leads to a read-only operation. + * Several common HTTP methods are safe: GET , HEAD , or OPTIONS . + * All safe methods are also idempotent, but not all idempotent methods are safe + * @return if the method is safe. + */ + public boolean isSafe() + { + return _type == Type.SAFE; + } + + /** + * An idempotent HTTP method is an HTTP method that can be called many times without different outcomes. + * It would not matter if the method is called only once, or ten times over. The result should be the same. + * @return true if the method is idempotent. + */ + public boolean isIdempotent() + { + return _type.ordinal() >= Type.IDEMPOTENT.ordinal(); + } + public ByteBuffer asBuffer() { return _buffer.asReadOnlyBuffer(); @@ -177,11 +134,94 @@ public enum HttpMethod public String asString() { - return toString(); + return _method; + } + + public String toString() + { + return _method; + } + + public static final Trie INSENSITIVE_CACHE = new ArrayTrie<>(252); + public static final Trie CACHE = new ArrayTernaryTrie<>(false, 300); + public static final Trie LOOK_AHEAD = new ArrayTernaryTrie<>(false, 330); + public static final int ACL_AS_INT = ('A' & 0xff) << 24 | ('C' & 0xFF) << 16 | ('L' & 0xFF) << 8 | (' ' & 0xFF); + public static final int GET_AS_INT = ('G' & 0xff) << 24 | ('E' & 0xFF) << 16 | ('T' & 0xFF) << 8 | (' ' & 0xFF); + public static final int PRI_AS_INT = ('P' & 0xff) << 24 | ('R' & 0xFF) << 16 | ('I' & 0xFF) << 8 | (' ' & 0xFF); + public static final int PUT_AS_INT = ('P' & 0xff) << 24 | ('U' & 0xFF) << 16 | ('T' & 0xFF) << 8 | (' ' & 0xFF); + public static final int POST_AS_INT = ('P' & 0xff) << 24 | ('O' & 0xFF) << 16 | ('S' & 0xFF) << 8 | ('T' & 0xFF); + public static final int HEAD_AS_INT = ('H' & 0xff) << 24 | ('E' & 0xFF) << 16 | ('A' & 0xFF) << 8 | ('D' & 0xFF); + static + { + for (HttpMethod method : HttpMethod.values()) + { + if (!INSENSITIVE_CACHE.put(method.asString(), method)) + throw new IllegalStateException("INSENSITIVE_CACHE too small: " + method); + + if (!CACHE.put(method.asString(), method)) + throw new IllegalStateException("CACHE too small: " + method); + + if (!LOOK_AHEAD.put(method.asString() + ' ', method)) + throw new IllegalStateException("LOOK_AHEAD too small: " + method); + } } /** - * Converts the given String parameter to an HttpMethod + * Optimized lookup to find a method name and trailing space in a byte array. + * + * @param bytes Array containing ISO-8859-1 characters + * @param position The first valid index + * @param limit The first non valid index + * @return An HttpMethod if a match or null if no easy match. + * @deprecated Not used + */ + @Deprecated + public static HttpMethod lookAheadGet(byte[] bytes, final int position, int limit) + { + return LOOK_AHEAD.getBest(bytes, position, limit - position); + } + + /** + * Optimized lookup to find a method name and trailing space in a byte array. + * + * @param buffer buffer containing ISO-8859-1 characters, it is not modified. + * @return An HttpMethod if a match or null if no easy match. + */ + public static HttpMethod lookAheadGet(ByteBuffer buffer) + { + int len = buffer.remaining(); + // Short cut for 3 char methods, mostly for GET optimisation + if (len > 3) + { + switch (buffer.getInt(buffer.position())) + { + case ACL_AS_INT: + return ACL; + case GET_AS_INT: + return GET; + case PRI_AS_INT: + return PRI; + case PUT_AS_INT: + return PUT; + case POST_AS_INT: + if (len > 4 && buffer.get(buffer.position() + 4) == ' ') + return POST; + break; + case HEAD_AS_INT: + if (len > 4 && buffer.get(buffer.position() + 4) == ' ') + return HEAD; + break; + default: + break; + } + } + return LOOK_AHEAD.getBest(buffer, 0, len); + } + + /** + * Converts the given String parameter to an HttpMethod. + * The string may differ from the Enum name as a '-' in the method + * name is represented as a '_' in the Enum name. * * @param method the String to get the equivalent HttpMethod from * @return the HttpMethod or null if the parameter method is unknown diff --git a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java index d454d5e49eb..39d72a13be6 100644 --- a/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java +++ b/jetty-http/src/test/java/org/eclipse/jetty/http/HttpParserTest.java @@ -23,6 +23,7 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Locale; import org.eclipse.jetty.http.HttpParser.State; import org.eclipse.jetty.toolchain.test.Net; @@ -32,6 +33,8 @@ import org.hamcrest.Matchers; import org.junit.jupiter.api.Assumptions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; import static org.eclipse.jetty.http.HttpComplianceSection.NO_FIELD_FOLDING; import static org.hamcrest.MatcherAssert.assertThat; @@ -85,12 +88,20 @@ public class HttpParserTest @Test public void httpMethodTest() { - assertNull(HttpMethod.lookAheadGet(BufferUtil.toBuffer("Wibble "))); - assertNull(HttpMethod.lookAheadGet(BufferUtil.toBuffer("GET"))); - assertNull(HttpMethod.lookAheadGet(BufferUtil.toBuffer("MO"))); + for (HttpMethod m : HttpMethod.values()) + { + assertNull(HttpMethod.lookAheadGet(BufferUtil.toBuffer(m.asString().substring(0,2)))); + assertNull(HttpMethod.lookAheadGet(BufferUtil.toBuffer(m.asString()))); + assertNull(HttpMethod.lookAheadGet(BufferUtil.toBuffer(m.asString() + "FOO"))); + assertEquals(m, HttpMethod.lookAheadGet(BufferUtil.toBuffer(m.asString() + " "))); + assertEquals(m, HttpMethod.lookAheadGet(BufferUtil.toBuffer(m.asString() + " /foo/bar"))); - assertEquals(HttpMethod.GET, HttpMethod.lookAheadGet(BufferUtil.toBuffer("GET "))); - assertEquals(HttpMethod.MOVE, HttpMethod.lookAheadGet(BufferUtil.toBuffer("MOVE "))); + assertNull(HttpMethod.lookAheadGet(m.asString().substring(0,2).getBytes(), 0,2)); + assertNull(HttpMethod.lookAheadGet(m.asString().getBytes(), 0, m.asString().length())); + assertNull(HttpMethod.lookAheadGet((m.asString() + "FOO").getBytes(), 0, m.asString().length() + 3)); + assertEquals(m, HttpMethod.lookAheadGet(("\n" + m.asString() + " ").getBytes(), 1, m.asString().length() + 2)); + assertEquals(m, HttpMethod.lookAheadGet(("\n" + m.asString() + " /foo").getBytes(), 1, m.asString().length() + 6)); + } ByteBuffer b = BufferUtil.allocateDirect(128); BufferUtil.append(b, BufferUtil.toBuffer("GET")); @@ -100,6 +111,15 @@ public class HttpParserTest assertEquals(HttpMethod.GET, HttpMethod.lookAheadGet(b)); } + @ParameterizedTest + @ValueSource(strings = {"GET", "POST", "VERSION-CONTROL"}) + public void httpMethodNameTest(String methodName) + { + HttpMethod method = HttpMethod.fromString(methodName); + assertNotNull(method, "Method should have been found: " + methodName); + assertEquals(methodName.toUpperCase(Locale.US), method.toString()); + } + @Test public void testLineParseMockIP() { diff --git a/jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java b/jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java new file mode 100644 index 00000000000..283a866dab1 --- /dev/null +++ b/jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java @@ -0,0 +1,127 @@ +// +// ======================================================================== +// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.http.jmh; + +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import org.eclipse.jetty.http.HttpMethod; +import org.eclipse.jetty.util.BufferUtil; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Threads; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.profile.GCProfiler; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; + +@State(Scope.Benchmark) +@Threads(4) +@Warmup(iterations = 5, time = 2000, timeUnit = TimeUnit.MILLISECONDS) +@Measurement(iterations = 5, time = 2000, timeUnit = TimeUnit.MILLISECONDS) +public class HttpMethodBenchmark +{ + private static final ByteBuffer GET = BufferUtil.toBuffer("GET / HTTP/1.1\r\n\r\n"); + private static final ByteBuffer POST = BufferUtil.toBuffer("POST / HTTP/1.1\r\n\r\n"); + private static final ByteBuffer MOVE = BufferUtil.toBuffer("MOVE / HTTP/1.1\r\n\r\n"); + private static final Map MAP = new HashMap<>(); + + static + { + for (HttpMethod m : HttpMethod.values()) + MAP.put(m.asString(), m); + } + + @Benchmark + @BenchmarkMode({Mode.Throughput}) + public HttpMethod testTrieGetBest() throws Exception + { + return HttpMethod.LOOK_AHEAD.getBest(GET, 0, GET.remaining()); + } + + @Benchmark + @BenchmarkMode({Mode.Throughput}) + public HttpMethod testIntSwitch() throws Exception + { + switch (GET.getInt(0)) + { + case HttpMethod.ACL_AS_INT: + return HttpMethod.ACL; + case HttpMethod.GET_AS_INT: + return HttpMethod.GET; + case HttpMethod.PRI_AS_INT: + return HttpMethod.PRI; + case HttpMethod.PUT_AS_INT: + return HttpMethod.PUT; + default: + return null; + } + } + + @Benchmark + @BenchmarkMode({Mode.Throughput}) + public HttpMethod testMapGet() throws Exception + { + for (int i = 0; i < GET.remaining(); i++) + { + if (GET.get(i) == (byte)' ') + return MAP.get(BufferUtil.toString(GET, 0, i, StandardCharsets.US_ASCII)); + } + return null; + } + + @Benchmark + @BenchmarkMode({Mode.Throughput}) + public HttpMethod testHttpMethodPost() throws Exception + { + return HttpMethod.lookAheadGet(POST); + } + + @Benchmark + @BenchmarkMode({Mode.Throughput}) + public HttpMethod testHttpMethodMove() throws Exception + { + return HttpMethod.lookAheadGet(MOVE); + } + + public static void main(String[] args) throws RunnerException + { + Options opt = new OptionsBuilder() + .include(HttpMethodBenchmark.class.getSimpleName()) + .warmupIterations(10) + .measurementIterations(10) + .addProfiler(GCProfiler.class) + .forks(1) + .threads(1) + .build(); + + new Runner(opt).run(); + } +} + + diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/ArrayTernaryTrie.java b/jetty-util/src/main/java/org/eclipse/jetty/util/ArrayTernaryTrie.java index a1eecc1846c..1c8b976d605 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/ArrayTernaryTrie.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/ArrayTernaryTrie.java @@ -368,6 +368,12 @@ public class ArrayTernaryTrie extends AbstractTrie return getBest(0, b, offset, len); } + @Override + public V getBest(byte[] b, int offset, int len) + { + return getBest(0, b, offset, len); + } + private V getBest(int t, byte[] b, int offset, int len) { int node = t; From dd86adad66a89319a0092aa3da1bc132c53b1037 Mon Sep 17 00:00:00 2001 From: gregw Date: Wed, 11 Nov 2020 18:18:50 +0100 Subject: [PATCH 41/45] Fixed file header --- .../jetty/http/jmh/HttpMethodBenchmark.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java b/jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java index 283a866dab1..d5ea6726db8 100644 --- a/jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java +++ b/jetty-jmh/src/main/java/org/eclipse/jetty/http/jmh/HttpMethodBenchmark.java @@ -1,19 +1,19 @@ // -// ======================================================================== -// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others. -// ------------------------------------------------------------------------ -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. +// ======================================================================== +// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others. // -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html +// This program and the accompanying materials are made available under +// the terms of the Eclipse Public License 2.0 which is available at +// https://www.eclipse.org/legal/epl-2.0 // -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php +// This Source Code may also be made available under the following +// Secondary Licenses when the conditions for such availability set +// forth in the Eclipse Public License, v. 2.0 are satisfied: +// the Apache License v2.0 which is available at +// https://www.apache.org/licenses/LICENSE-2.0 // -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== +// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 +// ======================================================================== // package org.eclipse.jetty.http.jmh; From 3a99c89350947fc99b97741f1a53c09f9c8a7e01 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 11 Nov 2020 18:21:06 +0100 Subject: [PATCH 42/45] Issue #5486 PropertyFileLoginModule retains PropertyUserStores (#5518) * Issue #5486 PropertyFileLoginModule retains PropertyUserStores Signed-off-by: Jan Bartel --- .../eclipse/jetty/jaas/JAASLoginService.java | 138 ++++++------------ .../jetty/jaas/PropertyUserStoreManager.java | 101 +++++++++++++ .../jaas/callback/DefaultCallbackHandler.java | 37 ++--- .../jaas/spi/PropertyFileLoginModule.java | 89 ++++++----- .../jetty/jaas/JAASLoginServiceTest.java | 55 +++---- .../jaas/spi/PropertyFileLoginModuleTest.java | 76 +++++++--- 6 files changed, 301 insertions(+), 195 deletions(-) create mode 100644 jetty-jaas/src/main/java/org/eclipse/jetty/jaas/PropertyUserStoreManager.java diff --git a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java index 35b1cfd1337..45470de1e2c 100644 --- a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java +++ b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/JAASLoginService.java @@ -20,15 +20,16 @@ package org.eclipse.jetty.jaas; import java.io.IOException; import java.security.Principal; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; +import java.util.List; import java.util.Set; import javax.security.auth.Subject; import javax.security.auth.callback.Callback; import javax.security.auth.callback.CallbackHandler; import javax.security.auth.callback.NameCallback; -import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.UnsupportedCallbackException; import javax.security.auth.login.Configuration; import javax.security.auth.login.FailedLoginException; @@ -37,9 +38,6 @@ import javax.security.auth.login.LoginException; import javax.servlet.ServletRequest; import org.eclipse.jetty.jaas.callback.DefaultCallbackHandler; -import org.eclipse.jetty.jaas.callback.ObjectCallback; -import org.eclipse.jetty.jaas.callback.RequestParameterCallback; -import org.eclipse.jetty.jaas.callback.ServletRequestCallback; import org.eclipse.jetty.security.DefaultIdentityService; import org.eclipse.jetty.security.IdentityService; import org.eclipse.jetty.security.LoginService; @@ -47,7 +45,7 @@ import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.UserIdentity; import org.eclipse.jetty.util.ArrayUtil; import org.eclipse.jetty.util.Loader; -import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.component.ContainerLifeCycle; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; @@ -58,13 +56,14 @@ import org.eclipse.jetty.util.log.Logger; * Implementation of jetty's LoginService that works with JAAS for * authorization and authentication. */ -public class JAASLoginService extends AbstractLifeCycle implements LoginService +public class JAASLoginService extends ContainerLifeCycle implements LoginService { private static final Logger LOG = Log.getLogger(JAASLoginService.class); public static final String DEFAULT_ROLE_CLASS_NAME = "org.eclipse.jetty.jaas.JAASRole"; public static final String[] DEFAULT_ROLE_CLASS_NAMES = {DEFAULT_ROLE_CLASS_NAME}; - + public static final ThreadLocal INSTANCE = new ThreadLocal<>(); + protected String[] _roleClassNames = DEFAULT_ROLE_CLASS_NAMES; protected String _callbackHandlerClass; protected String _realmName; @@ -183,6 +182,7 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService { if (_identityService == null) _identityService = new DefaultIdentityService(); + addBean(new PropertyUserStoreManager()); super.doStart(); } @@ -193,59 +193,27 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService { CallbackHandler callbackHandler = null; if (_callbackHandlerClass == null) - { - callbackHandler = new CallbackHandler() - { - @Override - public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException - { - for (Callback callback : callbacks) - { - if (callback instanceof NameCallback) - { - ((NameCallback)callback).setName(username); - } - else if (callback instanceof PasswordCallback) - { - ((PasswordCallback)callback).setPassword(credentials.toString().toCharArray()); - } - else if (callback instanceof ObjectCallback) - { - ((ObjectCallback)callback).setObject(credentials); - } - else if (callback instanceof RequestParameterCallback) - { - RequestParameterCallback rpc = (RequestParameterCallback)callback; - if (request != null) - rpc.setParameterValues(Arrays.asList(request.getParameterValues(rpc.getParameterName()))); - } - else if (callback instanceof ServletRequestCallback) - { - ((ServletRequestCallback)callback).setRequest(request); - } - else - throw new UnsupportedCallbackException(callback); - } - } - }; - } + callbackHandler = new DefaultCallbackHandler(); else { Class clazz = Loader.loadClass(_callbackHandlerClass); callbackHandler = (CallbackHandler)clazz.getDeclaredConstructor().newInstance(); - if (DefaultCallbackHandler.class.isAssignableFrom(clazz)) - { - DefaultCallbackHandler dch = (DefaultCallbackHandler)callbackHandler; - if (request instanceof Request) - dch.setRequest((Request)request); - dch.setCredential(credentials); - dch.setUserName(username); - } + } + + if (callbackHandler instanceof DefaultCallbackHandler) + { + DefaultCallbackHandler dch = (DefaultCallbackHandler)callbackHandler; + if (request instanceof Request) + dch.setRequest((Request)request); + dch.setCredential(credentials); + dch.setUserName(username); } //set up the login context Subject subject = new Subject(); - LoginContext loginContext = (_configuration == null ? new LoginContext(_loginModuleName, subject, callbackHandler) + INSTANCE.set(this); + LoginContext loginContext = + (_configuration == null ? new LoginContext(_loginModuleName, subject, callbackHandler) : new LoginContext(_loginModuleName, subject, callbackHandler, _configuration)); loginContext.login(); @@ -265,6 +233,10 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService { LOG.ignore(e); } + finally + { + INSTANCE.remove(); + } return null; } @@ -306,52 +278,36 @@ public class JAASLoginService extends AbstractLifeCycle implements LoginService protected String[] getGroups(Subject subject) { Collection groups = new LinkedHashSet<>(); - Set principals = subject.getPrincipals(); - for (Principal principal : principals) + for (Principal principal : subject.getPrincipals()) { - Class c = principal.getClass(); - while (c != null) - { - if (roleClassNameMatches(c.getName())) - { - groups.add(principal.getName()); - break; - } - - boolean added = false; - for (Class ci : c.getInterfaces()) - { - if (roleClassNameMatches(ci.getName())) - { - groups.add(principal.getName()); - added = true; - break; - } - } - - if (!added) - { - c = c.getSuperclass(); - } - else - break; - } + if (isRoleClass(principal.getClass(), Arrays.asList(getRoleClassNames()))) + groups.add(principal.getName()); } return groups.toArray(new String[groups.size()]); } - - private boolean roleClassNameMatches(String classname) + + /** + * Check whether the class, its superclasses or any interfaces they implement + * is one of the classes that represents a role. + * + * @param clazz the class to check + * @param roleClassNames the list of classnames that represent roles + * @return true if the class is a role class + */ + private static boolean isRoleClass(Class clazz, List roleClassNames) { - boolean result = false; - for (String roleClassName : getRoleClassNames()) + Class c = clazz; + + //add the class, its interfaces and superclasses to the list to test + List classnames = new ArrayList<>(); + while (c != null) { - if (roleClassName.equals(classname)) - { - result = true; - break; - } + classnames.add(c.getName()); + Arrays.stream(c.getInterfaces()).map(Class::getName).forEach(classnames::add); + c = c.getSuperclass(); } - return result; + + return roleClassNames.stream().anyMatch(classnames::contains); } } diff --git a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/PropertyUserStoreManager.java b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/PropertyUserStoreManager.java new file mode 100644 index 00000000000..bf9f00e677b --- /dev/null +++ b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/PropertyUserStoreManager.java @@ -0,0 +1,101 @@ +// +// ======================================================================== +// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others. +// ------------------------------------------------------------------------ +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// and Apache License v2.0 which accompanies this distribution. +// +// The Eclipse Public License is available at +// http://www.eclipse.org/legal/epl-v10.html +// +// The Apache License v2.0 is available at +// http://www.opensource.org/licenses/apache2.0.php +// +// You may elect to redistribute this code under either of these licenses. +// ======================================================================== +// + +package org.eclipse.jetty.jaas; + +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import org.eclipse.jetty.jaas.spi.PropertyFileLoginModule; +import org.eclipse.jetty.security.PropertyUserStore; +import org.eclipse.jetty.util.component.AbstractLifeCycle; +import org.eclipse.jetty.util.log.Log; +import org.eclipse.jetty.util.log.Logger; + +/** + * PropertyUserStoreManager + * + * Maintains a map of PropertyUserStores, keyed off the location of the property file containing + * the authentication and authorization information. + * + * This class is used to enable the PropertyUserStores to be cached and shared. This is essential + * for the PropertyFileLoginModules, whose lifecycle is controlled by the JAAS api and instantiated + * afresh whenever a user needs to be authenticated. Without this class, every PropertyFileLoginModule + * instantiation would re-read and reload in all the user information just to authenticate a single user. + */ +public class PropertyUserStoreManager extends AbstractLifeCycle +{ + private static final Logger LOG = Log.getLogger(PropertyFileLoginModule.class); + + /** + * Map of user authentication and authorization information loaded in from a property file. + * The map is keyed off the location of the file. + */ + private Map _propertyUserStores; + + public PropertyUserStore getPropertyUserStore(String file) + { + synchronized (this) + { + if (_propertyUserStores == null) + return null; + + return _propertyUserStores.get(file); + } + } + + public PropertyUserStore addPropertyUserStore(String file, PropertyUserStore store) + { + synchronized (this) + { + Objects.requireNonNull(_propertyUserStores); + PropertyUserStore existing = _propertyUserStores.get(file); + if (existing != null) + return existing; + + _propertyUserStores.put(file, store); + return store; + } + } + + @Override + protected void doStart() throws Exception + { + _propertyUserStores = new HashMap(); + super.doStart(); + } + + @Override + protected void doStop() throws Exception + { + for (Map.Entry entry: _propertyUserStores.entrySet()) + { + try + { + entry.getValue().stop(); + } + catch (Exception e) + { + LOG.warn("Error stopping PropertyUserStore at {}", entry.getKey(), e); + } + } + _propertyUserStores = null; + super.doStop(); + } +} diff --git a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/callback/DefaultCallbackHandler.java b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/callback/DefaultCallbackHandler.java index 1b3523fcb4d..c6316c077b1 100644 --- a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/callback/DefaultCallbackHandler.java +++ b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/callback/DefaultCallbackHandler.java @@ -26,7 +26,6 @@ import javax.security.auth.callback.PasswordCallback; import javax.security.auth.callback.UnsupportedCallbackException; import org.eclipse.jetty.server.Request; -import org.eclipse.jetty.util.security.Password; /** * DefaultCallbackHandler @@ -47,38 +46,34 @@ public class DefaultCallbackHandler extends AbstractCallbackHandler public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { - for (int i = 0; i < callbacks.length; i++) + for (Callback callback : callbacks) { - if (callbacks[i] instanceof NameCallback) + if (callback instanceof NameCallback) { - ((NameCallback)callbacks[i]).setName(getUserName()); + ((NameCallback)callback).setName(getUserName()); } - else if (callbacks[i] instanceof ObjectCallback) + else if (callback instanceof ObjectCallback) { - ((ObjectCallback)callbacks[i]).setObject(getCredential()); + ((ObjectCallback)callback).setObject(getCredential()); } - else if (callbacks[i] instanceof PasswordCallback) + else if (callback instanceof PasswordCallback) { - if (getCredential() instanceof Password) - ((PasswordCallback)callbacks[i]).setPassword(getCredential().toString().toCharArray()); - else if (getCredential() instanceof String) + ((PasswordCallback)callback).setPassword(getCredential().toString().toCharArray()); + } + else if (callback instanceof RequestParameterCallback) + { + if (_request != null) { - ((PasswordCallback)callbacks[i]).setPassword(((String)getCredential()).toCharArray()); + RequestParameterCallback rpc = (RequestParameterCallback)callback; + rpc.setParameterValues(Arrays.asList(_request.getParameterValues(rpc.getParameterName()))); } - else - throw new UnsupportedCallbackException(callbacks[i], "User supplied credentials cannot be converted to char[] for PasswordCallback: try using an ObjectCallback instead"); } - else if (callbacks[i] instanceof RequestParameterCallback) + else if (callback instanceof ServletRequestCallback) { - RequestParameterCallback callback = (RequestParameterCallback)callbacks[i]; - callback.setParameterValues(Arrays.asList(_request.getParameterValues(callback.getParameterName()))); - } - else if (callbacks[i] instanceof ServletRequestCallback) - { - ((ServletRequestCallback)callbacks[i]).setRequest(_request); + ((ServletRequestCallback)callback).setRequest(_request); } else - throw new UnsupportedCallbackException(callbacks[i]); + throw new UnsupportedCallbackException(callback); } } } diff --git a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModule.java b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModule.java index 79d59fd3626..47ab456c7d0 100644 --- a/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModule.java +++ b/jetty-jaas/src/main/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModule.java @@ -21,11 +21,12 @@ package org.eclipse.jetty.jaas.spi; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; import javax.security.auth.Subject; import javax.security.auth.callback.CallbackHandler; +import org.eclipse.jetty.jaas.JAASLoginService; +import org.eclipse.jetty.jaas.PropertyUserStoreManager; import org.eclipse.jetty.security.AbstractLoginService; import org.eclipse.jetty.security.PropertyUserStore; import org.eclipse.jetty.server.UserIdentity; @@ -41,14 +42,12 @@ public class PropertyFileLoginModule extends AbstractLoginModule public static final String DEFAULT_FILENAME = "realm.properties"; private static final Logger LOG = Log.getLogger(PropertyFileLoginModule.class); - - private static ConcurrentHashMap _propertyUserStores = new ConcurrentHashMap(); - - private int _refreshInterval = 0; - private String _filename = DEFAULT_FILENAME; + + private PropertyUserStore _store; /** - * Read contents of the configured property file. + * Use a PropertyUserStore to read the authentication and authorizaton information contained in + * the file named by the option "file". * * @param subject the subject * @param callbackHandler the callback handler @@ -64,40 +63,61 @@ public class PropertyFileLoginModule extends AbstractLoginModule setupPropertyUserStore(options); } + /** + * Get an existing, or create a new PropertyUserStore to read the + * authentication and authorization information from the file named by + * the option "file". + * + * @param options configuration options + */ private void setupPropertyUserStore(Map options) { - parseConfig(options); + String filename = (String)options.get("file"); + filename = (filename == null ? DEFAULT_FILENAME : filename); - if (_propertyUserStores.get(_filename) == null) + PropertyUserStoreManager mgr = JAASLoginService.INSTANCE.get().getBean(PropertyUserStoreManager.class); + if (mgr == null) + throw new IllegalStateException("No PropertyUserStoreManager"); + + _store = mgr.getPropertyUserStore(filename); + if (_store == null) { - PropertyUserStore propertyUserStore = new PropertyUserStore(); - propertyUserStore.setConfig(_filename); - - PropertyUserStore prev = _propertyUserStores.putIfAbsent(_filename, propertyUserStore); - if (prev == null) + boolean hotReload = false; + String tmp = (String)options.get("hotReload"); + if (tmp != null) + hotReload = Boolean.parseBoolean(tmp); + else { - LOG.debug("setupPropertyUserStore: Starting new PropertyUserStore. PropertiesFile: " + _filename + " refreshInterval: " + _refreshInterval); - - try + //refreshInterval is deprecated, use hotReload instead + tmp = (String)options.get("refreshInterval"); + if (tmp != null) { - propertyUserStore.start(); - } - catch (Exception e) - { - LOG.warn("Exception while starting propertyUserStore: ", e); + LOG.warn("Use 'hotReload' boolean property instead of 'refreshInterval'"); + try + { + hotReload = (Integer.parseInt(tmp) > 0); + } + catch (NumberFormatException e) + { + LOG.warn("'refreshInterval' is not an integer"); + } } } + PropertyUserStore newStore = new PropertyUserStore(); + newStore.setConfig(filename); + newStore.setHotReload(hotReload); + _store = mgr.addPropertyUserStore(filename, newStore); + try + { + _store.start(); + } + catch (Exception e) + { + LOG.warn("Exception starting propertyUserStore {} ", filename, e); + } } } - private void parseConfig(Map options) - { - String tmp = (String)options.get("file"); - _filename = (tmp == null ? DEFAULT_FILENAME : tmp); - tmp = (String)options.get("refreshInterval"); - _refreshInterval = (tmp == null ? _refreshInterval : Integer.parseInt(tmp)); - } - /** * @param userName the user name * @throws Exception if unable to get the user information @@ -105,12 +125,8 @@ public class PropertyFileLoginModule extends AbstractLoginModule @Override public UserInfo getUserInfo(String userName) throws Exception { - PropertyUserStore propertyUserStore = _propertyUserStores.get(_filename); - if (propertyUserStore == null) - throw new IllegalStateException("PropertyUserStore should never be null here!"); - - LOG.debug("Checking PropertyUserStore " + _filename + " for " + userName); - UserIdentity userIdentity = propertyUserStore.getUserIdentity(userName); + LOG.debug("Checking PropertyUserStore {} for {}", _store.getConfig(), userName); + UserIdentity userIdentity = _store.getUserIdentity(userName); if (userIdentity == null) return null; @@ -123,7 +139,6 @@ public class PropertyFileLoginModule extends AbstractLoginModule .collect(Collectors.toList()); Credential credential = (Credential)userIdentity.getSubject().getPrivateCredentials().iterator().next(); - LOG.debug("Found: " + userName + " in PropertyUserStore " + _filename); return new UserInfo(userName, credential, roles); } } diff --git a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLoginServiceTest.java b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLoginServiceTest.java index 52a45952bfd..f62fa0070ed 100644 --- a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLoginServiceTest.java +++ b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/JAASLoginServiceTest.java @@ -19,6 +19,7 @@ package org.eclipse.jetty.jaas; import java.security.Principal; +import java.util.Arrays; import java.util.Collections; import javax.security.auth.Subject; import javax.security.auth.login.AppConfigurationEntry; @@ -29,25 +30,17 @@ import org.eclipse.jetty.security.DefaultIdentityService; import org.eclipse.jetty.server.Request; import org.junit.jupiter.api.Test; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; /** * JAASLoginServiceTest */ public class JAASLoginServiceTest { - public static class TestConfiguration extends Configuration - { - AppConfigurationEntry _entry = new AppConfigurationEntry(TestLoginModule.class.getCanonicalName(), LoginModuleControlFlag.REQUIRED, Collections.emptyMap()); - - @Override - public AppConfigurationEntry[] getAppConfigurationEntry(String name) - { - return new AppConfigurationEntry[]{_entry}; - } - } - interface SomeRole { @@ -94,18 +87,31 @@ public class JAASLoginServiceTest @Test public void testServletRequestCallback() throws Exception { + Configuration config = new Configuration() + { + @Override + public AppConfigurationEntry[] getAppConfigurationEntry(String name) + { + return new AppConfigurationEntry[] { + new AppConfigurationEntry(TestLoginModule.class.getCanonicalName(), + LoginModuleControlFlag.REQUIRED, + Collections.emptyMap()) + }; + } + }; + //Test with the DefaultCallbackHandler JAASLoginService ls = new JAASLoginService("foo"); ls.setCallbackHandlerClass("org.eclipse.jetty.jaas.callback.DefaultCallbackHandler"); ls.setIdentityService(new DefaultIdentityService()); - ls.setConfiguration(new TestConfiguration()); + ls.setConfiguration(config); Request request = new Request(null, null); ls.login("aaardvaark", "aaa", request); //Test with the fallback CallbackHandler ls = new JAASLoginService("foo"); ls.setIdentityService(new DefaultIdentityService()); - ls.setConfiguration(new TestConfiguration()); + ls.setConfiguration(config); ls.login("aaardvaark", "aaa", request); } @@ -137,12 +143,8 @@ public class JAASLoginServiceTest subject.getPrincipals().add(new AnotherTestRole("z")); String[] groups = ls.getGroups(subject); - assertEquals(3, groups.length); - for (String g : groups) - { - assertTrue(g.equals("x") || g.equals("y") || g.equals("z")); - } - + assertThat(Arrays.asList(groups), containsInAnyOrder("x", "y", "z")); + //test a custom role class ls.setRoleClassNames(new String[]{AnotherTestRole.class.getName()}); Subject subject2 = new Subject(); @@ -150,8 +152,9 @@ public class JAASLoginServiceTest subject2.getPrincipals().add(new TestRole("x")); subject2.getPrincipals().add(new TestRole("y")); subject2.getPrincipals().add(new AnotherTestRole("z")); - assertEquals(1, ls.getGroups(subject2).length); - assertEquals("z", ls.getGroups(subject2)[0]); + String[] s2groups = ls.getGroups(subject2); + assertThat(s2groups, is(notNullValue())); + assertThat(Arrays.asList(s2groups), containsInAnyOrder("z")); //test a custom role class that implements an interface ls.setRoleClassNames(new String[]{SomeRole.class.getName()}); @@ -160,11 +163,9 @@ public class JAASLoginServiceTest subject3.getPrincipals().add(new TestRole("x")); subject3.getPrincipals().add(new TestRole("y")); subject3.getPrincipals().add(new AnotherTestRole("z")); - assertEquals(3, ls.getGroups(subject3).length); - for (String g : groups) - { - assertTrue(g.equals("x") || g.equals("y") || g.equals("z")); - } + String[] s3groups = ls.getGroups(subject3); + assertThat(s3groups, is(notNullValue())); + assertThat(Arrays.asList(s3groups), containsInAnyOrder("x", "y", "z")); //test a class that doesn't match ls.setRoleClassNames(new String[]{NotTestRole.class.getName()}); diff --git a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModuleTest.java b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModuleTest.java index 49fad3f36df..529bc95b54d 100644 --- a/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModuleTest.java +++ b/jetty-jaas/src/test/java/org/eclipse/jetty/jaas/spi/PropertyFileLoginModuleTest.java @@ -19,34 +19,72 @@ package org.eclipse.jetty.jaas.spi; import java.io.File; -import java.util.HashMap; -import javax.security.auth.Subject; +import java.util.Collections; +import javax.security.auth.login.AppConfigurationEntry; +import javax.security.auth.login.AppConfigurationEntry.LoginModuleControlFlag; +import javax.security.auth.login.Configuration; -import org.eclipse.jetty.jaas.callback.DefaultCallbackHandler; +import org.eclipse.jetty.jaas.JAASLoginService; +import org.eclipse.jetty.jaas.PropertyUserStoreManager; +import org.eclipse.jetty.security.DefaultIdentityService; +import org.eclipse.jetty.security.PropertyUserStore; +import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.UserIdentity; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.junit.jupiter.api.Test; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.containsInAnyOrder; -import static org.hamcrest.Matchers.not; -import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.notNullValue; +import static org.hamcrest.Matchers.nullValue; public class PropertyFileLoginModuleTest { @Test - public void testRoles() - throws Exception + public void testPropertyFileLoginModule() throws Exception { - File file = MavenTestingUtils.getTestResourceFile("login.properties"); - PropertyFileLoginModule module = new PropertyFileLoginModule(); - Subject subject = new Subject(); - HashMap options = new HashMap<>(); - options.put("file", file.getCanonicalPath()); - module.initialize(subject, new DefaultCallbackHandler(), new HashMap(), options); - UserInfo fred = module.getUserInfo("fred"); - assertEquals("fred", fred.getUserName()); - assertThat(fred.getRoleNames(), containsInAnyOrder("role1", "role2", "role3")); - assertThat(fred.getRoleNames(), not(contains("fred"))); + //configure for PropertyFileLoginModule + File loginProperties = MavenTestingUtils.getTestResourceFile("login.properties"); + + Configuration testConfig = new Configuration() + { + @Override + public AppConfigurationEntry[] getAppConfigurationEntry(String name) + { + return new AppConfigurationEntry[]{new AppConfigurationEntry(PropertyFileLoginModule.class.getName(), + LoginModuleControlFlag.REQUIRED, + Collections.singletonMap("file", loginProperties.getAbsolutePath()))}; + } + }; + + JAASLoginService ls = new JAASLoginService("foo"); + ls.setCallbackHandlerClass("org.eclipse.jetty.jaas.callback.DefaultCallbackHandler"); + ls.setIdentityService(new DefaultIdentityService()); + ls.setConfiguration(testConfig); + ls.start(); + + //test that the manager is created when the JAASLoginService starts + PropertyUserStoreManager mgr = ls.getBean(PropertyUserStoreManager.class); + assertThat(mgr, notNullValue()); + + //test the PropertyFileLoginModule authentication and authorization + Request request = new Request(null, null); + UserIdentity uid = ls.login("fred", "pwd", request); + assertThat(uid.isUserInRole("role1", null), is(true)); + assertThat(uid.isUserInRole("role2", null), is(true)); + assertThat(uid.isUserInRole("role3", null), is(true)); + assertThat(uid.isUserInRole("role4", null), is(false)); + + //Test that the PropertyUserStore is created by the PropertyFileLoginModule + PropertyUserStore store = mgr.getPropertyUserStore(loginProperties.getAbsolutePath()); + assertThat(store, is(notNullValue())); + assertThat(store.isRunning(), is(true)); + assertThat(store.isHotReload(), is(false)); + + //test that the PropertyUserStoreManager is stopped and all PropertyUserStores stopped + ls.stop(); + assertThat(mgr.isStopped(), is(true)); + assertThat(mgr.getPropertyUserStore(loginProperties.getAbsolutePath()), is(nullValue())); + assertThat(store.isStopped(), is(true)); } } From 00db5cea6e91575d5693070f383c19fcafff75f1 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Wed, 11 Nov 2020 12:45:52 -0600 Subject: [PATCH 43/45] Fixing jetty-jaas by not using apacheds-all Signed-off-by: Joakim Erdfelt --- jetty-jaas/pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index 74a67183640..7bd18741edc 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -66,10 +66,14 @@ org.apache.directory.server - apacheds-all + apacheds-test-framework ${apacheds.version} test + + junit + junit + From 3660e381488c856ae25cec297513ac174f986b18 Mon Sep 17 00:00:00 2001 From: Chris Walker Date: Wed, 11 Nov 2020 14:18:50 -0600 Subject: [PATCH 44/45] Fixes broken link to security reports. Resolves #5642 --- .../asciidoc/reference/troubleshooting/security-reports.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-documentation/src/main/asciidoc/reference/troubleshooting/security-reports.adoc b/jetty-documentation/src/main/asciidoc/reference/troubleshooting/security-reports.adoc index a652b69b281..e337f107665 100644 --- a/jetty-documentation/src/main/asciidoc/reference/troubleshooting/security-reports.adoc +++ b/jetty-documentation/src/main/asciidoc/reference/troubleshooting/security-reports.adoc @@ -21,7 +21,7 @@ ==== List of Security Reports -A current list of Jetty security reports can be viewed on the link:https://www.eclipse.org/jetty/security-reports.htmlhttps://www.eclipse.org/jetty/security-reports.html[Project Home Page.] +A current list of Jetty security reports can be viewed on the link:https://www.eclipse.org/jetty/security-reports.html[Project Home Page.] ==== Reporting Security Issues From f3278c1e81a92d876c17f386862ca11ad6789393 Mon Sep 17 00:00:00 2001 From: Chris Walker Date: Wed, 11 Nov 2020 14:24:55 -0600 Subject: [PATCH 45/45] Fixing link for secuirty reports in #5642 --- .../asciidoc/old_docs/troubleshooting/security-reports.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc b/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc index c39d6c770ab..e242a6af738 100644 --- a/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc +++ b/jetty-documentation/src/main/asciidoc/old_docs/troubleshooting/security-reports.adoc @@ -21,7 +21,7 @@ ==== List of Security Reports -A current list of Jetty security reports can be viewed on the link:https://www.eclipse.org/jetty/security-reports.htmlhttps://www.eclipse.org/jetty/security-reports.html[Project Home Page.] +A current list of Jetty security reports can be viewed on the link:https://www.eclipse.org/jetty/security-reports.html[Project Home Page.] ==== Reporting Security Issues