diff --git a/Dockerfile b/Dockerfile index 29231f3635..43260261dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,10 +22,10 @@ # # Use args for Tomcat image label to allow image builder to choose alternatives -# such as `--build-arg TOMCAT_JRE=jre8-alpine` +# such as `--build-arg TOMCAT_JRE=jre11-alpine` # -ARG TOMCAT_VERSION=8.5 -ARG TOMCAT_JRE=jdk8 +ARG TOMCAT_VERSION=10 +ARG TOMCAT_JRE=jre11 # Use official maven image for the build FROM maven:3-eclipse-temurin-8-focal AS builder diff --git a/doc/guacamole-example/pom.xml b/doc/guacamole-example/pom.xml index 1564db2d98..35c63a8374 100644 --- a/doc/guacamole-example/pom.xml +++ b/doc/guacamole-example/pom.xml @@ -96,9 +96,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/doc/guacamole-example/src/main/java/org/apache/guacamole/net/example/DummyGuacamoleTunnelServlet.java b/doc/guacamole-example/src/main/java/org/apache/guacamole/net/example/DummyGuacamoleTunnelServlet.java index 8bcfee07b4..27027cf969 100644 --- a/doc/guacamole-example/src/main/java/org/apache/guacamole/net/example/DummyGuacamoleTunnelServlet.java +++ b/doc/guacamole-example/src/main/java/org/apache/guacamole/net/example/DummyGuacamoleTunnelServlet.java @@ -19,7 +19,7 @@ package org.apache.guacamole.net.example; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.GuacamoleSocket; import org.apache.guacamole.net.GuacamoleTunnel; diff --git a/doc/licenses/apache-santuario-2.2.6/dep-coordinates.txt b/doc/licenses/apache-santuario-2.2.6/dep-coordinates.txt deleted file mode 100644 index 0a6929d5b7..0000000000 --- a/doc/licenses/apache-santuario-2.2.6/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -org.apache.santuario:xmlsec:jar:2.2.6 diff --git a/doc/licenses/apache-santuario-2.2.6/NOTICE b/doc/licenses/apache-santuario-4.0.2/NOTICE similarity index 100% rename from doc/licenses/apache-santuario-2.2.6/NOTICE rename to doc/licenses/apache-santuario-4.0.2/NOTICE diff --git a/doc/licenses/apache-santuario-2.2.6/README b/doc/licenses/apache-santuario-4.0.2/README similarity index 91% rename from doc/licenses/apache-santuario-2.2.6/README rename to doc/licenses/apache-santuario-4.0.2/README index c090590577..3db31e7395 100644 --- a/doc/licenses/apache-santuario-2.2.6/README +++ b/doc/licenses/apache-santuario-4.0.2/README @@ -1,7 +1,7 @@ Apache Santuario (https://santuario.apache.org/) ------------------------------------------------- - Version: 2.2.6 + Version: 4.0.2 From: 'Apache Software Foundation' (https://www.apache.org/) License(s): Apache v2.0 diff --git a/doc/licenses/apache-santuario-4.0.2/dep-coordinates.txt b/doc/licenses/apache-santuario-4.0.2/dep-coordinates.txt new file mode 100644 index 0000000000..51d06da1c9 --- /dev/null +++ b/doc/licenses/apache-santuario-4.0.2/dep-coordinates.txt @@ -0,0 +1 @@ +org.apache.santuario:xmlsec:jar:4.0.2 diff --git a/doc/licenses/glassfish-hk2-2.6.1/dep-coordinates.txt b/doc/licenses/glassfish-hk2-2.6.1/dep-coordinates.txt deleted file mode 100644 index 8558a5707d..0000000000 --- a/doc/licenses/glassfish-hk2-2.6.1/dep-coordinates.txt +++ /dev/null @@ -1,6 +0,0 @@ -org.glassfish.hk2.external:aopalliance-repackaged:jar:2.6.1 -org.glassfish.hk2.external:jakarta.inject:jar:2.6.1 -org.glassfish.hk2:guice-bridge:jar:2.6.1 -org.glassfish.hk2:hk2-api:jar:2.6.1 -org.glassfish.hk2:hk2-locator:jar:2.6.1 -org.glassfish.hk2:hk2-utils:jar:2.6.1 diff --git a/doc/licenses/glassfish-hk2-2.6.1/LICENSE.md b/doc/licenses/glassfish-hk2-3.1.0/LICENSE.md similarity index 100% rename from doc/licenses/glassfish-hk2-2.6.1/LICENSE.md rename to doc/licenses/glassfish-hk2-3.1.0/LICENSE.md diff --git a/doc/licenses/glassfish-hk2-2.6.1/README b/doc/licenses/glassfish-hk2-3.1.0/README similarity index 72% rename from doc/licenses/glassfish-hk2-2.6.1/README rename to doc/licenses/glassfish-hk2-3.1.0/README index 00b42cb0d1..bcd856fb0b 100644 --- a/doc/licenses/glassfish-hk2-2.6.1/README +++ b/doc/licenses/glassfish-hk2-3.1.0/README @@ -1,8 +1,8 @@ GlassFish HK2 (https://eclipse-ee4j.github.io/glassfish-hk2/) ------------------------------------------------------------- - Version: 2.6.1 + Version: 3.1.0 From: 'Eclipse Foundation' (https://www.eclipse.org/) License(s): - EPL v2.0 (bundled/glassfish-hk2-2.6.1/LICENSE.md) + EPL v2.0 (bundled/glassfish-hk2-3.0.6/LICENSE.md) diff --git a/doc/licenses/glassfish-hk2-3.1.0/dep-coordinates.txt b/doc/licenses/glassfish-hk2-3.1.0/dep-coordinates.txt new file mode 100644 index 0000000000..501624d893 --- /dev/null +++ b/doc/licenses/glassfish-hk2-3.1.0/dep-coordinates.txt @@ -0,0 +1,6 @@ +org.glassfish.hk2.external:aopalliance-repackaged:jar:3.1.0 +org.glassfish.hk2.external:jakarta.inject:jar:3.1.0 +org.glassfish.hk2:guice-bridge:jar:3.1.0 +org.glassfish.hk2:hk2-api:jar:3.1.0 +org.glassfish.hk2:hk2-locator:jar:3.1.0 +org.glassfish.hk2:hk2-utils:jar:3.1.0 diff --git a/doc/licenses/guice-5.1.0/dep-coordinates.txt b/doc/licenses/guice-5.1.0/dep-coordinates.txt deleted file mode 100644 index f338d379c3..0000000000 --- a/doc/licenses/guice-5.1.0/dep-coordinates.txt +++ /dev/null @@ -1,3 +0,0 @@ -com.google.inject:guice:jar:5.1.0 -com.google.inject.extensions:guice-assistedinject:jar:5.1.0 -com.google.inject.extensions:guice-servlet:jar:5.1.0 diff --git a/doc/licenses/guice-5.1.0/README b/doc/licenses/guice-7.0.0/README similarity index 90% rename from doc/licenses/guice-5.1.0/README rename to doc/licenses/guice-7.0.0/README index 6ba456cc15..7b2aea3851 100644 --- a/doc/licenses/guice-5.1.0/README +++ b/doc/licenses/guice-7.0.0/README @@ -1,7 +1,7 @@ Google Guice (https://github.com/google/guice) ---------------------------------------------- - Version: 5.1.0 + Version: 7.0.0 From: 'Google Inc.' (http://www.google.com/) License(s): Apache v2.0 diff --git a/doc/licenses/guice-7.0.0/dep-coordinates.txt b/doc/licenses/guice-7.0.0/dep-coordinates.txt new file mode 100644 index 0000000000..f6c516a087 --- /dev/null +++ b/doc/licenses/guice-7.0.0/dep-coordinates.txt @@ -0,0 +1,3 @@ +com.google.inject:guice:jar:7.0.0 +com.google.inject.extensions:guice-assistedinject:jar:7.0.0 +com.google.inject.extensions:guice-servlet:jar:7.0.0 diff --git a/doc/licenses/jackson-2.17.0/dep-coordinates.txt b/doc/licenses/jackson-2.17.0/dep-coordinates.txt index 26e2f46e9e..f0f11a14ff 100644 --- a/doc/licenses/jackson-2.17.0/dep-coordinates.txt +++ b/doc/licenses/jackson-2.17.0/dep-coordinates.txt @@ -2,3 +2,4 @@ com.fasterxml.jackson.core:jackson-core:jar:2.17.0 com.fasterxml.jackson.core:jackson-annotations:jar:2.17.0 com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.17.0 com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.17.0 +com.fasterxml.jackson.module:jackson-module-jakarta-xmlbind-annotations:jar:2.17.0 diff --git a/doc/licenses/jakarta-activation-1.2.2/README b/doc/licenses/jakarta-activation-1.2.2/README deleted file mode 100644 index 0320bc71a7..0000000000 --- a/doc/licenses/jakarta-activation-1.2.2/README +++ /dev/null @@ -1,8 +0,0 @@ -Jakarta Activation (https://eclipse-ee4j.github.io/jaf/) --------------------------------------------------------- - - Version: 1.2.2 - From: 'Oracle Corporation' (http://www.oracle.com/) - License(s): - BSD 3-clause (bundled/jakarta-activation-1.2.2/LICENSE.md) - diff --git a/doc/licenses/jakarta-activation-1.2.2/dep-coordinates.txt b/doc/licenses/jakarta-activation-1.2.2/dep-coordinates.txt deleted file mode 100644 index aabbe33121..0000000000 --- a/doc/licenses/jakarta-activation-1.2.2/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -jakarta.activation:jakarta.activation-api:jar:1.2.2 diff --git a/doc/licenses/jakarta-activation-1.2.2/LICENSE.md b/doc/licenses/jakarta-activation-2.1.0/LICENSE.md similarity index 100% rename from doc/licenses/jakarta-activation-1.2.2/LICENSE.md rename to doc/licenses/jakarta-activation-2.1.0/LICENSE.md diff --git a/doc/licenses/jakarta-activation-2.1.0/README b/doc/licenses/jakarta-activation-2.1.0/README new file mode 100644 index 0000000000..a1f4cc5720 --- /dev/null +++ b/doc/licenses/jakarta-activation-2.1.0/README @@ -0,0 +1,8 @@ +Jakarta Activation (https://eclipse-ee4j.github.io/jaf/) +-------------------------------------------------------- + + Version: 2.1.0 + From: 'Eclipse Foundation' (https://www.eclipse.org/) + License(s): + BSD 3-clause (bundled/jakarta-activation-2.1.0/LICENSE.md) + diff --git a/doc/licenses/jakarta-activation-2.1.0/dep-coordinates.txt b/doc/licenses/jakarta-activation-2.1.0/dep-coordinates.txt new file mode 100644 index 0000000000..695bfe7d4b --- /dev/null +++ b/doc/licenses/jakarta-activation-2.1.0/dep-coordinates.txt @@ -0,0 +1 @@ +jakarta.activation:jakarta.activation-api:jar:2.1.0 diff --git a/doc/licenses/jakarta-activation-2.1.3/LICENSE.md b/doc/licenses/jakarta-activation-2.1.3/LICENSE.md new file mode 100644 index 0000000000..e0358f9721 --- /dev/null +++ b/doc/licenses/jakarta-activation-2.1.3/LICENSE.md @@ -0,0 +1,29 @@ + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + - Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS + IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/doc/licenses/jakarta-activation-2.1.3/README b/doc/licenses/jakarta-activation-2.1.3/README new file mode 100644 index 0000000000..4c8555b5df --- /dev/null +++ b/doc/licenses/jakarta-activation-2.1.3/README @@ -0,0 +1,8 @@ +Jakarta Activation (https://eclipse-ee4j.github.io/jaf/) +-------------------------------------------------------- + + Version: 2.1.3 + From: 'Eclipse Foundation' (https://www.eclipse.org/) + License(s): + BSD 3-clause (bundled/jakarta-activation-2.1.0/LICENSE.md) + diff --git a/doc/licenses/jakarta-activation-2.1.3/dep-coordinates.txt b/doc/licenses/jakarta-activation-2.1.3/dep-coordinates.txt new file mode 100644 index 0000000000..d93eeecf8c --- /dev/null +++ b/doc/licenses/jakarta-activation-2.1.3/dep-coordinates.txt @@ -0,0 +1 @@ +jakarta.activation:jakarta.activation-api:jar:2.1.3 diff --git a/doc/licenses/jakarta-annotation-api-1.3.5/README b/doc/licenses/jakarta-annotation-api-1.3.5/README deleted file mode 100644 index 0f83cf63d1..0000000000 --- a/doc/licenses/jakarta-annotation-api-1.3.5/README +++ /dev/null @@ -1,8 +0,0 @@ -Jakarta Annotations (https://eclipse-ee4j.github.io/common-annotations-api/) ----------------------------------------------------------------------------- - - Version: 1.3.5 - From: 'Oracle Corporation' (http://www.oracle.com/) - License(s): - EPL v2.0 (bundled/jakarta-annotation-api-1.3.5/LICENSE.md) - diff --git a/doc/licenses/jakarta-annotation-api-1.3.5/dep-coordinates.txt b/doc/licenses/jakarta-annotation-api-1.3.5/dep-coordinates.txt deleted file mode 100644 index 7e5e0d34a4..0000000000 --- a/doc/licenses/jakarta-annotation-api-1.3.5/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -jakarta.annotation:jakarta.annotation-api:jar:1.3.5 diff --git a/doc/licenses/jakarta-annotation-api-1.3.5/LICENSE.md b/doc/licenses/jakarta-annotation-api-2.1.1/LICENSE.md similarity index 100% rename from doc/licenses/jakarta-annotation-api-1.3.5/LICENSE.md rename to doc/licenses/jakarta-annotation-api-2.1.1/LICENSE.md diff --git a/doc/licenses/jakarta-annotation-api-2.1.1/README b/doc/licenses/jakarta-annotation-api-2.1.1/README new file mode 100644 index 0000000000..fb4d35c63e --- /dev/null +++ b/doc/licenses/jakarta-annotation-api-2.1.1/README @@ -0,0 +1,8 @@ +Jakarta Annotations (https://jakartaee.github.io/common-annotations-api/) +------------------------------------------------------------------------- + + Version: 2.1.1 + From: 'Eclipse Foundation' (https://www.eclipse.org/) + License(s): + EPL v2.0 (bundled/jakarta-annotation-api-2.1.1/LICENSE.md) + diff --git a/doc/licenses/jakarta-annotation-api-2.1.1/dep-coordinates.txt b/doc/licenses/jakarta-annotation-api-2.1.1/dep-coordinates.txt new file mode 100644 index 0000000000..6e9afeea5f --- /dev/null +++ b/doc/licenses/jakarta-annotation-api-2.1.1/dep-coordinates.txt @@ -0,0 +1 @@ +jakarta.annotation:jakarta.annotation-api:jar:2.1.1 diff --git a/doc/licenses/jakarta-jaxb-2.3.3/dep-coordinates.txt b/doc/licenses/jakarta-jaxb-2.3.3/dep-coordinates.txt deleted file mode 100644 index 4880a45691..0000000000 --- a/doc/licenses/jakarta-jaxb-2.3.3/dep-coordinates.txt +++ /dev/null @@ -1,3 +0,0 @@ -jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3 -org.glassfish.jaxb:jaxb-runtime:jar:2.3.3 -org.glassfish.jaxb:txw2:jar:2.3.3 diff --git a/doc/licenses/jakarta-jaxb-2.3.3/LICENSE.md b/doc/licenses/jakarta-jaxb-4.0.2/LICENSE.md similarity index 100% rename from doc/licenses/jakarta-jaxb-2.3.3/LICENSE.md rename to doc/licenses/jakarta-jaxb-4.0.2/LICENSE.md diff --git a/doc/licenses/jakarta-jaxb-2.3.3/README b/doc/licenses/jakarta-jaxb-4.0.2/README similarity index 50% rename from doc/licenses/jakarta-jaxb-2.3.3/README rename to doc/licenses/jakarta-jaxb-4.0.2/README index b0d753d1a7..776a88ae57 100644 --- a/doc/licenses/jakarta-jaxb-2.3.3/README +++ b/doc/licenses/jakarta-jaxb-4.0.2/README @@ -1,8 +1,8 @@ Jakarta XML Binding (https://eclipse-ee4j.github.io/jaxb-ri/) ------------------------------------------------------------- - Version: 2.3.3 - From: 'Oracle Corporation' (http://www.oracle.com/) + Version: 4.0.2 + From: 'Eclipse Foundation' (https://www.eclipse.org) License(s): - BSD 3-clause (bundled/jakarta-jaxb-2.3.3/LICENSE.md) + BSD 3-clause (bundled/jakarta-jaxb-4.0.2/LICENSE.md) diff --git a/doc/licenses/jakarta-jaxb-4.0.2/dep-coordinates.txt b/doc/licenses/jakarta-jaxb-4.0.2/dep-coordinates.txt new file mode 100644 index 0000000000..065f605639 --- /dev/null +++ b/doc/licenses/jakarta-jaxb-4.0.2/dep-coordinates.txt @@ -0,0 +1,3 @@ +jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.2 +org.glassfish.jaxb:jaxb-runtime:jar:4.0.2 +org.glassfish.jaxb:txw2:jar:4.0.2 diff --git a/doc/licenses/jakarta-validation-api-2.0.2/dep-coordinates.txt b/doc/licenses/jakarta-validation-api-2.0.2/dep-coordinates.txt deleted file mode 100644 index f615ecfa1c..0000000000 --- a/doc/licenses/jakarta-validation-api-2.0.2/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -jakarta.validation:jakarta.validation-api:jar:2.0.2 diff --git a/doc/licenses/jakarta-validation-api-2.0.2/NOTICE b/doc/licenses/jakarta-validation-api-3.0.2/NOTICE similarity index 100% rename from doc/licenses/jakarta-validation-api-2.0.2/NOTICE rename to doc/licenses/jakarta-validation-api-3.0.2/NOTICE diff --git a/doc/licenses/jakarta-validation-api-2.0.2/README b/doc/licenses/jakarta-validation-api-3.0.2/README similarity index 66% rename from doc/licenses/jakarta-validation-api-2.0.2/README rename to doc/licenses/jakarta-validation-api-3.0.2/README index 51bf9fd209..789b218588 100644 --- a/doc/licenses/jakarta-validation-api-2.0.2/README +++ b/doc/licenses/jakarta-validation-api-3.0.2/README @@ -1,8 +1,8 @@ Jakarta Bean Validation API (https://beanvalidation.org/) --------------------------------------------------------- - Version: 2.0.2 - From: 'Red Hat Inc.' (https://www.redhat.com/) + Version: 3.0.2 + From: 'Eclipse Foundation' (https://www.eclipse.org/) License(s): Apache v2.0 diff --git a/doc/licenses/jakarta-validation-api-3.0.2/dep-coordinates.txt b/doc/licenses/jakarta-validation-api-3.0.2/dep-coordinates.txt new file mode 100644 index 0000000000..f903b320aa --- /dev/null +++ b/doc/licenses/jakarta-validation-api-3.0.2/dep-coordinates.txt @@ -0,0 +1 @@ +jakarta.validation:jakarta.validation-api:jar:3.0.2 diff --git a/doc/licenses/jakarta-ws-rs-api-2.1.6/dep-coordinates.txt b/doc/licenses/jakarta-ws-rs-api-2.1.6/dep-coordinates.txt deleted file mode 100644 index 595b485653..0000000000 --- a/doc/licenses/jakarta-ws-rs-api-2.1.6/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6 diff --git a/doc/licenses/jakarta-ws-rs-api-2.1.6/LICENSE.md b/doc/licenses/jakarta-ws-rs-api-3.1.0/LICENSE.md similarity index 100% rename from doc/licenses/jakarta-ws-rs-api-2.1.6/LICENSE.md rename to doc/licenses/jakarta-ws-rs-api-3.1.0/LICENSE.md diff --git a/doc/licenses/jakarta-ws-rs-api-2.1.6/README b/doc/licenses/jakarta-ws-rs-api-3.1.0/README similarity index 54% rename from doc/licenses/jakarta-ws-rs-api-2.1.6/README rename to doc/licenses/jakarta-ws-rs-api-3.1.0/README index 6abf8c4bec..5cf4834a54 100644 --- a/doc/licenses/jakarta-ws-rs-api-2.1.6/README +++ b/doc/licenses/jakarta-ws-rs-api-3.1.0/README @@ -1,8 +1,8 @@ Jakarta RESTful Web Services (https://github.com/eclipse-ee4j/jaxrs-api/) ------------------------------------------------------------------------- - Version: 2.1.6 - From: 'Oracle Corporation' (http://www.oracle.com/) + Version: 3.1.0 + From: 'Eclipse Foundation' (https://www.eclipse.org) License(s): - EPL v2.0 (bundled/jakarta-ws-rs-api-2.1.6/LICENSE.md) + EPL v2.0 (bundled/jakarta-ws-rs-api-3.1.0/LICENSE.md) diff --git a/doc/licenses/jakarta-ws-rs-api-3.1.0/dep-coordinates.txt b/doc/licenses/jakarta-ws-rs-api-3.1.0/dep-coordinates.txt new file mode 100644 index 0000000000..6d2c229e3d --- /dev/null +++ b/doc/licenses/jakarta-ws-rs-api-3.1.0/dep-coordinates.txt @@ -0,0 +1 @@ +jakarta.ws.rs:jakarta.ws.rs-api:jar:3.1.0 diff --git a/doc/licenses/jakarta.inject-2.0.1/README b/doc/licenses/jakarta.inject-2.0.1/README new file mode 100644 index 0000000000..49aeb89cf6 --- /dev/null +++ b/doc/licenses/jakarta.inject-2.0.1/README @@ -0,0 +1,8 @@ +Jakarta Dependency Injection (https://github.com/jakartaee/inject) +------------------------------------------------------------------ + + Version: 2.0.1 + From: 'Eclipse Foundation' (https://www.eclipse.org/) + License(s): + Apache v2.0 + diff --git a/doc/licenses/jakarta.inject-2.0.1/dep-coordinates.txt b/doc/licenses/jakarta.inject-2.0.1/dep-coordinates.txt new file mode 100644 index 0000000000..030f3197c7 --- /dev/null +++ b/doc/licenses/jakarta.inject-2.0.1/dep-coordinates.txt @@ -0,0 +1 @@ +jakarta.inject:jakarta.inject-api:jar:2.0.1 diff --git a/doc/licenses/javax.inject-1/README b/doc/licenses/javax-inject-1/README similarity index 99% rename from doc/licenses/javax.inject-1/README rename to doc/licenses/javax-inject-1/README index 716a58e97b..cee1fd8c2a 100644 --- a/doc/licenses/javax.inject-1/README +++ b/doc/licenses/javax-inject-1/README @@ -5,4 +5,3 @@ JSR-330 / Dependency Injection for Java (http://code.google.com/p/atinject/) From: 'JSR-330 Expert Group' (https://jcp.org/en/jsr/detail?id=330) License(s): Apache v2.0 - diff --git a/doc/licenses/javax.inject-1/dep-coordinates.txt b/doc/licenses/javax-inject-1/dep-coordinates.txt similarity index 100% rename from doc/licenses/javax.inject-1/dep-coordinates.txt rename to doc/licenses/javax-inject-1/dep-coordinates.txt diff --git a/doc/licenses/jcip-annotations-1.0-1/README b/doc/licenses/jcip-annotations-1.0-1/README new file mode 100644 index 0000000000..087061b60a --- /dev/null +++ b/doc/licenses/jcip-annotations-1.0-1/README @@ -0,0 +1,7 @@ +JCIP Annotations (https://github.com/stephenc/jcip-annotations) +--------------------------------------------------------------- + + Version: 1.0-1 + From: 'Stephen Connolly' (https://github.com/stephenc) + License(s): + Apache v2.0 diff --git a/doc/licenses/jcip-annotations-1.0-1/dep-coordinates.txt b/doc/licenses/jcip-annotations-1.0-1/dep-coordinates.txt new file mode 100644 index 0000000000..e42206c274 --- /dev/null +++ b/doc/licenses/jcip-annotations-1.0-1/dep-coordinates.txt @@ -0,0 +1 @@ +com.github.stephenc.jcip:jcip-annotations:jar:1.0-1 diff --git a/doc/licenses/jersey-2.42/README b/doc/licenses/jersey-2.42/README deleted file mode 100644 index 58825ea6a7..0000000000 --- a/doc/licenses/jersey-2.42/README +++ /dev/null @@ -1,8 +0,0 @@ -Jersey (https://jersey.java.net/) ---------------------------------- - - Version: 2.42 - From: 'Eclipse Foundation' (https://www.eclipse.org/) - License(s): - EPL v2.0 (bundled/jersey-2.42/LICENSE.md) - diff --git a/doc/licenses/jersey-2.42/dep-coordinates.txt b/doc/licenses/jersey-2.42/dep-coordinates.txt deleted file mode 100644 index 1337251add..0000000000 --- a/doc/licenses/jersey-2.42/dep-coordinates.txt +++ /dev/null @@ -1,7 +0,0 @@ -org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.42 -org.glassfish.jersey.core:jersey-common:jar:2.42 -org.glassfish.jersey.core:jersey-server:jar:2.42 -org.glassfish.jersey.core:jersey-client:jar:2.42 -org.glassfish.jersey.inject:jersey-hk2:jar:2.42 -org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.42 -org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.42 diff --git a/doc/licenses/jersey-2.42/LICENSE.md b/doc/licenses/jersey-3.1.6/LICENSE.md similarity index 100% rename from doc/licenses/jersey-2.42/LICENSE.md rename to doc/licenses/jersey-3.1.6/LICENSE.md diff --git a/doc/licenses/jersey-3.1.6/README b/doc/licenses/jersey-3.1.6/README new file mode 100644 index 0000000000..7b668b48f0 --- /dev/null +++ b/doc/licenses/jersey-3.1.6/README @@ -0,0 +1,8 @@ +Jersey (https://eclipse-ee4j.github.io/jersey/) +----------------------------------------------- + + Version: 3.1.6 + From: 'Eclipse Foundation' (https://www.eclipse.org/) + License(s): + EPL v2.0 (bundled/jersey-3.1.6/LICENSE.md) + diff --git a/doc/licenses/jersey-3.1.6/dep-coordinates.txt b/doc/licenses/jersey-3.1.6/dep-coordinates.txt new file mode 100644 index 0000000000..627140db2e --- /dev/null +++ b/doc/licenses/jersey-3.1.6/dep-coordinates.txt @@ -0,0 +1,7 @@ +org.glassfish.jersey.containers:jersey-container-servlet-core:jar:3.1.6 +org.glassfish.jersey.core:jersey-common:jar:3.1.6 +org.glassfish.jersey.core:jersey-server:jar:3.1.6 +org.glassfish.jersey.core:jersey-client:jar:3.1.6 +org.glassfish.jersey.inject:jersey-hk2:jar:3.1.6 +org.glassfish.jersey.media:jersey-media-json-jackson:jar:3.1.6 +org.glassfish.jersey.ext:jersey-entity-filtering:jar:3.1.6 diff --git a/doc/licenses/logging-interceptor-4.9.1/LICENSE.txt b/doc/licenses/logging-interceptor-4.12.0/LICENSE.txt similarity index 100% rename from doc/licenses/logging-interceptor-4.9.1/LICENSE.txt rename to doc/licenses/logging-interceptor-4.12.0/LICENSE.txt diff --git a/doc/licenses/logging-interceptor-4.9.1/NOTICE b/doc/licenses/logging-interceptor-4.12.0/NOTICE similarity index 100% rename from doc/licenses/logging-interceptor-4.9.1/NOTICE rename to doc/licenses/logging-interceptor-4.12.0/NOTICE diff --git a/doc/licenses/logging-interceptor-4.9.1/README b/doc/licenses/logging-interceptor-4.12.0/README similarity index 90% rename from doc/licenses/logging-interceptor-4.9.1/README rename to doc/licenses/logging-interceptor-4.12.0/README index 4755b031ce..574a2b4f1a 100644 --- a/doc/licenses/logging-interceptor-4.9.1/README +++ b/doc/licenses/logging-interceptor-4.12.0/README @@ -1,7 +1,7 @@ okhttp logging-interceptor (https://square.github.io/okhttp/) ------------------------------------------------------------- - Version: 4.9.1 + Version: 4.12.0 From: 'Square Inc' License(s): Apache v2.0 diff --git a/doc/licenses/logging-interceptor-4.12.0/dep-coordinates.txt b/doc/licenses/logging-interceptor-4.12.0/dep-coordinates.txt new file mode 100644 index 0000000000..e432d1fd3a --- /dev/null +++ b/doc/licenses/logging-interceptor-4.12.0/dep-coordinates.txt @@ -0,0 +1 @@ +com.squareup.okhttp3:logging-interceptor:jar:4.12.0 diff --git a/doc/licenses/logging-interceptor-4.9.1/dep-coordinates.txt b/doc/licenses/logging-interceptor-4.9.1/dep-coordinates.txt deleted file mode 100644 index aeab282478..0000000000 --- a/doc/licenses/logging-interceptor-4.9.1/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -com.squareup.okhttp3:logging-interceptor:jar:4.9.1 \ No newline at end of file diff --git a/doc/licenses/micrometer-metrics-1.12.4/README b/doc/licenses/micrometer-metrics-1.12.4/README new file mode 100644 index 0000000000..1fc41e4981 --- /dev/null +++ b/doc/licenses/micrometer-metrics-1.12.4/README @@ -0,0 +1,7 @@ +Micrometer Metrics (https://github.com/micrometer-metrics/micrometer) +--------------------------------------------------------------------- + + Version: 1.12.4 + From: 'Micrometer' (https://micrometer.io/) + License(s): + Apache 2.0 diff --git a/doc/licenses/micrometer-metrics-1.12.4/dep-coordinates.txt b/doc/licenses/micrometer-metrics-1.12.4/dep-coordinates.txt new file mode 100644 index 0000000000..f486282de7 --- /dev/null +++ b/doc/licenses/micrometer-metrics-1.12.4/dep-coordinates.txt @@ -0,0 +1,2 @@ +io.micrometer:micrometer-observation:jar:1.12.4 +io.micrometer:micrometer-commons:jar:1.12.4 diff --git a/doc/licenses/mybatis-3.5.15/dep-coordinates.txt b/doc/licenses/mybatis-3.5.15/dep-coordinates.txt deleted file mode 100644 index 0236032eb1..0000000000 --- a/doc/licenses/mybatis-3.5.15/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -org.mybatis:mybatis:jar:3.5.15 diff --git a/doc/licenses/mybatis-3.5.15/NOTICE b/doc/licenses/mybatis-3.5.16/NOTICE similarity index 100% rename from doc/licenses/mybatis-3.5.15/NOTICE rename to doc/licenses/mybatis-3.5.16/NOTICE diff --git a/doc/licenses/mybatis-3.5.15/README b/doc/licenses/mybatis-3.5.16/README similarity index 89% rename from doc/licenses/mybatis-3.5.15/README rename to doc/licenses/mybatis-3.5.16/README index f082c3a111..d47358eea3 100644 --- a/doc/licenses/mybatis-3.5.15/README +++ b/doc/licenses/mybatis-3.5.16/README @@ -1,7 +1,7 @@ MyBatis (http://www.mybatis.org/mybatis-3/) ------------------------------------------- - Version: 3.5.15 + Version: 3.5.16 From: 'MyBatis' (http://www.mybatis.org/) License(s): Apache v2.0 diff --git a/doc/licenses/mybatis-3.5.16/dep-coordinates.txt b/doc/licenses/mybatis-3.5.16/dep-coordinates.txt new file mode 100644 index 0000000000..1a7739c8bb --- /dev/null +++ b/doc/licenses/mybatis-3.5.16/dep-coordinates.txt @@ -0,0 +1 @@ +org.mybatis:mybatis:jar:3.5.16 diff --git a/doc/licenses/mybatis-guice-3.18/dep-coordinates.txt b/doc/licenses/mybatis-guice-3.18/dep-coordinates.txt deleted file mode 100644 index dbe9193687..0000000000 --- a/doc/licenses/mybatis-guice-3.18/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -org.mybatis:mybatis-guice:jar:3.18 diff --git a/doc/licenses/mybatis-guice-3.18/NOTICE b/doc/licenses/mybatis-guice-4.0.0/NOTICE similarity index 100% rename from doc/licenses/mybatis-guice-3.18/NOTICE rename to doc/licenses/mybatis-guice-4.0.0/NOTICE diff --git a/doc/licenses/mybatis-guice-3.18/README b/doc/licenses/mybatis-guice-4.0.0/README similarity index 90% rename from doc/licenses/mybatis-guice-3.18/README rename to doc/licenses/mybatis-guice-4.0.0/README index 9cc0c0ad42..0e3c78ca83 100644 --- a/doc/licenses/mybatis-guice-3.18/README +++ b/doc/licenses/mybatis-guice-4.0.0/README @@ -1,7 +1,7 @@ MyBatis-Guice (http://www.mybatis.org/guice/) --------------------------------------------- - Version: 3.18 + Version: 4.0.0 From: 'MyBatis' (http://www.mybatis.org/) License(s): Apache v2.0 diff --git a/doc/licenses/mybatis-guice-4.0.0/dep-coordinates.txt b/doc/licenses/mybatis-guice-4.0.0/dep-coordinates.txt new file mode 100644 index 0000000000..403798c735 --- /dev/null +++ b/doc/licenses/mybatis-guice-4.0.0/dep-coordinates.txt @@ -0,0 +1 @@ +org.mybatis:mybatis-guice:jar:4.0.0 diff --git a/doc/licenses/nimbus-jose-jwt-9.37.3/README b/doc/licenses/nimbus-jose-jwt-9.37.3/README new file mode 100644 index 0000000000..96b95125c2 --- /dev/null +++ b/doc/licenses/nimbus-jose-jwt-9.37.3/README @@ -0,0 +1,7 @@ +Nimbus JOSE+JWT (https://bitbucket.org/connect2id/nimbus-jose-jwt) +------------------------------------------------------------------ + + Version: 9.37.3 + From: 'Connect2Id Ltd' (https://connect2id.com/) + License(s): + Apache v2.0 diff --git a/doc/licenses/nimbus-jose-jwt-9.37.3/dep-coordinates.txt b/doc/licenses/nimbus-jose-jwt-9.37.3/dep-coordinates.txt new file mode 100644 index 0000000000..22c117460b --- /dev/null +++ b/doc/licenses/nimbus-jose-jwt-9.37.3/dep-coordinates.txt @@ -0,0 +1 @@ +com.nimbusds:nimbus-jose-jwt:jar:9.37.3 diff --git a/doc/licenses/okhttp-3.14.9/dep-coordinates.txt b/doc/licenses/okhttp-3.14.9/dep-coordinates.txt deleted file mode 100644 index eb6c3831bd..0000000000 --- a/doc/licenses/okhttp-3.14.9/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -com.squareup.okhttp3:okhttp:jar:3.14.9 diff --git a/doc/licenses/okhttp-3.14.9/LICENSE.txt b/doc/licenses/okhttp-4.12.0/LICENSE.txt similarity index 100% rename from doc/licenses/okhttp-3.14.9/LICENSE.txt rename to doc/licenses/okhttp-4.12.0/LICENSE.txt diff --git a/doc/licenses/okhttp-3.14.9/NOTICE b/doc/licenses/okhttp-4.12.0/NOTICE similarity index 100% rename from doc/licenses/okhttp-3.14.9/NOTICE rename to doc/licenses/okhttp-4.12.0/NOTICE diff --git a/doc/licenses/okhttp-3.14.9/README b/doc/licenses/okhttp-4.12.0/README similarity index 88% rename from doc/licenses/okhttp-3.14.9/README rename to doc/licenses/okhttp-4.12.0/README index ed470799c5..c322ec2a66 100644 --- a/doc/licenses/okhttp-3.14.9/README +++ b/doc/licenses/okhttp-4.12.0/README @@ -1,7 +1,7 @@ okhttp (https://square.github.io/okhttp/) --------------------------------------------- - Version: 3.14.9 + Version: 4.12.0 From: 'Square Inc' License(s): Apache 2.0 diff --git a/doc/licenses/okhttp-4.12.0/dep-coordinates.txt b/doc/licenses/okhttp-4.12.0/dep-coordinates.txt new file mode 100644 index 0000000000..c757ee4c00 --- /dev/null +++ b/doc/licenses/okhttp-4.12.0/dep-coordinates.txt @@ -0,0 +1 @@ +com.squareup.okhttp3:okhttp:jar:4.12.0 diff --git a/doc/licenses/okio-2.8.0/dep-coordinates.txt b/doc/licenses/okio-2.8.0/dep-coordinates.txt deleted file mode 100644 index 88c8776ad2..0000000000 --- a/doc/licenses/okio-2.8.0/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -com.squareup.okio:okio:jar:2.8.0 diff --git a/doc/licenses/okio-2.8.0/LICENSE.txt b/doc/licenses/okio-3.6.0/LICENSE.txt similarity index 100% rename from doc/licenses/okio-2.8.0/LICENSE.txt rename to doc/licenses/okio-3.6.0/LICENSE.txt diff --git a/doc/licenses/okio-2.8.0/NOTICE b/doc/licenses/okio-3.6.0/NOTICE similarity index 100% rename from doc/licenses/okio-2.8.0/NOTICE rename to doc/licenses/okio-3.6.0/NOTICE diff --git a/doc/licenses/okio-2.8.0/README b/doc/licenses/okio-3.6.0/README similarity index 62% rename from doc/licenses/okio-2.8.0/README rename to doc/licenses/okio-3.6.0/README index cf4693dbd7..fb501f1070 100644 --- a/doc/licenses/okio-2.8.0/README +++ b/doc/licenses/okio-3.6.0/README @@ -1,7 +1,7 @@ okio (https://square.github.io/okio/) --------------------------------------------- - Version: 2.8.0 + Version: 3.6.0 From: 'Square Inc' License(s): - Apache 2.0 (bundled/retrofit-2.9.0/LICENSE.txt) + Apache 2.0 (bundled/retrofit-3.6.0/LICENSE.txt) diff --git a/doc/licenses/okio-3.6.0/dep-coordinates.txt b/doc/licenses/okio-3.6.0/dep-coordinates.txt new file mode 100644 index 0000000000..b785b2613d --- /dev/null +++ b/doc/licenses/okio-3.6.0/dep-coordinates.txt @@ -0,0 +1,2 @@ +com.squareup.okio:okio:jar:3.6.0 +com.squareup.okio:okio-jvm:jar:3.6.0 diff --git a/doc/licenses/spring-web-5.3.25/dep-coordinates.txt b/doc/licenses/spring-web-5.3.25/dep-coordinates.txt deleted file mode 100644 index 0670c0fa8d..0000000000 --- a/doc/licenses/spring-web-5.3.25/dep-coordinates.txt +++ /dev/null @@ -1,4 +0,0 @@ -org.springframework:spring-web:jar:5.3.25 -org.springframework:spring-beans:jar:5.3.25 -org.springframework:spring-core:jar:5.3.25 -org.springframework:spring-jcl:jar:5.3.25 diff --git a/doc/licenses/spring-web-5.3.25/LICENSE b/doc/licenses/spring-web-5.3.33/LICENSE similarity index 100% rename from doc/licenses/spring-web-5.3.25/LICENSE rename to doc/licenses/spring-web-5.3.33/LICENSE diff --git a/doc/licenses/spring-web-5.3.25/README b/doc/licenses/spring-web-5.3.33/README similarity index 91% rename from doc/licenses/spring-web-5.3.25/README rename to doc/licenses/spring-web-5.3.33/README index f719e88ff7..48b1f0358f 100644 --- a/doc/licenses/spring-web-5.3.25/README +++ b/doc/licenses/spring-web-5.3.33/README @@ -1,7 +1,7 @@ Spring Framework (https://spring.io/projects/spring-framework) -------------------------------------------------------------- - Version: 5.3.25 + Version: 5.3.33 From: 'Spring' (https://spring.io/) License(s): Apache v2.0 diff --git a/doc/licenses/spring-web-5.3.33/dep-coordinates.txt b/doc/licenses/spring-web-5.3.33/dep-coordinates.txt new file mode 100644 index 0000000000..442a22e196 --- /dev/null +++ b/doc/licenses/spring-web-5.3.33/dep-coordinates.txt @@ -0,0 +1,4 @@ +org.springframework:spring-web:jar:5.3.33 +org.springframework:spring-beans:jar:5.3.33 +org.springframework:spring-core:jar:5.3.33 +org.springframework:spring-jcl:jar:5.3.33 diff --git a/doc/licenses/woodstox-core-5.4.0/dep-coordinates.txt b/doc/licenses/woodstox-core-5.4.0/dep-coordinates.txt deleted file mode 100644 index e879f958a7..0000000000 --- a/doc/licenses/woodstox-core-5.4.0/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -com.fasterxml.woodstox:woodstox-core:jar:5.4.0 diff --git a/doc/licenses/woodstox-core-5.4.0/README b/doc/licenses/woodstox-core-6.6.0/README similarity index 91% rename from doc/licenses/woodstox-core-5.4.0/README rename to doc/licenses/woodstox-core-6.6.0/README index 400423b3c2..dc91aa750e 100644 --- a/doc/licenses/woodstox-core-5.4.0/README +++ b/doc/licenses/woodstox-core-6.6.0/README @@ -1,7 +1,7 @@ Woodstox Core (https://github.com/FasterXML/woodstox) ------------------------------------------------------ - Version: 5.4.0 + Version: 6.6.0 From: 'FasterXML, LLC' (http://fasterxml.com/) License(s): Apache v2.0 diff --git a/doc/licenses/woodstox-core-6.6.0/dep-coordinates.txt b/doc/licenses/woodstox-core-6.6.0/dep-coordinates.txt new file mode 100644 index 0000000000..ee286a084e --- /dev/null +++ b/doc/licenses/woodstox-core-6.6.0/dep-coordinates.txt @@ -0,0 +1 @@ +com.fasterxml.woodstox:woodstox-core:jar:6.6.0 diff --git a/doc/licenses/woodstox-stax2-api-4.2/LICENSE b/doc/licenses/woodstox-stax2-api-4.2.2/LICENSE similarity index 100% rename from doc/licenses/woodstox-stax2-api-4.2/LICENSE rename to doc/licenses/woodstox-stax2-api-4.2.2/LICENSE diff --git a/doc/licenses/woodstox-stax2-api-4.2/README b/doc/licenses/woodstox-stax2-api-4.2.2/README similarity index 93% rename from doc/licenses/woodstox-stax2-api-4.2/README rename to doc/licenses/woodstox-stax2-api-4.2.2/README index 9666e4bba7..0341a09f56 100644 --- a/doc/licenses/woodstox-stax2-api-4.2/README +++ b/doc/licenses/woodstox-stax2-api-4.2.2/README @@ -1,7 +1,7 @@ Woodstox Stax2-API (https://github.com/FasterXML/stax2-api) ------------------------------------------------------------ - Version: 4.2 + Version: 4.2.2 From: 'FasterXML, LLC' (http://fasterxml.com/) License(s): BSD Simplified (bundled/woodstox-stax2-api-4.2/LICENSE) diff --git a/doc/licenses/woodstox-stax2-api-4.2.2/dep-coordinates.txt b/doc/licenses/woodstox-stax2-api-4.2.2/dep-coordinates.txt new file mode 100644 index 0000000000..824c5a9410 --- /dev/null +++ b/doc/licenses/woodstox-stax2-api-4.2.2/dep-coordinates.txt @@ -0,0 +1 @@ +org.codehaus.woodstox:stax2-api:jar:4.2.2 diff --git a/doc/licenses/woodstox-stax2-api-4.2/dep-coordinates.txt b/doc/licenses/woodstox-stax2-api-4.2/dep-coordinates.txt deleted file mode 100644 index c7bbc763fd..0000000000 --- a/doc/licenses/woodstox-stax2-api-4.2/dep-coordinates.txt +++ /dev/null @@ -1 +0,0 @@ -org.codehaus.woodstox:stax2-api:jar:4.2 diff --git a/extensions/guacamole-auth-ban/pom.xml b/extensions/guacamole-auth-ban/pom.xml index 8b7e90f4ed..a03f8ad066 100644 --- a/extensions/guacamole-auth-ban/pom.xml +++ b/extensions/guacamole-auth-ban/pom.xml @@ -41,9 +41,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/extensions/guacamole-auth-duo/pom.xml b/extensions/guacamole-auth-duo/pom.xml index f7f49563c2..6f370d6656 100644 --- a/extensions/guacamole-auth-duo/pom.xml +++ b/extensions/guacamole-auth-duo/pom.xml @@ -47,20 +47,32 @@ com.squareup.okhttp3 okhttp - 4.9.1 + 4.12.0 + + + + com.squareup.okhttp3 + logging-interceptor + 4.12.0 org.jetbrains.kotlin kotlin-stdlib-common - 1.4.10 + 1.9.23 org.jetbrains.kotlin kotlin-stdlib - 1.4.10 + 1.9.23 + + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + 1.9.23 @@ -90,9 +102,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided @@ -102,12 +114,12 @@ duo-universal-sdk 1.1.3 - + org.springframework spring-web - 5.3.25 + 5.3.33 diff --git a/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java b/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java index 26ab71221e..52fd742101 100644 --- a/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java +++ b/extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java @@ -23,10 +23,10 @@ import com.duosecurity.exception.DuoException; import com.duosecurity.model.Token; import com.google.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; import java.net.URI; import java.net.URISyntaxException; import java.util.Collections; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleServerException; import org.apache.guacamole.auth.duo.conf.ConfigurationService; diff --git a/extensions/guacamole-auth-header/pom.xml b/extensions/guacamole-auth-header/pom.xml index b28a535bbb..d8cbc19e8c 100644 --- a/extensions/guacamole-auth-header/pom.xml +++ b/extensions/guacamole-auth-header/pom.xml @@ -55,9 +55,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java b/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java index c343be4c51..19eb080c8f 100644 --- a/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java +++ b/extensions/guacamole-auth-header/src/main/java/org/apache/guacamole/auth/header/AuthenticationProviderService.java @@ -21,13 +21,12 @@ import com.google.inject.Inject; import com.google.inject.Provider; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.Credentials; import org.apache.guacamole.net.auth.credentials.CredentialsInfo; import org.apache.guacamole.net.auth.credentials.GuacamoleInvalidCredentialsException; import org.apache.guacamole.auth.header.user.AuthenticatedUser; -import java.security.Principal; /** * Service providing convenience functions for the HTTP Header diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml index bc2220380d..154b519826 100644 --- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml +++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/pom.xml @@ -40,9 +40,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided @@ -57,14 +57,14 @@ org.mybatis mybatis - 3.5.15 + 3.5.16 org.mybatis mybatis-guice - 3.18 + 4.0.0 - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/RequestValidationService.java b/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/RequestValidationService.java index 4ec8fc6a2a..a8d36ea91f 100644 --- a/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/RequestValidationService.java +++ b/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/RequestValidationService.java @@ -20,10 +20,9 @@ package org.apache.guacamole.auth.json; import com.google.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; import inet.ipaddr.IPAddressString; -import java.util.ArrayList; import java.util.Collection; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.GuacamoleException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/user/UserDataService.java b/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/user/UserDataService.java index e3fee11e32..203167b4aa 100644 --- a/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/user/UserDataService.java +++ b/extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/user/UserDataService.java @@ -25,13 +25,13 @@ import com.google.inject.Provider; import com.google.inject.Singleton; import java.io.IOException; +import jakarta.servlet.http.HttpServletRequest; import java.io.UnsupportedEncodingException; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.auth.json.ConfigurationService; import org.apache.guacamole.auth.json.CryptoService; diff --git a/extensions/guacamole-auth-json/src/test/java/org/apache/guacamole/auth/json/RequestValidationServiceTest.java b/extensions/guacamole-auth-json/src/test/java/org/apache/guacamole/auth/json/RequestValidationServiceTest.java index ed5d77ce31..91d1ba5c4f 100644 --- a/extensions/guacamole-auth-json/src/test/java/org/apache/guacamole/auth/json/RequestValidationServiceTest.java +++ b/extensions/guacamole-auth-json/src/test/java/org/apache/guacamole/auth/json/RequestValidationServiceTest.java @@ -19,6 +19,20 @@ package org.apache.guacamole.auth.json; +import jakarta.servlet.AsyncContext; +import jakarta.servlet.DispatcherType; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpUpgradeHandler; +import jakarta.servlet.http.Part; +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletConnection; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletInputStream; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; import java.io.BufferedReader; import java.security.Principal; import java.util.Arrays; @@ -28,11 +42,6 @@ import java.util.Locale; import java.util.Map; import java.util.regex.Pattern; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; -import javax.servlet.ServletInputStream; -import javax.servlet.RequestDispatcher; import org.junit.Test; import static org.junit.Assert.*; @@ -89,6 +98,21 @@ private static HttpServletRequest mockHttpServletRequest(String remoteAddr) { return new HttpServletRequest() { + @Override + public boolean authenticate(HttpServletResponse response) { + return false; + } + + @Override + public String changeSessionId() { + return null; + } + + @Override + public AsyncContext getAsyncContext() { + return null; + } + @Override public Object getAttribute(String name) { return null; @@ -113,6 +137,11 @@ public String getCharacterEncoding() { public int getContentLength() { return 0; } + + @Override + public long getContentLengthLong() { + return 0; + } @Override public String getContentType() { @@ -133,6 +162,11 @@ public Cookie[] getCookies() { public long getDateHeader(String name) { return 0; } + + @Override + public DispatcherType getDispatcherType() { + return null; + } @Override public String getHeader(String name) { @@ -208,6 +242,16 @@ public Enumeration getParameterNames() { public String[] getParameterValues(String name) { return null; } + + @Override + public Part getPart(String part) { + return null; + } + + @Override + public Collection getParts() { + return Collections.emptySet(); + } @Override public String getPathInfo() { @@ -223,20 +267,19 @@ public String getPathTranslated() { public String getProtocol() { return null; } - + @Override - public String getQueryString() { + public String getProtocolRequestId() { return null; } @Override - public BufferedReader getReader() { + public String getQueryString() { return null; } @Override - @Deprecated - public String getRealPath(String path) { + public BufferedReader getReader() { return null; } @@ -270,6 +313,11 @@ public String getRequestedSessionId() { return null; } + @Override + public String getRequestId() { + return null; + } + @Override public String getRequestURI() { return null; @@ -285,6 +333,16 @@ public String getScheme() { return null; } + @Override + public ServletConnection getServletConnection() { + return null; + } + + @Override + public ServletContext getServletContext() { + return null; + } + @Override public String getServerName() { return null; @@ -316,13 +374,17 @@ public Principal getUserPrincipal() { } @Override - public boolean isRequestedSessionIdFromCookie() { + public boolean isAsyncStarted() { return false; } - + @Override - @Deprecated - public boolean isRequestedSessionIdFromUrl() { + public boolean isAsyncSupported() { + return false; + } + + @Override + public boolean isRequestedSessionIdFromCookie() { return false; } @@ -345,6 +407,16 @@ public boolean isSecure() { public boolean isUserInRole(String role) { return false; } + + @Override + public void login(String username, String password) { + return; + } + + @Override + public void logout() { + return; + } @Override public void removeAttribute(String name) { @@ -360,6 +432,21 @@ public void setAttribute(String name, Object o) { public void setCharacterEncoding(String env) { return; } + + @Override + public AsyncContext startAsync() { + return null; + } + + @Override + public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) { + return null; + } + + @Override + public T upgrade(Class handlerClass) { + return null; + } }; diff --git a/extensions/guacamole-auth-quickconnect/pom.xml b/extensions/guacamole-auth-quickconnect/pom.xml index e72776f721..9f1116dbe2 100644 --- a/extensions/guacamole-auth-quickconnect/pom.xml +++ b/extensions/guacamole-auth-quickconnect/pom.xml @@ -110,9 +110,9 @@ - javax.ws.rs - jsr311-api - 1.1.1 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/rest/QuickConnectREST.java b/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/rest/QuickConnectREST.java index eec1c641a4..38faf4811d 100644 --- a/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/rest/QuickConnectREST.java +++ b/extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/rest/QuickConnectREST.java @@ -19,13 +19,13 @@ package org.apache.guacamole.auth.quickconnect.rest; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.Collections; import java.util.Map; -import javax.ws.rs.FormParam; -import javax.ws.rs.Path; -import javax.ws.rs.POST; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.auth.quickconnect.QuickConnectDirectory; import org.apache.guacamole.auth.quickconnect.utility.QCParser; diff --git a/extensions/guacamole-auth-radius/pom.xml b/extensions/guacamole-auth-radius/pom.xml index d7e86fffcf..7924e62705 100644 --- a/extensions/guacamole-auth-radius/pom.xml +++ b/extensions/guacamole-auth-radius/pom.xml @@ -133,9 +133,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java index e5e4f57975..ec4a002158 100644 --- a/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java +++ b/extensions/guacamole-auth-radius/src/main/java/org/apache/guacamole/auth/radius/AuthenticationProviderService.java @@ -22,8 +22,8 @@ import com.google.common.io.BaseEncoding; import com.google.inject.Inject; import com.google.inject.Provider; +import jakarta.servlet.http.HttpServletRequest; import java.util.Arrays; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.auth.radius.user.AuthenticatedUser; import org.apache.guacamole.auth.radius.form.GuacamoleRadiusChallenge; import org.apache.guacamole.auth.radius.form.RadiusStateField; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml index d6b9a9061e..8781678ae0 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/pom.xml @@ -52,8 +52,9 @@ - javax.ws.rs - jsr311-api + jakarta.ws.rs + jakarta.ws.rs-api + 3.1.0 diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/SSOResource.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/SSOResource.java index 91bd39ba2a..d44c843654 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/SSOResource.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-base/src/main/java/org/apache/guacamole/auth/sso/SSOResource.java @@ -19,9 +19,9 @@ package org.apache.guacamole.auth.sso; import com.google.inject.Inject; -import javax.ws.rs.core.Response; -import javax.ws.rs.GET; -import javax.ws.rs.Path; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; import org.apache.guacamole.GuacamoleException; /** diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml index b242400e3a..5f0d123470 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/pom.xml @@ -94,14 +94,17 @@ - javax.servlet - servlet-api + jakarta.platform + jakarta.jakartaee-api + 10.0.0 + provided - javax.ws.rs - jsr311-api + jakarta.ws.rs + jakarta.ws.rs-api + 3.1.0 @@ -124,16 +127,9 @@ - javax.xml.bind - jaxb-api - 2.3.1 - - - - - commons-codec - commons-codec - 1.16.1 + jakarta.xml.bind + jakarta.xml.bind-api + 4.0.2 diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java index f1e393d96d..e8503257c7 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/AuthenticationProviderService.java @@ -21,10 +21,10 @@ import com.google.inject.Inject; import com.google.inject.Singleton; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.core.UriBuilder; import java.net.URI; import java.util.Arrays; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.UriBuilder; import org.apache.guacamole.form.Field; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.Credentials; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java index 8b53b6982b..3ae9222e28 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-cas/src/main/java/org/apache/guacamole/auth/cas/ticket/TicketValidationService.java @@ -26,10 +26,6 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; -import javax.crypto.BadPaddingException; -import javax.crypto.Cipher; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.NoSuchPaddingException; import java.nio.charset.Charset; import java.util.Collection; import java.util.Collections; @@ -37,6 +33,10 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleSecurityException; import org.apache.guacamole.GuacamoleServerException; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml index f2e0c34cb8..63cfcdd2fa 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/pom.xml @@ -117,14 +117,17 @@ - javax.servlet - servlet-api + jakarta.platform + jakarta.jakartaee-api + 10.0.0 + provided - javax.ws.rs - jsr311-api + jakarta.ws.rs + jakarta.ws.rs-api + 3.1.0 diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/java/org/apache/guacamole/auth/openid/AuthenticationProviderService.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/java/org/apache/guacamole/auth/openid/AuthenticationProviderService.java index 17301f5b64..a804583440 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/java/org/apache/guacamole/auth/openid/AuthenticationProviderService.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-openid/src/main/java/org/apache/guacamole/auth/openid/AuthenticationProviderService.java @@ -22,13 +22,13 @@ import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.core.UriBuilder; import java.net.URI; import java.util.Arrays; import java.util.Collections; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.UriBuilder; import org.apache.guacamole.auth.openid.conf.ConfigurationService; import org.apache.guacamole.auth.openid.token.TokenValidationService; import org.apache.guacamole.GuacamoleException; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml index 4bd79c7515..2dfda4ec39 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/pom.xml @@ -59,14 +59,25 @@ - javax.servlet - servlet-api + jakarta.platform + jakarta.jakartaee-api + 10.0.0 + provided - javax.ws.rs - jsr311-api + jakarta.ws.rs + jakarta.ws.rs-api + 3.1.0 + + + + + javax.servlet + servlet-api + 2.5 + provided @@ -122,28 +133,14 @@ com.fasterxml.woodstox woodstox-core - 5.4.0 + 6.6.0 org.apache.santuario xmlsec - 2.2.6 - - - - - commons-codec - commons-codec - - - + 4.0.2 diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/AuthenticationProviderService.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/AuthenticationProviderService.java index 2c7990c4f9..b2551f428f 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/AuthenticationProviderService.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/AuthenticationProviderService.java @@ -22,9 +22,9 @@ import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; +import jakarta.servlet.http.HttpServletRequest; import java.net.URI; import java.util.Arrays; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.auth.saml.user.SAMLAuthenticatedUser; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.auth.saml.acs.AssertedIdentity; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/acs/AssertionConsumerServiceResource.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/acs/AssertionConsumerServiceResource.java index 7aadc73f52..8e80a2eb22 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/acs/AssertionConsumerServiceResource.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/acs/AssertionConsumerServiceResource.java @@ -19,14 +19,14 @@ package org.apache.guacamole.auth.saml.acs; import com.google.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.UriBuilder; import java.net.URI; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.core.Response; -import javax.ws.rs.FormParam; -import javax.ws.rs.Path; -import javax.ws.rs.POST; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.UriBuilder; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.auth.saml.AuthenticationProviderService; import org.apache.guacamole.auth.saml.conf.ConfigurationService; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/conf/ConfigurationService.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/conf/ConfigurationService.java index 47ead88208..945bdfe811 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/conf/ConfigurationService.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-saml/src/main/java/org/apache/guacamole/auth/saml/conf/ConfigurationService.java @@ -24,6 +24,7 @@ import com.onelogin.saml2.settings.Saml2Settings; import com.onelogin.saml2.settings.SettingsBuilder; import com.onelogin.saml2.util.Constants; +import jakarta.ws.rs.core.UriBuilder; import java.io.File; import java.io.IOException; import java.net.URI; @@ -31,7 +32,6 @@ import java.nio.file.Files; import java.util.HashMap; import java.util.Map; -import javax.ws.rs.core.UriBuilder; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleServerException; import org.apache.guacamole.environment.Environment; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml index 8926517df2..b7e08615bf 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/pom.xml @@ -109,14 +109,17 @@ - javax.servlet - servlet-api + jakarta.platform + jakarta.jakartaee-api + 10.0.0 + provided - javax.ws.rs - jsr311-api + jakarta.ws.rs + jakarta.ws.rs-api + 3.1.0 diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/AuthenticationProviderService.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/AuthenticationProviderService.java index 49d8daaffd..898d1f5c47 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/AuthenticationProviderService.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/AuthenticationProviderService.java @@ -22,10 +22,10 @@ import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.Singleton; +import jakarta.servlet.http.HttpServletRequest; import java.net.URI; import java.util.Arrays; import java.util.Collections; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.auth.ssl.conf.ConfigurationService; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/SSLClientAuthenticationResource.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/SSLClientAuthenticationResource.java index 984a68f343..f079285d1f 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/SSLClientAuthenticationResource.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/SSLClientAuthenticationResource.java @@ -19,6 +19,14 @@ package org.apache.guacamole.auth.ssl; import com.google.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.UriBuilder; import java.io.IOException; import java.io.Reader; import java.io.StringReader; @@ -32,14 +40,6 @@ import javax.naming.InvalidNameException; import javax.naming.ldap.LdapName; import javax.naming.ldap.Rdn; -import javax.ws.rs.GET; -import javax.ws.rs.core.Response; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.Path; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriBuilder; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; diff --git a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/conf/ConfigurationService.java b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/conf/ConfigurationService.java index 48fc86b654..4164577b83 100644 --- a/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/conf/ConfigurationService.java +++ b/extensions/guacamole-auth-sso/modules/guacamole-auth-sso-ssl/src/main/java/org/apache/guacamole/auth/ssl/conf/ConfigurationService.java @@ -20,11 +20,11 @@ package org.apache.guacamole.auth.ssl.conf; import com.google.inject.Inject; +import jakarta.ws.rs.core.UriBuilder; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import javax.naming.ldap.LdapName; -import javax.ws.rs.core.UriBuilder; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleServerException; import org.apache.guacamole.environment.Environment; diff --git a/extensions/guacamole-auth-sso/pom.xml b/extensions/guacamole-auth-sso/pom.xml index 5c76f3d373..c82ba6e714 100644 --- a/extensions/guacamole-auth-sso/pom.xml +++ b/extensions/guacamole-auth-sso/pom.xml @@ -73,17 +73,17 @@ - javax.servlet + jakarta.servlet servlet-api - 2.5 + 6.1.0-M2 provided - javax.ws.rs + jakarta.ws.rs jsr311-api - 1.1.1 + 4.0.0-M2 provided diff --git a/extensions/guacamole-auth-totp/pom.xml b/extensions/guacamole-auth-totp/pom.xml index 794fc08736..82a286c017 100644 --- a/extensions/guacamole-auth-totp/pom.xml +++ b/extensions/guacamole-auth-totp/pom.xml @@ -145,9 +145,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided @@ -172,9 +172,9 @@ - javax.ws.rs - javax.ws.rs-api - 2.0 + jakarta.ws.rs + jakarta.ws.rs-api + 3.1.0 provided diff --git a/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java b/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java index 46661f79eb..0b73f9dd5d 100644 --- a/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java +++ b/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/form/AuthenticationCodeField.java @@ -26,10 +26,10 @@ import com.google.zxing.client.j2se.MatrixToImageWriter; import com.google.zxing.common.BitMatrix; import com.google.zxing.qrcode.QRCodeWriter; +import jakarta.ws.rs.core.UriBuilder; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.URI; -import javax.ws.rs.core.UriBuilder; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.auth.totp.user.UserTOTPKey; import org.apache.guacamole.auth.totp.conf.ConfigurationService; diff --git a/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java b/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java index 027a228cdc..b713459313 100644 --- a/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java +++ b/extensions/guacamole-auth-totp/src/main/java/org/apache/guacamole/auth/totp/user/UserVerificationService.java @@ -22,12 +22,12 @@ import com.google.common.io.BaseEncoding; import com.google.inject.Inject; import com.google.inject.Provider; +import jakarta.servlet.http.HttpServletRequest; import java.security.InvalidKeyException; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleSecurityException; import org.apache.guacamole.GuacamoleUnsupportedException; diff --git a/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml b/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml index bdc5035621..1ba26b1295 100644 --- a/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml +++ b/extensions/guacamole-vault/modules/guacamole-vault-base/pom.xml @@ -74,6 +74,12 @@ com.google.inject.extensions guice-assistedinject + + + com.google.errorprone + error_prone_annotations + + diff --git a/extensions/guacamole-vault/modules/guacamole-vault-base/src/main/java/org/apache/guacamole/vault/secret/WindowsUsername.java b/extensions/guacamole-vault/modules/guacamole-vault-base/src/main/java/org/apache/guacamole/vault/secret/WindowsUsername.java index 36d8a1b05c..3028e88490 100644 --- a/extensions/guacamole-vault/modules/guacamole-vault-base/src/main/java/org/apache/guacamole/vault/secret/WindowsUsername.java +++ b/extensions/guacamole-vault/modules/guacamole-vault-base/src/main/java/org/apache/guacamole/vault/secret/WindowsUsername.java @@ -21,7 +21,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; - import javax.annotation.Nonnull; /** diff --git a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/conf/KsmConfigurationService.java b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/conf/KsmConfigurationService.java index 197b979e24..be5604d813 100644 --- a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/conf/KsmConfigurationService.java +++ b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/conf/KsmConfigurationService.java @@ -21,9 +21,10 @@ import com.google.inject.Inject; import com.google.inject.Singleton; - +import com.keepersecurity.secretsManager.core.InMemoryStorage; +import com.keepersecurity.secretsManager.core.KeyValueStorage; +import com.keepersecurity.secretsManager.core.SecretsManagerOptions; import javax.annotation.Nonnull; - import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleServerException; import org.apache.guacamole.environment.Environment; @@ -32,10 +33,6 @@ import org.apache.guacamole.properties.StringGuacamoleProperty; import org.apache.guacamole.vault.conf.VaultConfigurationService; -import com.keepersecurity.secretsManager.core.InMemoryStorage; -import com.keepersecurity.secretsManager.core.KeyValueStorage; -import com.keepersecurity.secretsManager.core.SecretsManagerOptions; - /** * Service for retrieving configuration information regarding the Keeper * Secrets Manager authentication extension. diff --git a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java index 1dbcd73a8e..d77dc4c1ed 100644 --- a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java +++ b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java @@ -29,7 +29,6 @@ import com.keepersecurity.secretsManager.core.Notation; import com.keepersecurity.secretsManager.core.SecretsManager; import com.keepersecurity.secretsManager.core.SecretsManagerOptions; - import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -43,9 +42,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.regex.Matcher; import java.util.regex.Pattern; - import javax.annotation.Nullable; - import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.vault.ksm.conf.KsmConfigurationService; import org.apache.guacamole.vault.secret.WindowsUsername; diff --git a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClientFactory.java b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClientFactory.java index d977118931..d44360d030 100644 --- a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClientFactory.java +++ b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClientFactory.java @@ -19,9 +19,8 @@ package org.apache.guacamole.vault.ksm.secret; -import javax.annotation.Nonnull; - import com.keepersecurity.secretsManager.core.SecretsManagerOptions; +import javax.annotation.Nonnull; /** * Factory for creating KsmClient instances. diff --git a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmSecretService.java b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmSecretService.java index 717a125e34..7d29c88407 100644 --- a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmSecretService.java +++ b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmSecretService.java @@ -24,23 +24,17 @@ import com.google.inject.Singleton; import com.keepersecurity.secretsManager.core.KeeperRecord; import com.keepersecurity.secretsManager.core.SecretsManagerOptions; - import java.io.UnsupportedEncodingException; import java.net.URLEncoder; -import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; -import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Future; - import javax.annotation.Nonnull; - import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.Attributes; import org.apache.guacamole.net.auth.Connectable; diff --git a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/UserLogin.java b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/UserLogin.java index 5cd50ee6c0..ae8ea4fc5a 100644 --- a/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/UserLogin.java +++ b/extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/UserLogin.java @@ -20,7 +20,6 @@ package org.apache.guacamole.vault.ksm.secret; import java.util.Objects; - import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/guacamole-common/pom.xml b/guacamole-common/pom.xml index 492960567d..817301aafa 100644 --- a/guacamole-common/pom.xml +++ b/guacamole-common/pom.xml @@ -74,20 +74,11 @@ - - - - javax.servlet - servlet-api - 2.5 - provided - - - + - javax.websocket - javax.websocket-api - 1.0 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java b/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java index 918ca206bc..9f9ed77a4d 100644 --- a/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java +++ b/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelMap.java @@ -62,7 +62,7 @@ class GuacamoleHTTPTunnelMap { * session tokens. */ private final ConcurrentMap tunnelMap = - new ConcurrentHashMap(); + new ConcurrentHashMap<>(); /** * Creates a new GuacamoleHTTPTunnelMap which automatically closes and diff --git a/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java b/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java index 4920769332..5d06adbc6d 100644 --- a/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java +++ b/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java @@ -19,6 +19,10 @@ package org.apache.guacamole.servlet; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; @@ -27,10 +31,6 @@ import java.io.Writer; import java.security.SecureRandom; import java.util.Base64; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.GuacamoleConnectionClosedException; import org.apache.guacamole.GuacamoleException; @@ -137,23 +137,6 @@ protected void registerTunnel(String tunnelSessionToken, GuacamoleTunnel tunnel) logger.debug("Registered tunnel \"{}\".", tunnel.getUUID()); } - /** - * Deregisters the given tunnel such that future read/write requests to - * that tunnel will be rejected. - * - * @deprecated - * This function has been deprecated in favor of {@link #deregisterTunnel(java.lang.String)}, - * which decouples identification of HTTP tunnel sessions from the - * tunnel UUID. - * - * @param tunnel - * The tunnel to deregister. - */ - @Deprecated - protected void deregisterTunnel(GuacamoleTunnel tunnel) { - deregisterTunnel(tunnel.getUUID().toString()); - } - /** * Deregisters the HTTP tunnel associated with the given tunnel-specific * session token such that future read/write requests to that tunnel will @@ -584,11 +567,3 @@ public void destroy() { } -/** - * \example ExampleTunnelServlet.java - * - * A basic example demonstrating extending GuacamoleTunnelServlet and - * implementing doConnect() to configure the Guacamole connection as - * desired. - */ - diff --git a/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java b/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java index 772ce64b20..e075ea4f0b 100644 --- a/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java +++ b/guacamole-common/src/main/java/org/apache/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.java @@ -19,18 +19,18 @@ package org.apache.guacamole.websocket; +import jakarta.websocket.CloseReason; +import jakarta.websocket.CloseReason.CloseCode; +import jakarta.websocket.Endpoint; +import jakarta.websocket.EndpointConfig; +import jakarta.websocket.MessageHandler; +import jakarta.websocket.OnClose; +import jakarta.websocket.OnMessage; +import jakarta.websocket.OnOpen; +import jakarta.websocket.RemoteEndpoint; +import jakarta.websocket.Session; import java.io.IOException; import java.util.List; -import javax.websocket.CloseReason; -import javax.websocket.CloseReason.CloseCode; -import javax.websocket.Endpoint; -import javax.websocket.EndpointConfig; -import javax.websocket.MessageHandler; -import javax.websocket.OnClose; -import javax.websocket.OnMessage; -import javax.websocket.OnOpen; -import javax.websocket.RemoteEndpoint; -import javax.websocket.Session; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.io.GuacamoleReader; import org.apache.guacamole.io.GuacamoleWriter; diff --git a/guacamole-ext/pom.xml b/guacamole-ext/pom.xml index 161fbe6484..eaa02bd34f 100644 --- a/guacamole-ext/pom.xml +++ b/guacamole-ext/pom.xml @@ -77,9 +77,9 @@ - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Credentials.java b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Credentials.java index 45eebe80df..908c0577f7 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Credentials.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/net/auth/Credentials.java @@ -19,9 +19,9 @@ package org.apache.guacamole.net.auth; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import java.io.Serializable; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; /** diff --git a/guacamole/pom.xml b/guacamole/pom.xml index 6cae5dc103..5fa6345826 100644 --- a/guacamole/pom.xml +++ b/guacamole/pom.xml @@ -211,19 +211,19 @@ - + - javax.servlet - servlet-api - 2.5 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided - javax.websocket - javax.websocket-api - 1.0 + jakarta.websocket + jakarta.websocket-api + 2.1.0 provided @@ -239,15 +239,6 @@ ch.qos.logback logback-classic - - - - - com.sun.mail - javax.mail - - - @@ -266,50 +257,6 @@ runtime - - - org.eclipse.jetty - jetty-websocket - 8.1.1.v20120215 - provided - - - - - org.eclipse.jetty - jetty-parent - 20 - provided - pom - - - org.eclipse.jetty.websocket - websocket-api - 9.0.7.v20131107 - provided - - - org.eclipse.jetty.websocket - websocket-servlet - 9.0.7.v20131107 - provided - - - - - org.apache.tomcat - tomcat-catalina - 7.0.37 - provided - - - - org.apache.tomcat - tomcat-coyote - 7.0.37 - provided - - com.google.inject @@ -318,6 +265,14 @@ com.google.inject.extensions guice-assistedinject + + + + com.google.errorprone + error_prone_annotations + + + com.google.inject.extensions @@ -332,10 +287,22 @@ org.glassfish.jersey.inject jersey-hk2 + + + org.glassfish.hk2 + hk2-locator + + org.glassfish.hk2 guice-bridge + + + com.google.errorprone + error_prone_annotations + + org.glassfish.jersey.media @@ -353,12 +320,25 @@ + + org.glassfish.hk2 + hk2-locator + 3.1.0 + + + + com.google.errorprone + error_prone_annotations + 2.21.1 + + - javax.annotation - jsr250-api - 1.0 + jakarta.annotation + jakarta.annotation-api + 2.1.1 + @@ -366,14 +346,6 @@ guava - - - jakarta.activation - jakarta.activation-api - 1.2.2 - - diff --git a/guacamole/src/main/java/org/apache/guacamole/CacheRevalidationFilter.java b/guacamole/src/main/java/org/apache/guacamole/CacheRevalidationFilter.java index 38dd40303b..5c96b561dd 100644 --- a/guacamole/src/main/java/org/apache/guacamole/CacheRevalidationFilter.java +++ b/guacamole/src/main/java/org/apache/guacamole/CacheRevalidationFilter.java @@ -19,14 +19,14 @@ package org.apache.guacamole; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.FilterConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletResponse; /** * Filter that sets the HTTP response headers necessary to request that the diff --git a/guacamole/src/main/java/org/apache/guacamole/GuacamoleApplication.java b/guacamole/src/main/java/org/apache/guacamole/GuacamoleApplication.java index 7f3e4603c0..1b46a1411c 100644 --- a/guacamole/src/main/java/org/apache/guacamole/GuacamoleApplication.java +++ b/guacamole/src/main/java/org/apache/guacamole/GuacamoleApplication.java @@ -20,9 +20,9 @@ package org.apache.guacamole; import com.google.inject.Injector; -import javax.inject.Inject; -import javax.servlet.ServletContext; -import javax.ws.rs.ApplicationPath; +import jakarta.inject.Inject; +import jakarta.servlet.ServletContext; +import jakarta.ws.rs.ApplicationPath; import org.glassfish.hk2.api.ServiceLocator; import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.server.ResourceConfig; diff --git a/guacamole/src/main/java/org/apache/guacamole/GuacamoleServletContextListener.java b/guacamole/src/main/java/org/apache/guacamole/GuacamoleServletContextListener.java index 1068477c4a..d52a256b7c 100644 --- a/guacamole/src/main/java/org/apache/guacamole/GuacamoleServletContextListener.java +++ b/guacamole/src/main/java/org/apache/guacamole/GuacamoleServletContextListener.java @@ -25,11 +25,11 @@ import com.google.inject.Injector; import com.google.inject.Stage; import com.google.inject.servlet.GuiceServletContextListener; +import jakarta.inject.Inject; +import jakarta.servlet.ServletContextEvent; import java.io.File; import java.util.List; import java.util.concurrent.atomic.AtomicReference; -import javax.inject.Inject; -import javax.servlet.ServletContextEvent; import org.apache.guacamole.environment.Environment; import org.apache.guacamole.environment.LocalEnvironment; import org.apache.guacamole.extension.ExtensionModule; @@ -203,6 +203,7 @@ public void contextInitialized(ServletContextEvent servletContextEvent) { @Override protected Injector getInjector() { + logger.debug("Getting the Servlet Injector..."); return guiceInjector.updateAndGet((current) -> { // Use existing injector if already created diff --git a/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java b/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java index 3099b3b925..ccac91d79a 100644 --- a/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java +++ b/guacamole/src/main/java/org/apache/guacamole/auth/file/FileAuthenticationProvider.java @@ -19,12 +19,12 @@ package org.apache.guacamole.auth.file; -import java.io.File; -import java.io.IOException; -import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; +import java.io.File; +import java.io.IOException; +import java.util.Map; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.environment.Environment; import org.apache.guacamole.environment.LocalEnvironment; diff --git a/guacamole/src/main/java/org/apache/guacamole/event/EventLoggingListener.java b/guacamole/src/main/java/org/apache/guacamole/event/EventLoggingListener.java index 16bee6ae8b..f9729e6637 100644 --- a/guacamole/src/main/java/org/apache/guacamole/event/EventLoggingListener.java +++ b/guacamole/src/main/java/org/apache/guacamole/event/EventLoggingListener.java @@ -19,7 +19,7 @@ package org.apache.guacamole.event; -import javax.annotation.Nonnull; +import jakarta.annotation.Nonnull; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.net.auth.AuthenticationProvider; diff --git a/guacamole/src/main/java/org/apache/guacamole/event/RemoteAddress.java b/guacamole/src/main/java/org/apache/guacamole/event/RemoteAddress.java index f55602f597..888025b54d 100644 --- a/guacamole/src/main/java/org/apache/guacamole/event/RemoteAddress.java +++ b/guacamole/src/main/java/org/apache/guacamole/event/RemoteAddress.java @@ -19,8 +19,8 @@ package org.apache.guacamole.event; +import jakarta.servlet.http.HttpServletRequest; import java.util.regex.Pattern; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.net.auth.Credentials; /** diff --git a/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java b/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java index 3cb2acbb9f..2d554218d6 100644 --- a/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java +++ b/guacamole/src/main/java/org/apache/guacamole/extension/LanguageResourceService.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.JsonNodeFactory; import com.fasterxml.jackson.databind.node.ObjectNode; +import jakarta.servlet.ServletContext; import java.io.IOException; import java.io.InputStream; import java.util.Collections; @@ -32,7 +33,6 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.servlet.ServletContext; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.environment.Environment; import org.apache.guacamole.properties.StringSetProperty; diff --git a/guacamole/src/main/java/org/apache/guacamole/resource/ResourceServlet.java b/guacamole/src/main/java/org/apache/guacamole/resource/ResourceServlet.java index c61687ea31..9b4b7558e1 100644 --- a/guacamole/src/main/java/org/apache/guacamole/resource/ResourceServlet.java +++ b/guacamole/src/main/java/org/apache/guacamole/resource/ResourceServlet.java @@ -19,13 +19,13 @@ package org.apache.guacamole.resource; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java b/guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java index bf38521a53..ada7336e1a 100644 --- a/guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/resource/WebApplicationResource.java @@ -19,8 +19,8 @@ package org.apache.guacamole.resource; +import jakarta.servlet.ServletContext; import java.io.InputStream; -import javax.servlet.ServletContext; /** * A resource which is located within the classpath associated with another diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/APIException.java b/guacamole/src/main/java/org/apache/guacamole/rest/APIException.java index e37b106a95..1a656bbbae 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/APIException.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/APIException.java @@ -19,9 +19,9 @@ package org.apache.guacamole.rest; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.apache.guacamole.GuacamoleException; /** diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java b/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java index e3a2df47f2..58dec07eb9 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/APIRequest.java @@ -19,14 +19,14 @@ package org.apache.guacamole.rest; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequestWrapper; +import jakarta.ws.rs.core.MultivaluedMap; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; -import javax.ws.rs.core.MultivaluedMap; /** * Wrapper for HttpServletRequest which uses a given MultivaluedMap to provide diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/RESTExceptionMapper.java b/guacamole/src/main/java/org/apache/guacamole/rest/RESTExceptionMapper.java index ecb99a473c..f65f05bd0e 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/RESTExceptionMapper.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/RESTExceptionMapper.java @@ -19,14 +19,14 @@ package org.apache.guacamole.rest; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.ws.rs.WebApplicationException; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.ws.rs.WebApplicationException; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.ext.ExceptionMapper; +import jakarta.ws.rs.ext.Provider; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleUnauthorizedException; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/RequestSizeFilter.java b/guacamole/src/main/java/org/apache/guacamole/rest/RequestSizeFilter.java index e003f17b06..161d07b16e 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/RequestSizeFilter.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/RequestSizeFilter.java @@ -19,19 +19,19 @@ package org.apache.guacamole.rest; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.container.ContainerRequestFilter; +import jakarta.ws.rs.container.ResourceInfo; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.ext.Provider; import java.io.IOException; import java.io.InputStream; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.container.ContainerRequestFilter; -import javax.ws.rs.container.ResourceInfo; -import javax.ws.rs.core.Context; -import javax.ws.rs.ext.Provider; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.environment.Environment; import org.apache.guacamole.properties.LongGuacamoleProperty; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/TokenParamProvider.java b/guacamole/src/main/java/org/apache/guacamole/rest/TokenParamProvider.java index b0da961889..ad487aaf10 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/TokenParamProvider.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/TokenParamProvider.java @@ -19,9 +19,9 @@ package org.apache.guacamole.rest; +import jakarta.inject.Inject; +import jakarta.ws.rs.ext.Provider; import java.util.function.Function; -import javax.inject.Inject; -import javax.ws.rs.ext.Provider; import org.apache.guacamole.rest.auth.AuthenticationService; import org.glassfish.jersey.server.ContainerRequest; import org.glassfish.jersey.server.model.Parameter; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java index 88319f01ca..0079c8a94d 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionDirectoryResource.java @@ -21,9 +21,9 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.ActiveConnection; import org.apache.guacamole.net.auth.AuthenticatedUser; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionResource.java index 59afe18d1c..303f72611d 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/activeconnection/ActiveConnectionResource.java @@ -21,13 +21,13 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.ActiveConnection; import org.apache.guacamole.net.auth.AuthenticatedUser; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java b/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java index dc8d3bb7da..026888093a 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/auth/AuthenticationService.java @@ -19,14 +19,12 @@ package org.apache.guacamole.rest.auth; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; - -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; - import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleSecurityException; import org.apache.guacamole.GuacamoleUnauthorizedException; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/auth/DecorationService.java b/guacamole/src/main/java/org/apache/guacamole/rest/auth/DecorationService.java index 0b7fc12645..8e8c80f02d 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/auth/DecorationService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/auth/DecorationService.java @@ -19,10 +19,9 @@ package org.apache.guacamole.rest.auth; +import jakarta.inject.Inject; import java.util.Iterator; import java.util.List; -import javax.inject.Inject; - import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.AuthenticationProvider; import org.apache.guacamole.net.auth.Credentials; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java b/guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java index 427af7f399..4ec14e188b 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/auth/TokenRESTService.java @@ -20,20 +20,20 @@ package org.apache.guacamole.rest.auth; import com.google.common.io.BaseEncoding; +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.DELETE; -import javax.ws.rs.FormParam; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.net.auth.AuthenticatedUser; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java index 612e055021..08f4d08e27 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionDirectoryResource.java @@ -21,9 +21,9 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.Connection; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionResource.java index 484543ba21..3b170868f5 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/connection/ConnectionResource.java @@ -21,13 +21,13 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.Map; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleSecurityException; import org.apache.guacamole.GuacamoleUnsupportedException; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupDirectoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupDirectoryResource.java index adf42787a7..fb3ec9f45b 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupDirectoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupDirectoryResource.java @@ -21,9 +21,9 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.ConnectionGroup; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupResource.java index 22f41b0cf6..c1d1e42f5b 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/connectiongroup/ConnectionGroupResource.java @@ -21,13 +21,13 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.ConnectionGroup; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectResource.java index 8ed36fec02..f40352afa0 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryObjectResource.java @@ -19,13 +19,13 @@ package org.apache.guacamole.rest.directory; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.PUT; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java index 7b83424517..9f067bb841 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/directory/DirectoryResource.java @@ -19,6 +19,18 @@ package org.apache.guacamole.rest.directory; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PATCH; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -26,18 +38,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.PATCH; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/event/ListenerService.java b/guacamole/src/main/java/org/apache/guacamole/rest/event/ListenerService.java index a2b645b44a..035e5b27b0 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/event/ListenerService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/event/ListenerService.java @@ -19,8 +19,8 @@ package org.apache.guacamole.rest.event; +import jakarta.inject.Inject; import java.util.List; -import javax.inject.Inject; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.event.listener.Listener; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java b/guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java index 49a3e872cc..806a31884d 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/extension/ExtensionRESTService.java @@ -19,10 +19,10 @@ package org.apache.guacamole.rest.extension; +import jakarta.inject.Inject; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; import java.util.List; -import javax.inject.Inject; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.net.auth.AuthenticationProvider; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/history/APISortPredicate.java b/guacamole/src/main/java/org/apache/guacamole/rest/history/APISortPredicate.java index 0fea582e0f..def34097c9 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/history/APISortPredicate.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/history/APISortPredicate.java @@ -19,7 +19,7 @@ package org.apache.guacamole.rest.history; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.core.Response; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.net.auth.ActivityRecordSet; import org.apache.guacamole.rest.APIException; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityLogResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityLogResource.java index e311884d0b..5e08dcf71e 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityLogResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityLogResource.java @@ -19,9 +19,9 @@ package org.apache.guacamole.rest.history; -import javax.ws.rs.GET; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.ResponseBuilder; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.ResponseBuilder; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.ActivityLog; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordResource.java index 5b5faf4a6e..6d7f8c4a10 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordResource.java @@ -19,13 +19,13 @@ package org.apache.guacamole.rest.history; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.function.Function; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.net.auth.ActivityLog; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordSetResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordSetResource.java index b6fdc49d9f..29dfdb96fd 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordSetResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/history/ActivityRecordSetResource.java @@ -19,15 +19,15 @@ package org.apache.guacamole.rest.history; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; import java.util.ArrayList; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.net.auth.ActivityRecord; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/history/HistoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/history/HistoryResource.java index 704988cbf5..efbb970324 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/history/HistoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/history/HistoryResource.java @@ -19,10 +19,10 @@ package org.apache.guacamole.rest.history; -import javax.ws.rs.Consumes; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleUnsupportedException; import org.apache.guacamole.net.auth.UserContext; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetResource.java index 7703be3cfe..2738294f05 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/identifier/RelatedObjectSetResource.java @@ -19,13 +19,13 @@ package org.apache.guacamole.rest.identifier; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PATCH; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.List; import java.util.Set; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.PATCH; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.RelatedObjectSet; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/language/LanguageRESTService.java b/guacamole/src/main/java/org/apache/guacamole/rest/language/LanguageRESTService.java index 4fccbaef09..3b49692662 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/language/LanguageRESTService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/language/LanguageRESTService.java @@ -19,12 +19,12 @@ package org.apache.guacamole.rest.language; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.Map; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.extension.LanguageResourceService; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java b/guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java index 115b37c934..175ed6d792 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/patch/PatchRESTService.java @@ -19,16 +19,16 @@ package org.apache.guacamole.rest.patch; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.util.ArrayList; import java.util.List; -import javax.inject.Inject; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleServerException; import org.apache.guacamole.extension.PatchResourceService; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetResource.java index 62f4d0ed90..924981e559 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/permission/PermissionSetResource.java @@ -19,12 +19,12 @@ package org.apache.guacamole.rest.permission; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PATCH; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.PATCH; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleClientException; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.Permissions; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/schema/SchemaResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/schema/SchemaResource.java index a7ed08d600..f78fa28548 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/schema/SchemaResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/schema/SchemaResource.java @@ -19,13 +19,13 @@ package org.apache.guacamole.rest.schema; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.Collection; import java.util.Map; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.environment.Environment; import org.apache.guacamole.environment.LocalEnvironment; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionRESTService.java b/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionRESTService.java index 90974d1ecd..ba3a3f72bf 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionRESTService.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionRESTService.java @@ -19,11 +19,11 @@ package org.apache.guacamole.rest.session; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleSession; import org.apache.guacamole.rest.TokenParam; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java index adf8ed6877..f0d2892a8f 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/session/SessionResource.java @@ -21,14 +21,14 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.HEAD; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.HEAD; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.GuacamoleSession; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java index b696259c36..cd6657a8de 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/session/UserContextResource.java @@ -19,15 +19,13 @@ package org.apache.guacamole.rest.session; -import org.apache.guacamole.rest.directory.DirectoryResource; -import org.apache.guacamole.rest.directory.DirectoryResourceFactory; import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.ActiveConnection; import org.apache.guacamole.net.auth.AuthenticatedUser; @@ -42,6 +40,8 @@ import org.apache.guacamole.rest.connectiongroup.APIConnectionGroup; import org.apache.guacamole.rest.directory.DirectoryObjectResource; import org.apache.guacamole.rest.directory.DirectoryObjectResourceFactory; +import org.apache.guacamole.rest.directory.DirectoryResource; +import org.apache.guacamole.rest.directory.DirectoryResourceFactory; import org.apache.guacamole.rest.history.HistoryResource; import org.apache.guacamole.rest.schema.SchemaResource; import org.apache.guacamole.rest.sharingprofile.APISharingProfile; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileDirectoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileDirectoryResource.java index 16ae29509f..de95263e3d 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileDirectoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileDirectoryResource.java @@ -21,9 +21,9 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.Directory; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileResource.java index 46daac9b33..16078068cc 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/sharingprofile/SharingProfileResource.java @@ -21,12 +21,12 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.Map; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleSecurityException; import org.apache.guacamole.net.auth.AuthenticatedUser; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java index c33255e3e2..8e0dfcc5d8 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/StreamResource.java @@ -19,17 +19,17 @@ package org.apache.guacamole.rest.tunnel; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.ResponseBuilder; +import jakarta.ws.rs.core.StreamingOutput; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.ResponseBuilder; -import javax.ws.rs.core.StreamingOutput; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.rest.RequestSizeFilter; import org.apache.guacamole.tunnel.StreamInterceptingTunnel; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelCollectionResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelCollectionResource.java index 770469c7e4..7d218a992b 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelCollectionResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelCollectionResource.java @@ -21,15 +21,15 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import java.util.Map; import java.util.Set; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.GuacamoleSession; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java index 7107ab277b..eb9ab52ac5 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/tunnel/TunnelResource.java @@ -21,15 +21,15 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.inject.Inject; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DefaultValue; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.environment.Environment; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/user/UserDirectoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/user/UserDirectoryResource.java index 0918ca82fc..1736155bdc 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/user/UserDirectoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/user/UserDirectoryResource.java @@ -21,9 +21,9 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.User; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/user/UserResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/user/UserResource.java index 91600f7365..690b8ae8fc 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/user/UserResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/user/UserResource.java @@ -21,15 +21,14 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; - -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleSecurityException; import org.apache.guacamole.GuacamoleUnsupportedException; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupDirectoryResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupDirectoryResource.java index 44327a29cb..d97dffe01c 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupDirectoryResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupDirectoryResource.java @@ -21,9 +21,9 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.UserGroup; diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupResource.java b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupResource.java index 6994484d92..5421ac9b13 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupResource.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/usergroup/UserGroupResource.java @@ -21,10 +21,10 @@ import com.google.inject.assistedinject.Assisted; import com.google.inject.assistedinject.AssistedInject; -import javax.ws.rs.Consumes; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.auth.AuthenticatedUser; import org.apache.guacamole.net.auth.UserGroup; diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelModule.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelModule.java index 218b007207..1d3ccaa545 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelModule.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelModule.java @@ -39,10 +39,7 @@ public class TunnelModule extends ServletModule { * Classnames of all implementation-specific WebSocket tunnel modules. */ private static final String[] WEBSOCKET_MODULES = { - "org.apache.guacamole.tunnel.websocket.WebSocketTunnelModule", - "org.apache.guacamole.tunnel.websocket.jetty8.WebSocketTunnelModule", - "org.apache.guacamole.tunnel.websocket.jetty9.WebSocketTunnelModule", - "org.apache.guacamole.tunnel.websocket.tomcat.WebSocketTunnelModule" + "org.apache.guacamole.tunnel.websocket.WebSocketTunnelModule" }; private boolean loadWebSocketModule(String classname) { diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java index 1dd567a72d..275d1f766c 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/TunnelRequestService.java @@ -19,10 +19,10 @@ package org.apache.guacamole.tunnel; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; import java.util.List; import java.util.Map; -import javax.inject.Inject; -import javax.inject.Singleton; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.GuacamoleResourceNotFoundException; import org.apache.guacamole.GuacamoleSession; diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/http/HTTPTunnelRequest.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/http/HTTPTunnelRequest.java index 48de10b7a2..acec6093cc 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/http/HTTPTunnelRequest.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/http/HTTPTunnelRequest.java @@ -19,12 +19,12 @@ package org.apache.guacamole.tunnel.http; +import jakarta.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.servlet.http.HttpServletRequest; import org.apache.guacamole.tunnel.TunnelRequest; /** diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/http/RestrictedGuacamoleHTTPTunnelServlet.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/http/RestrictedGuacamoleHTTPTunnelServlet.java index 39f4a25080..e8d82742df 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/http/RestrictedGuacamoleHTTPTunnelServlet.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/http/RestrictedGuacamoleHTTPTunnelServlet.java @@ -19,9 +19,9 @@ package org.apache.guacamole.tunnel.http; -import javax.inject.Inject; -import javax.inject.Singleton; -import javax.servlet.http.HttpServletRequest; +import jakarta.inject.Inject; +import jakarta.inject.Singleton; +import jakarta.servlet.http.HttpServletRequest; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.tunnel.TunnelRequestService; import org.apache.guacamole.net.GuacamoleTunnel; diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/RestrictedGuacamoleWebSocketTunnelEndpoint.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/RestrictedGuacamoleWebSocketTunnelEndpoint.java index 5f6e807099..3a83f84df3 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/RestrictedGuacamoleWebSocketTunnelEndpoint.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/RestrictedGuacamoleWebSocketTunnelEndpoint.java @@ -20,12 +20,12 @@ package org.apache.guacamole.tunnel.websocket; import com.google.inject.Provider; +import jakarta.websocket.EndpointConfig; +import jakarta.websocket.HandshakeResponse; +import jakarta.websocket.Session; +import jakarta.websocket.server.HandshakeRequest; +import jakarta.websocket.server.ServerEndpointConfig; import java.util.Map; -import javax.websocket.EndpointConfig; -import javax.websocket.HandshakeResponse; -import javax.websocket.Session; -import javax.websocket.server.HandshakeRequest; -import javax.websocket.server.ServerEndpointConfig; import org.apache.guacamole.GuacamoleException; import org.apache.guacamole.net.GuacamoleTunnel; import org.apache.guacamole.tunnel.TunnelRequest; diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelModule.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelModule.java index 423b8155d5..6b6523cf72 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelModule.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelModule.java @@ -21,10 +21,10 @@ import com.google.inject.Provider; import com.google.inject.servlet.ServletModule; +import jakarta.websocket.DeploymentException; +import jakarta.websocket.server.ServerContainer; +import jakarta.websocket.server.ServerEndpointConfig; import java.util.Arrays; -import javax.websocket.DeploymentException; -import javax.websocket.server.ServerContainer; -import javax.websocket.server.ServerEndpointConfig; import org.apache.guacamole.tunnel.TunnelLoader; import org.apache.guacamole.tunnel.TunnelRequestService; import org.slf4j.Logger; @@ -46,7 +46,7 @@ public boolean isSupported() { try { // Attempt to find WebSocket servlet - Class.forName("javax.websocket.Endpoint"); + Class.forName("jakarta.websocket.Endpoint"); // Support found return true; @@ -69,7 +69,7 @@ public void configureServlets() { logger.info("Loading JSR-356 WebSocket support..."); // Get container - ServerContainer container = (ServerContainer) getServletContext().getAttribute("javax.websocket.server.ServerContainer"); + ServerContainer container = (ServerContainer) getServletContext().getAttribute("jakarta.websocket.server.ServerContainer"); if (container == null) { logger.warn("ServerContainer attribute required by JSR-356 is missing. Cannot load JSR-356 WebSocket support."); return; diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelRequest.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelRequest.java index 5f0ad0264e..359c6b8cfd 100644 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelRequest.java +++ b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/WebSocketTunnelRequest.java @@ -19,9 +19,9 @@ package org.apache.guacamole.tunnel.websocket; +import jakarta.websocket.server.HandshakeRequest; import java.util.List; import java.util.Map; -import javax.websocket.server.HandshakeRequest; import org.apache.guacamole.tunnel.TunnelRequest; /** diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java deleted file mode 100644 index 304e1dd95e..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty8; - -import java.io.IOException; -import java.util.List; -import javax.servlet.http.HttpServletRequest; -import org.apache.guacamole.GuacamoleException; -import org.apache.guacamole.io.GuacamoleReader; -import org.apache.guacamole.io.GuacamoleWriter; -import org.apache.guacamole.net.GuacamoleTunnel; -import org.eclipse.jetty.websocket.WebSocket; -import org.eclipse.jetty.websocket.WebSocket.Connection; -import org.eclipse.jetty.websocket.WebSocketServlet; -import org.apache.guacamole.GuacamoleClientException; -import org.apache.guacamole.GuacamoleConnectionClosedException; -import org.apache.guacamole.protocol.FilteredGuacamoleWriter; -import org.apache.guacamole.protocol.GuacamoleFilter; -import org.apache.guacamole.protocol.GuacamoleInstruction; -import org.apache.guacamole.tunnel.http.HTTPTunnelRequest; -import org.apache.guacamole.tunnel.TunnelRequest; -import org.apache.guacamole.protocol.GuacamoleStatus; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A WebSocketServlet partial re-implementation of GuacamoleTunnelServlet. - */ -public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet { - - /** - * Logger for this class. - */ - private static final Logger logger = LoggerFactory.getLogger(GuacamoleWebSocketTunnelServlet.class); - - /** - * The default, minimum buffer size for instructions. - */ - private static final int BUFFER_SIZE = 8192; - - /** - * The opcode of the instruction used to indicate a connection stability - * test ping request or response. Note that this instruction is - * encapsulated within an internal tunnel instruction (with the opcode - * being the empty string), thus this will actually be the value of the - * first element of the received instruction. - */ - private static final String PING_OPCODE = "ping"; - - /** - * Sends the given numeric Guacamole and WebSocket status - * on the given WebSocket connection and closes the - * connection. - * - * @param connection - * The WebSocket connection to close. - * - * @param guacamoleStatusCode - * The numeric Guacamole Status code to send. - * - * @param webSocketCode - * The numeric WebSocket status code to send. - */ - private static void closeConnection(Connection connection, - int guacamoleStatusCode, int webSocketCode) { - - connection.close(webSocketCode, - Integer.toString(guacamoleStatusCode)); - - } - - /** - * Sends the given status on the given WebSocket connection - * and closes the connection. - * - * @param connection - * The WebSocket connection to close. - * - * @param guacStatus - * The status to send. - */ - private static void closeConnection(Connection connection, - GuacamoleStatus guacStatus) { - - closeConnection(connection, guacStatus.getGuacamoleStatusCode(), - guacStatus.getWebSocketCode()); - - } - - @Override - public WebSocket doWebSocketConnect(HttpServletRequest request, String protocol) { - - final TunnelRequest tunnelRequest = new HTTPTunnelRequest(request); - - // Return new WebSocket which communicates through tunnel - return new WebSocket.OnTextMessage() { - - /** - * The GuacamoleTunnel associated with the connected WebSocket. If - * the WebSocket has not yet been connected, this will be null. - */ - private GuacamoleTunnel tunnel = null; - - /** - * The active WebSocket connection. This value will always be - * non-null if tunnel is non-null. - */ - private Connection connection = null; - - /** - * Sends a Guacamole instruction along the outbound WebSocket - * connection to the connected Guacamole client. If an instruction - * is already in the process of being sent by another thread, this - * function will block until in-progress instructions are complete. - * - * @param instruction - * The instruction to send. - * - * @throws IOException - * If an I/O error occurs preventing the given instruction from - * being sent. - */ - private void sendInstruction(String instruction) - throws IOException { - - // NOTE: Synchronization on the non-final remote field here is - // intentional. The outbound websocket connection is only - // sensitive to simultaneous attempts to send messages with - // respect to itself. If the connection changes, then - // synchronization need only be performed in context of the new - // connection - synchronized (connection) { - connection.sendMessage(instruction); - } - - } - - /** - * Sends a Guacamole instruction along the outbound WebSocket - * connection to the connected Guacamole client. If an instruction - * is already in the process of being sent by another thread, this - * function will block until in-progress instructions are complete. - * - * @param instruction - * The instruction to send. - * - * @throws IOException - * If an I/O error occurs preventing the given instruction from being - * sent. - */ - private void sendInstruction(GuacamoleInstruction instruction) - throws IOException { - sendInstruction(instruction.toString()); - } - - @Override - public void onMessage(String string) { - - // Ignore inbound messages if there is no associated tunnel - if (tunnel == null) - return; - - // Filter received instructions, handling tunnel-internal - // instructions without passing through to guacd - GuacamoleWriter writer = new FilteredGuacamoleWriter(tunnel.acquireWriter(), new GuacamoleFilter() { - - @Override - public GuacamoleInstruction filter(GuacamoleInstruction instruction) - throws GuacamoleException { - - // Filter out all tunnel-internal instructions - if (instruction.getOpcode().equals(GuacamoleTunnel.INTERNAL_DATA_OPCODE)) { - - // Respond to ping requests - List args = instruction.getArgs(); - if (args.size() >= 2 && args.get(0).equals(PING_OPCODE)) { - - try { - sendInstruction(new GuacamoleInstruction( - GuacamoleTunnel.INTERNAL_DATA_OPCODE, - PING_OPCODE, args.get(1) - )); - } - catch (IOException e) { - logger.debug("Unable to send \"ping\" response for WebSocket tunnel.", e); - } - - } - - return null; - - } - - // Pass through all non-internal instructions untouched - return instruction; - - } - - }); - - // Write message received - try { - writer.write(string.toCharArray()); - } - catch (GuacamoleConnectionClosedException e) { - logger.debug("Connection to guacd closed.", e); - } - catch (GuacamoleException e) { - logger.debug("WebSocket tunnel write failed.", e); - } - - tunnel.releaseWriter(); - - } - - @Override - public void onOpen(final Connection connection) { - - // Store websocket connection for future use via sendInstruction() - this.connection = connection; - - try { - tunnel = doConnect(tunnelRequest); - } - catch (GuacamoleException e) { - logger.error("Creation of WebSocket tunnel to guacd failed: {}", e.getMessage()); - logger.debug("Error connecting WebSocket tunnel.", e); - closeConnection(connection, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - return; - } - - // Do not start connection if tunnel does not exist - if (tunnel == null) { - closeConnection(connection, GuacamoleStatus.RESOURCE_NOT_FOUND); - return; - } - - Thread readThread = new Thread() { - - @Override - public void run() { - - StringBuilder buffer = new StringBuilder(BUFFER_SIZE); - GuacamoleReader reader = tunnel.acquireReader(); - char[] readMessage; - - try { - - // Send tunnel UUID - sendInstruction(new GuacamoleInstruction( - GuacamoleTunnel.INTERNAL_DATA_OPCODE, - tunnel.getUUID().toString() - )); - - try { - - // Attempt to read - while ((readMessage = reader.read()) != null) { - - // Buffer message - buffer.append(readMessage); - - // Flush if we expect to wait or buffer is getting full - if (!reader.available() || buffer.length() >= BUFFER_SIZE) { - sendInstruction(buffer.toString()); - buffer.setLength(0); - } - - } - - // No more data - closeConnection(connection, GuacamoleStatus.SUCCESS); - - } - - // Catch any thrown guacamole exception and attempt - // to pass within the WebSocket connection, logging - // each error appropriately. - catch (GuacamoleClientException e) { - logger.info("WebSocket connection terminated: {}", e.getMessage()); - logger.debug("WebSocket connection terminated due to client error.", e); - closeConnection(connection, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - } - catch (GuacamoleConnectionClosedException e) { - logger.debug("Connection to guacd closed.", e); - closeConnection(connection, GuacamoleStatus.SUCCESS); - } - catch (GuacamoleException e) { - logger.error("Connection to guacd terminated abnormally: {}", e.getMessage()); - logger.debug("Internal error during connection to guacd.", e); - closeConnection(connection, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - } - - } - catch (IOException e) { - logger.debug("WebSocket tunnel read failed due to I/O error.", e); - closeConnection(connection, GuacamoleStatus.SERVER_ERROR); - } - - } - - }; - - readThread.start(); - - } - - @Override - public void onClose(int i, String string) { - try { - if (tunnel != null) - tunnel.close(); - } - catch (GuacamoleException e) { - logger.debug("Unable to close connection to guacd.", e); - } - } - - }; - - } - - /** - * Called whenever the JavaScript Guacamole client makes a connection - * request. It it up to the implementor of this function to define what - * conditions must be met for a tunnel to be configured and returned as a - * result of this connection request (whether some sort of credentials must - * be specified, for example). - * - * @param request - * The TunnelRequest associated with the connection request received. - * Any parameters specified along with the connection request can be - * read from this object. - * - * @return - * A newly constructed GuacamoleTunnel if successful, null otherwise. - * - * @throws GuacamoleException - * If an error occurs while constructing the GuacamoleTunnel, or if the - * conditions required for connection are not met. - */ - protected abstract GuacamoleTunnel doConnect(TunnelRequest request) - throws GuacamoleException; - -} - diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/RestrictedGuacamoleWebSocketTunnelServlet.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/RestrictedGuacamoleWebSocketTunnelServlet.java deleted file mode 100644 index b9e2d3df64..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/RestrictedGuacamoleWebSocketTunnelServlet.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty8; - -import javax.inject.Inject; -import javax.inject.Singleton; -import org.apache.guacamole.GuacamoleException; -import org.apache.guacamole.net.GuacamoleTunnel; -import org.apache.guacamole.tunnel.TunnelRequestService; -import org.apache.guacamole.tunnel.TunnelRequest; - -/** - * Tunnel servlet implementation which uses WebSocket as a tunnel backend, - * rather than HTTP, properly parsing connection IDs included in the connection - * request. - */ -@Singleton -public class RestrictedGuacamoleWebSocketTunnelServlet extends GuacamoleWebSocketTunnelServlet { - - /** - * Service for handling tunnel requests. - */ - @Inject - private TunnelRequestService tunnelRequestService; - - @Override - protected GuacamoleTunnel doConnect(TunnelRequest request) - throws GuacamoleException { - return tunnelRequestService.createTunnel(request); - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/WebSocketTunnelModule.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/WebSocketTunnelModule.java deleted file mode 100644 index 3dd7bf185f..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/WebSocketTunnelModule.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty8; - -import com.google.inject.servlet.ServletModule; -import org.apache.guacamole.tunnel.TunnelLoader; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Loads the Jetty 8 WebSocket tunnel implementation. - */ -public class WebSocketTunnelModule extends ServletModule implements TunnelLoader { - - /** - * Logger for this class. - */ - private final Logger logger = LoggerFactory.getLogger(WebSocketTunnelModule.class); - - @Override - public boolean isSupported() { - - try { - - // Attempt to find WebSocket servlet - Class.forName("org.apache.guacamole.tunnel.websocket.jetty8.RestrictedGuacamoleWebSocketTunnelServlet"); - - // Support found - return true; - - } - - // If no such servlet class, this particular WebSocket support - // is not present - catch (ClassNotFoundException e) {} - catch (NoClassDefFoundError e) {} - - // Support not found - return false; - - } - - @Override - public void configureServlets() { - - logger.info("Loading Jetty 8 WebSocket support..."); - serve("/websocket-tunnel").with(RestrictedGuacamoleWebSocketTunnelServlet.class); - - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/package-info.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/package-info.java deleted file mode 100644 index 6f9f698b23..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/package-info.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Jetty 8 WebSocket tunnel implementation. The classes here require Jetty 8. - */ -package org.apache.guacamole.tunnel.websocket.jetty8; - diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/GuacamoleWebSocketTunnelListener.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/GuacamoleWebSocketTunnelListener.java deleted file mode 100644 index 6422f57180..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/GuacamoleWebSocketTunnelListener.java +++ /dev/null @@ -1,372 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty9; - -import java.io.IOException; -import java.util.List; -import org.eclipse.jetty.websocket.api.CloseStatus; -import org.eclipse.jetty.websocket.api.RemoteEndpoint; -import org.eclipse.jetty.websocket.api.Session; -import org.eclipse.jetty.websocket.api.WebSocketListener; -import org.apache.guacamole.GuacamoleClientException; -import org.apache.guacamole.GuacamoleConnectionClosedException; -import org.apache.guacamole.GuacamoleException; -import org.apache.guacamole.io.GuacamoleReader; -import org.apache.guacamole.io.GuacamoleWriter; -import org.apache.guacamole.net.GuacamoleTunnel; -import org.apache.guacamole.protocol.FilteredGuacamoleWriter; -import org.apache.guacamole.protocol.GuacamoleFilter; -import org.apache.guacamole.protocol.GuacamoleInstruction; -import org.apache.guacamole.protocol.GuacamoleStatus; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * WebSocket listener implementation which provides a Guacamole tunnel - */ -public abstract class GuacamoleWebSocketTunnelListener implements WebSocketListener { - - /** - * The default, minimum buffer size for instructions. - */ - private static final int BUFFER_SIZE = 8192; - - /** - * The opcode of the instruction used to indicate a connection stability - * test ping request or response. Note that this instruction is - * encapsulated within an internal tunnel instruction (with the opcode - * being the empty string), thus this will actually be the value of the - * first element of the received instruction. - */ - private static final String PING_OPCODE = "ping"; - - /** - * Logger for this class. - */ - private static final Logger logger = LoggerFactory.getLogger(RestrictedGuacamoleWebSocketTunnelServlet.class); - - /** - * The underlying GuacamoleTunnel. WebSocket reads/writes will be handled - * as reads/writes to this tunnel. This value may be null if no connection - * has been established. - */ - private GuacamoleTunnel tunnel; - - /** - * Remote (client) side of this connection. This value will always be - * non-null if tunnel is non-null. - */ - private RemoteEndpoint remote; - - /** - * Sends the given numeric Guacamole and WebSocket status - * codes on the given WebSocket connection and closes the - * connection. - * - * @param session - * The outbound WebSocket connection to close. - * - * @param guacamoleStatusCode - * The numeric Guacamole status code to send. - * - * @param webSocketCode - * The numeric WebSocket status code to send. - */ - private void closeConnection(Session session, int guacamoleStatusCode, - int webSocketCode) { - - try { - String message = Integer.toString(guacamoleStatusCode); - session.close(new CloseStatus(webSocketCode, message)); - } - catch (IOException e) { - logger.debug("Unable to close WebSocket connection.", e); - } - - } - - /** - * Sends the given status on the given WebSocket connection - * and closes the connection. - * - * @param session - * The outbound WebSocket connection to close. - * - * @param guacStatus - * The status to send. - */ - private void closeConnection(Session session, - GuacamoleStatus guacStatus) { - - closeConnection(session, guacStatus.getGuacamoleStatusCode(), - guacStatus.getWebSocketCode()); - - } - - /** - * Sends a Guacamole instruction along the outbound WebSocket connection to - * the connected Guacamole client. If an instruction is already in the - * process of being sent by another thread, this function will block until - * in-progress instructions are complete. - * - * @param instruction - * The instruction to send. - * - * @throws IOException - * If an I/O error occurs preventing the given instruction from being - * sent. - */ - private void sendInstruction(String instruction) - throws IOException { - - // NOTE: Synchronization on the non-final remote field here is - // intentional. The remote (the outbound websocket connection) is only - // sensitive to simultaneous attempts to send messages with respect to - // itself. If the remote changes, then the outbound websocket - // connection has changed, and synchronization need only be performed - // in context of the new remote. - synchronized (remote) { - remote.sendString(instruction); - } - - } - - /** - * Sends a Guacamole instruction along the outbound WebSocket connection to - * the connected Guacamole client. If an instruction is already in the - * process of being sent by another thread, this function will block until - * in-progress instructions are complete. - * - * @param instruction - * The instruction to send. - * - * @throws IOException - * If an I/O error occurs preventing the given instruction from being - * sent. - */ - private void sendInstruction(GuacamoleInstruction instruction) - throws IOException { - sendInstruction(instruction.toString()); - } - - /** - * Returns a new tunnel for the given session. How this tunnel is created - * or retrieved is implementation-dependent. - * - * @param session The session associated with the active WebSocket - * connection. - * @return A connected tunnel, or null if no such tunnel exists. - * @throws GuacamoleException If an error occurs while retrieving the - * tunnel, or if access to the tunnel is denied. - */ - protected abstract GuacamoleTunnel createTunnel(Session session) - throws GuacamoleException; - - @Override - public void onWebSocketConnect(final Session session) { - - // Store underlying remote for future use via sendInstruction() - remote = session.getRemote(); - - try { - - // Get tunnel - tunnel = createTunnel(session); - if (tunnel == null) { - closeConnection(session, GuacamoleStatus.RESOURCE_NOT_FOUND); - return; - } - - } - catch (GuacamoleException e) { - logger.error("Creation of WebSocket tunnel to guacd failed: {}", e.getMessage()); - logger.debug("Error connecting WebSocket tunnel.", e); - closeConnection(session, e.getStatus().getGuacamoleStatusCode(), e.getWebSocketCode()); - return; - } - - // Prepare read transfer thread - Thread readThread = new Thread() { - - @Override - public void run() { - - StringBuilder buffer = new StringBuilder(BUFFER_SIZE); - GuacamoleReader reader = tunnel.acquireReader(); - char[] readMessage; - - try { - - // Send tunnel UUID - sendInstruction(new GuacamoleInstruction( - GuacamoleTunnel.INTERNAL_DATA_OPCODE, - tunnel.getUUID().toString() - )); - - try { - - // Attempt to read - while ((readMessage = reader.read()) != null) { - - // Buffer message - buffer.append(readMessage); - - // Flush if we expect to wait or buffer is getting full - if (!reader.available() || buffer.length() >= BUFFER_SIZE) { - sendInstruction(buffer.toString()); - buffer.setLength(0); - } - - } - - // No more data - closeConnection(session, GuacamoleStatus.SUCCESS); - - } - - // Catch any thrown guacamole exception and attempt - // to pass within the WebSocket connection, logging - // each error appropriately. - catch (GuacamoleClientException e) { - logger.info("WebSocket connection terminated: {}", e.getMessage()); - logger.debug("WebSocket connection terminated due to client error.", e); - closeConnection(session, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - } - catch (GuacamoleConnectionClosedException e) { - logger.debug("Connection to guacd closed.", e); - closeConnection(session, GuacamoleStatus.SUCCESS); - } - catch (GuacamoleException e) { - logger.error("Connection to guacd terminated abnormally: {}", e.getMessage()); - logger.debug("Internal error during connection to guacd.", e); - closeConnection(session, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - } - - } - catch (IOException e) { - logger.debug("I/O error prevents further reads.", e); - closeConnection(session, GuacamoleStatus.SERVER_ERROR); - } - - } - - }; - - readThread.start(); - - } - - @Override - public void onWebSocketText(String message) { - - // Ignore inbound messages if there is no associated tunnel - if (tunnel == null) - return; - - // Filter received instructions, handling tunnel-internal instructions - // without passing through to guacd - GuacamoleWriter writer = new FilteredGuacamoleWriter(tunnel.acquireWriter(), new GuacamoleFilter() { - - @Override - public GuacamoleInstruction filter(GuacamoleInstruction instruction) - throws GuacamoleException { - - // Filter out all tunnel-internal instructions - if (instruction.getOpcode().equals(GuacamoleTunnel.INTERNAL_DATA_OPCODE)) { - - // Respond to ping requests - List args = instruction.getArgs(); - if (args.size() >= 2 && args.get(0).equals(PING_OPCODE)) { - - try { - sendInstruction(new GuacamoleInstruction( - GuacamoleTunnel.INTERNAL_DATA_OPCODE, - PING_OPCODE, args.get(1) - )); - } - catch (IOException e) { - logger.debug("Unable to send \"ping\" response for WebSocket tunnel.", e); - } - - } - - return null; - - } - - // Pass through all non-internal instructions untouched - return instruction; - - } - - }); - - try { - // Write received message - writer.write(message.toCharArray()); - } - catch (GuacamoleConnectionClosedException e) { - logger.debug("Connection to guacd closed.", e); - } - catch (GuacamoleException e) { - logger.debug("WebSocket tunnel write failed.", e); - } - - tunnel.releaseWriter(); - - } - - @Override - public void onWebSocketBinary(byte[] payload, int offset, int length) { - throw new UnsupportedOperationException("Binary WebSocket messages are not supported."); - } - - @Override - public void onWebSocketError(Throwable t) { - - logger.debug("WebSocket tunnel closing due to error.", t); - - try { - if (tunnel != null) - tunnel.close(); - } - catch (GuacamoleException e) { - logger.debug("Unable to close connection to guacd.", e); - } - - } - - - @Override - public void onWebSocketClose(int statusCode, String reason) { - - try { - if (tunnel != null) - tunnel.close(); - } - catch (GuacamoleException e) { - logger.debug("Unable to close connection to guacd.", e); - } - - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketCreator.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketCreator.java deleted file mode 100644 index 97489f5491..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketCreator.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty9; - -import org.eclipse.jetty.websocket.api.UpgradeRequest; -import org.eclipse.jetty.websocket.api.UpgradeResponse; -import org.eclipse.jetty.websocket.servlet.WebSocketCreator; -import org.apache.guacamole.tunnel.TunnelRequestService; - -/** - * WebSocketCreator which selects the appropriate WebSocketListener - * implementation if the "guacamole" subprotocol is in use. - */ -public class RestrictedGuacamoleWebSocketCreator implements WebSocketCreator { - - /** - * Service for handling tunnel requests. - */ - private final TunnelRequestService tunnelRequestService; - - /** - * Creates a new WebSocketCreator which uses the given TunnelRequestService - * to create new GuacamoleTunnels for inbound requests. - * - * @param tunnelRequestService The service to use for inbound tunnel - * requests. - */ - public RestrictedGuacamoleWebSocketCreator(TunnelRequestService tunnelRequestService) { - this.tunnelRequestService = tunnelRequestService; - } - - @Override - public Object createWebSocket(UpgradeRequest request, UpgradeResponse response) { - - // Validate and use "guacamole" subprotocol - for (String subprotocol : request.getSubProtocols()) { - - if ("guacamole".equals(subprotocol)) { - response.setAcceptedSubProtocol(subprotocol); - return new RestrictedGuacamoleWebSocketTunnelListener(tunnelRequestService); - } - - } - - // Invalid protocol - return null; - - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketTunnelListener.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketTunnelListener.java deleted file mode 100644 index 48fad55c49..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketTunnelListener.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty9; - -import org.eclipse.jetty.websocket.api.Session; -import org.apache.guacamole.GuacamoleException; -import org.apache.guacamole.net.GuacamoleTunnel; -import org.apache.guacamole.tunnel.TunnelRequestService; - -/** - * WebSocket listener implementation which properly parses connection IDs - * included in the connection request. - */ -public class RestrictedGuacamoleWebSocketTunnelListener extends GuacamoleWebSocketTunnelListener { - - /** - * Service for handling tunnel requests. - */ - private final TunnelRequestService tunnelRequestService; - - /** - * Creates a new WebSocketListener which uses the given TunnelRequestService - * to create new GuacamoleTunnels for inbound requests. - * - * @param tunnelRequestService The service to use for inbound tunnel - * requests. - */ - public RestrictedGuacamoleWebSocketTunnelListener(TunnelRequestService tunnelRequestService) { - this.tunnelRequestService = tunnelRequestService; - } - - @Override - protected GuacamoleTunnel createTunnel(Session session) throws GuacamoleException { - return tunnelRequestService.createTunnel(new WebSocketTunnelRequest(session.getUpgradeRequest())); - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketTunnelServlet.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketTunnelServlet.java deleted file mode 100644 index 2b602160a3..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/RestrictedGuacamoleWebSocketTunnelServlet.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty9; - -import javax.inject.Inject; -import javax.inject.Singleton; -import org.eclipse.jetty.websocket.servlet.WebSocketServlet; -import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; -import org.apache.guacamole.tunnel.TunnelRequestService; - -/** - * A WebSocketServlet partial re-implementation of GuacamoleTunnelServlet. - */ -@Singleton -public class RestrictedGuacamoleWebSocketTunnelServlet extends WebSocketServlet { - - /** - * Service for handling tunnel requests. - */ - @Inject - private TunnelRequestService tunnelRequestService; - - @Override - public void configure(WebSocketServletFactory factory) { - - // Register WebSocket implementation - factory.setCreator(new RestrictedGuacamoleWebSocketCreator(tunnelRequestService)); - - } - -} - diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/WebSocketTunnelModule.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/WebSocketTunnelModule.java deleted file mode 100644 index 536667286e..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/WebSocketTunnelModule.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty9; - -import com.google.inject.servlet.ServletModule; -import org.apache.guacamole.tunnel.TunnelLoader; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Loads the Jetty 9 WebSocket tunnel implementation. - */ -public class WebSocketTunnelModule extends ServletModule implements TunnelLoader { - - /** - * Logger for this class. - */ - private final Logger logger = LoggerFactory.getLogger(WebSocketTunnelModule.class); - - @Override - public boolean isSupported() { - - try { - - // Attempt to find WebSocket servlet - Class.forName("org.apache.guacamole.tunnel.websocket.jetty9.RestrictedGuacamoleWebSocketTunnelServlet"); - - // Support found - return true; - - } - - // If no such servlet class, this particular WebSocket support - // is not present - catch (ClassNotFoundException e) {} - catch (NoClassDefFoundError e) {} - - // Support not found - return false; - - } - - @Override - public void configureServlets() { - - logger.info("Loading Jetty 9 WebSocket support..."); - serve("/websocket-tunnel").with(RestrictedGuacamoleWebSocketTunnelServlet.class); - - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/WebSocketTunnelRequest.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/WebSocketTunnelRequest.java deleted file mode 100644 index 2875bc9d73..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/WebSocketTunnelRequest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.jetty9; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import org.eclipse.jetty.websocket.api.UpgradeRequest; -import org.apache.guacamole.tunnel.TunnelRequest; - -/** - * Jetty 9 WebSocket-specific implementation of TunnelRequest. - */ -public class WebSocketTunnelRequest extends TunnelRequest { - - /** - * All parameters passed via HTTP to the WebSocket handshake. - */ - private final Map handshakeParameters; - - /** - * Creates a TunnelRequest implementation which delegates parameter and - * session retrieval to the given UpgradeRequest. - * - * @param request The UpgradeRequest to wrap. - */ - public WebSocketTunnelRequest(UpgradeRequest request) { - this.handshakeParameters = request.getParameterMap(); - } - - @Override - public String getParameter(String name) { - - // Pull list of values, if present - List values = getParameterValues(name); - if (values == null || values.isEmpty()) - return null; - - // Return first parameter value arbitrarily - return values.get(0); - - } - - @Override - public List getParameterValues(String name) { - - String[] values = handshakeParameters.get(name); - if (values == null) - return null; - - return Arrays.asList(values); - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/package-info.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/package-info.java deleted file mode 100644 index ca2336603e..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty9/package-info.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Jetty 9 WebSocket tunnel implementation. The classes here require at least - * Jetty 9, prior to Jetty 9.1 (when support for JSR 356 was implemented). - */ -package org.apache.guacamole.tunnel.websocket.jetty9; - diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/GuacamoleWebSocketTunnelServlet.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/GuacamoleWebSocketTunnelServlet.java deleted file mode 100644 index 215cc8f051..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/GuacamoleWebSocketTunnelServlet.java +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.tomcat; - -import java.io.IOException; -import java.io.InputStream; -import java.io.Reader; -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.util.List; -import javax.servlet.http.HttpServletRequest; -import org.apache.guacamole.GuacamoleException; -import org.apache.guacamole.io.GuacamoleReader; -import org.apache.guacamole.io.GuacamoleWriter; -import org.apache.guacamole.net.GuacamoleTunnel; -import org.apache.catalina.websocket.StreamInbound; -import org.apache.catalina.websocket.WebSocketServlet; -import org.apache.catalina.websocket.WsOutbound; -import org.apache.guacamole.GuacamoleClientException; -import org.apache.guacamole.GuacamoleConnectionClosedException; -import org.apache.guacamole.protocol.FilteredGuacamoleWriter; -import org.apache.guacamole.protocol.GuacamoleFilter; -import org.apache.guacamole.protocol.GuacamoleInstruction; -import org.apache.guacamole.tunnel.http.HTTPTunnelRequest; -import org.apache.guacamole.tunnel.TunnelRequest; -import org.apache.guacamole.protocol.GuacamoleStatus; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * A WebSocketServlet partial re-implementation of GuacamoleTunnelServlet. - */ -public abstract class GuacamoleWebSocketTunnelServlet extends WebSocketServlet { - - /** - * The default, minimum buffer size for instructions. - */ - private static final int BUFFER_SIZE = 8192; - - /** - * The opcode of the instruction used to indicate a connection stability - * test ping request or response. Note that this instruction is - * encapsulated within an internal tunnel instruction (with the opcode - * being the empty string), thus this will actually be the value of the - * first element of the received instruction. - */ - private static final String PING_OPCODE = "ping"; - - /** - * Logger for this class. - */ - private final Logger logger = LoggerFactory.getLogger(GuacamoleWebSocketTunnelServlet.class); - - /** - * Sends the given Guacamole and WebSocket numeric status - * on the given WebSocket connection and closes the - * connection. - * - * @param outbound - * The outbound WebSocket connection to close. - * - * @param guacamoleStatusCode - * The status to send. - * - * @param webSocketCode - * The numeric WebSocket status code to send. - */ - private void closeConnection(WsOutbound outbound, int guacamoleStatusCode, - int webSocketCode) { - - try { - byte[] message = Integer.toString(guacamoleStatusCode).getBytes("UTF-8"); - outbound.close(webSocketCode, ByteBuffer.wrap(message)); - } - catch (IOException e) { - logger.debug("Unable to close WebSocket tunnel.", e); - } - - } - - /** - * Sends the given status on the given WebSocket connection - * and closes the connection. - * - * @param outbound - * The outbound WebSocket connection to close. - * - * @param guacStatus - * The status to send. - */ - private void closeConnection(WsOutbound outbound, - GuacamoleStatus guacStatus) { - - closeConnection(outbound, guacStatus.getGuacamoleStatusCode(), - guacStatus.getWebSocketCode()); - - } - - @Override - protected String selectSubProtocol(List subProtocols) { - - // Search for expected protocol - for (String protocol : subProtocols) - if ("guacamole".equals(protocol)) - return "guacamole"; - - // Otherwise, fail - return null; - - } - - @Override - public StreamInbound createWebSocketInbound(String protocol, - HttpServletRequest request) { - - final TunnelRequest tunnelRequest = new HTTPTunnelRequest(request); - - // Return new WebSocket which communicates through tunnel - return new StreamInbound() { - - /** - * The GuacamoleTunnel associated with the connected WebSocket. If - * the WebSocket has not yet been connected, this will be null. - */ - private GuacamoleTunnel tunnel = null; - - /** - * The outbound half of the WebSocket connection. This value will - * always be non-null if tunnel is non-null. - */ - private WsOutbound outbound = null; - - /** - * Sends a Guacamole instruction along the outbound WebSocket - * connection to the connected Guacamole client. If an instruction - * is already in the process of being sent by another thread, this - * function will block until in-progress instructions are complete. - * - * @param instruction - * The instruction to send. - * - * @throws IOException - * If an I/O error occurs preventing the given instruction from - * being sent. - */ - private void sendInstruction(CharSequence instruction) - throws IOException { - - // NOTE: Synchronization on the non-final remote field here is - // intentional. The outbound websocket connection is only - // sensitive to simultaneous attempts to send messages with - // respect to itself. If the connection changes, then - // synchronization need only be performed in context of the new - // connection - synchronized (outbound) { - outbound.writeTextMessage(CharBuffer.wrap(instruction)); - } - - } - - /** - * Sends a Guacamole instruction along the outbound WebSocket - * connection to the connected Guacamole client. If an instruction - * is already in the process of being sent by another thread, this - * function will block until in-progress instructions are complete. - * - * @param instruction - * The instruction to send. - * - * @throws IOException - * If an I/O error occurs preventing the given instruction from being - * sent. - */ - private void sendInstruction(GuacamoleInstruction instruction) - throws IOException { - sendInstruction(instruction.toString()); - } - - @Override - protected void onTextData(Reader reader) throws IOException { - - // Ignore inbound messages if there is no associated tunnel - if (tunnel == null) - return; - - // Filter received instructions, handling tunnel-internal - // instructions without passing through to guacd - GuacamoleWriter writer = new FilteredGuacamoleWriter(tunnel.acquireWriter(), new GuacamoleFilter() { - - @Override - public GuacamoleInstruction filter(GuacamoleInstruction instruction) - throws GuacamoleException { - - // Filter out all tunnel-internal instructions - if (instruction.getOpcode().equals(GuacamoleTunnel.INTERNAL_DATA_OPCODE)) { - - // Respond to ping requests - List args = instruction.getArgs(); - if (args.size() >= 2 && args.get(0).equals(PING_OPCODE)) { - - try { - sendInstruction(new GuacamoleInstruction( - GuacamoleTunnel.INTERNAL_DATA_OPCODE, - PING_OPCODE, args.get(1) - )); - } - catch (IOException e) { - logger.debug("Unable to send \"ping\" response for WebSocket tunnel.", e); - } - - } - - return null; - - } - - // Pass through all non-internal instructions untouched - return instruction; - - } - - }); - - // Write all available data - try { - - char[] buffer = new char[BUFFER_SIZE]; - - int num_read; - while ((num_read = reader.read(buffer)) > 0) - writer.write(buffer, 0, num_read); - - } - catch (GuacamoleConnectionClosedException e) { - logger.debug("Connection to guacd closed.", e); - } - catch (GuacamoleException e) { - logger.debug("WebSocket tunnel write failed.", e); - } - - tunnel.releaseWriter(); - } - - @Override - public void onOpen(final WsOutbound outbound) { - - // Store outbound connection for future use via sendInstruction() - this.outbound = outbound; - - try { - tunnel = doConnect(tunnelRequest); - } - catch (GuacamoleException e) { - logger.error("Creation of WebSocket tunnel to guacd failed: {}", e.getMessage()); - logger.debug("Error connecting WebSocket tunnel.", e); - closeConnection(outbound, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - return; - } - - // Do not start connection if tunnel does not exist - if (tunnel == null) { - closeConnection(outbound, GuacamoleStatus.RESOURCE_NOT_FOUND); - return; - } - - Thread readThread = new Thread() { - - @Override - public void run() { - - StringBuilder buffer = new StringBuilder(BUFFER_SIZE); - GuacamoleReader reader = tunnel.acquireReader(); - char[] readMessage; - - try { - - // Send tunnel UUID - sendInstruction(new GuacamoleInstruction( - GuacamoleTunnel.INTERNAL_DATA_OPCODE, - tunnel.getUUID().toString() - )); - - try { - - // Attempt to read - while ((readMessage = reader.read()) != null) { - - // Buffer message - buffer.append(readMessage); - - // Flush if we expect to wait or buffer is getting full - if (!reader.available() || buffer.length() >= BUFFER_SIZE) { - sendInstruction(CharBuffer.wrap(buffer)); - buffer.setLength(0); - } - - } - - // No more data - closeConnection(outbound, GuacamoleStatus.SUCCESS); - - } - - // Catch any thrown guacamole exception and attempt - // to pass within the WebSocket connection, logging - // each error appropriately. - catch (GuacamoleClientException e) { - logger.info("WebSocket connection terminated: {}", e.getMessage()); - logger.debug("WebSocket connection terminated due to client error.", e); - closeConnection(outbound, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - } - catch (GuacamoleConnectionClosedException e) { - logger.debug("Connection to guacd closed.", e); - closeConnection(outbound, GuacamoleStatus.SUCCESS); - } - catch (GuacamoleException e) { - logger.error("Connection to guacd terminated abnormally: {}", e.getMessage()); - logger.debug("Internal error during connection to guacd.", e); - closeConnection(outbound, e.getStatus().getGuacamoleStatusCode(), - e.getWebSocketCode()); - } - - } - catch (IOException e) { - logger.debug("I/O error prevents further reads.", e); - closeConnection(outbound, GuacamoleStatus.SERVER_ERROR); - } - - } - - }; - - readThread.start(); - - } - - @Override - public void onClose(int i) { - try { - if (tunnel != null) - tunnel.close(); - } - catch (GuacamoleException e) { - logger.debug("Unable to close connection to guacd.", e); - } - } - - @Override - protected void onBinaryData(InputStream in) throws IOException { - throw new UnsupportedOperationException("Not supported yet."); - } - - }; - - } - - /** - * Called whenever the JavaScript Guacamole client makes a connection - * request. It it up to the implementor of this function to define what - * conditions must be met for a tunnel to be configured and returned as a - * result of this connection request (whether some sort of credentials must - * be specified, for example). - * - * @param request - * The TunnelRequest associated with the connection request received. - * Any parameters specified along with the connection request can be - * read from this object. - * - * @return - * A newly constructed GuacamoleTunnel if successful, null otherwise. - * - * @throws GuacamoleException - * If an error occurs while constructing the GuacamoleTunnel, or if the - * conditions required for connection are not met. - */ - protected abstract GuacamoleTunnel doConnect(TunnelRequest request) - throws GuacamoleException; - -} - diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/RestrictedGuacamoleWebSocketTunnelServlet.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/RestrictedGuacamoleWebSocketTunnelServlet.java deleted file mode 100644 index 510149527b..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/RestrictedGuacamoleWebSocketTunnelServlet.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.tomcat; - -import javax.inject.Inject; -import javax.inject.Singleton; -import org.apache.guacamole.GuacamoleException; -import org.apache.guacamole.net.GuacamoleTunnel; -import org.apache.guacamole.tunnel.TunnelRequestService; -import org.apache.guacamole.tunnel.TunnelRequest; - -/** - * Tunnel servlet implementation which uses WebSocket as a tunnel backend, - * rather than HTTP, properly parsing connection IDs included in the connection - * request. - */ -@Singleton -public class RestrictedGuacamoleWebSocketTunnelServlet extends GuacamoleWebSocketTunnelServlet { - - /** - * Service for handling tunnel requests. - */ - @Inject - private TunnelRequestService tunnelRequestService; - - @Override - protected GuacamoleTunnel doConnect(TunnelRequest request) - throws GuacamoleException { - return tunnelRequestService.createTunnel(request); - }; - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/WebSocketTunnelModule.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/WebSocketTunnelModule.java deleted file mode 100644 index 5529fab59d..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/WebSocketTunnelModule.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.guacamole.tunnel.websocket.tomcat; - -import com.google.inject.servlet.ServletModule; -import org.apache.guacamole.tunnel.TunnelLoader; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Loads the Jetty 9 WebSocket tunnel implementation. - */ -public class WebSocketTunnelModule extends ServletModule implements TunnelLoader { - - /** - * Logger for this class. - */ - private final Logger logger = LoggerFactory.getLogger(WebSocketTunnelModule.class); - - @Override - public boolean isSupported() { - - try { - - // Attempt to find WebSocket servlet - Class.forName("org.apache.guacamole.tunnel.websocket.tomcat.RestrictedGuacamoleWebSocketTunnelServlet"); - - // Support found - return true; - - } - - // If no such servlet class, this particular WebSocket support - // is not present - catch (ClassNotFoundException e) {} - catch (NoClassDefFoundError e) {} - - // Support not found - return false; - - } - - @Override - public void configureServlets() { - - logger.info("Loading Tomcat 7 WebSocket support..."); - serve("/websocket-tunnel").with(RestrictedGuacamoleWebSocketTunnelServlet.class); - - } - -} diff --git a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/package-info.java b/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/package-info.java deleted file mode 100644 index 4606e431b0..0000000000 --- a/guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/tomcat/package-info.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/** - * Tomcat WebSocket tunnel implementation. The classes here require at least - * Tomcat 7.0, and may change significantly as there is no common WebSocket - * API for Java yet. - */ -package org.apache.guacamole.tunnel.websocket.tomcat; - diff --git a/pom.xml b/pom.xml index c3c242d80d..25c9309fb7 100644 --- a/pom.xml +++ b/pom.xml @@ -37,11 +37,12 @@ 32.1.3-jre - 5.1.0 - 2.6.1 + 7.0.0 + 3.1.0 2.17.0 2.17.0 - 2.42 + 4.0.0-M2 + 3.1.6 5.10.2 4.13.2 1.3.14 @@ -367,15 +368,6 @@ org.glassfish.jersey.media jersey-media-json-jackson ${jersey.version} - - - - - javax.xml.stream - stax-api - - - com.fasterxml.jackson.core