Skip to content

Commit

Permalink
GUACAMOLE-1289: Remove spring dependency and update dependencies with…
Browse files Browse the repository at this point in the history
… vulnerabilities.
  • Loading branch information
aleitner committed Apr 11, 2024
1 parent 0e12f48 commit f064ec0
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 28 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2021 Square, Inc.
Copyright 2023 Square, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
okhttp (https://square.github.io/okhttp/)
---------------------------------------------

Version: 4.9.1
Version: 4.12.0
From: 'Square Inc'
License(s):
Apache 2.0
2 changes: 2 additions & 0 deletions doc/licenses/okhttp-4.12.0/dep-coordinates.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
com.squareup.okhttp3:okhttp:jar:4.12.0
com.squareup.okhttp3:logging-interceptor:jar:4.12.0
1 change: 0 additions & 1 deletion doc/licenses/okhttp-4.9.1/dep-coordinates.txt

This file was deleted.

1 change: 0 additions & 1 deletion doc/licenses/okio-2.8.0/dep-coordinates.txt

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 Square, Inc.
Copyright 2023 Square, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 2 additions & 0 deletions doc/licenses/okio-3.6.0/dep-coordinates.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
com.squareup.okio:okio:jar:3.6.0
com.squareup.okio:okio-jvm:jar:3.6.0
4 changes: 0 additions & 4 deletions doc/licenses/spring-web-5.3.25/dep-coordinates.txt

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions doc/licenses/spring-web-5.3.33/dep-coordinates.txt
Original file line number Diff line number Diff line change
@@ -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
32 changes: 22 additions & 10 deletions extensions/guacamole-auth-duo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,32 @@
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.9.1</version> <!-- Specify the desired version -->
<version>4.12.0</version> <!-- Specify the desired version -->
</dependency>

<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>4.12.0</version>
</dependency>

<!-- Force the use of a consistent version of Kotlin standard library common -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
<version>1.4.10</version>
<version>1.9.23</version>
</dependency>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>1.4.10</version>
<version>1.9.23</version>
</dependency>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>1.9.23</version>
</dependency>

</dependencies>
Expand Down Expand Up @@ -95,20 +107,20 @@
<version>2.5</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>2.1.6</version>
<type>jar</type>
</dependency>

<!-- Duo SDK -->
<dependency>
<groupId>com.duosecurity</groupId>
<artifactId>duo-universal-sdk</artifactId>
<version>1.1.3</version>
</dependency>

<!-- spring-web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.3.25</version>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.net.URISyntaxException;
import java.util.Collections;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.UriBuilder;
import org.apache.guacamole.GuacamoleException;
import org.apache.guacamole.GuacamoleServerException;
import org.apache.guacamole.auth.duo.conf.ConfigurationService;
Expand All @@ -39,7 +40,6 @@
import org.apache.guacamole.net.auth.credentials.CredentialsInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.util.UriComponentsBuilder;

/**
* Service for verifying the identity of a user against Duo.
Expand Down Expand Up @@ -102,13 +102,9 @@ public void verifyAuthenticatedUser(AuthenticatedUser authenticatedUser)

try {

String redirectUrl = confService.getRedirectUri().toString();

String builtUrl = UriComponentsBuilder
.fromUriString(redirectUrl)
String builtUrl = UriBuilder.fromUri(confService.getRedirectUri().toString())
.queryParam(Credentials.RESUME_QUERY, DuoAuthenticationProvider.PROVIDER_IDENTIFER)
.build()
.toUriString();
.build().toString();

// Set up the Duo Client
Client duoClient = new Client.Builder(
Expand Down

0 comments on commit f064ec0

Please sign in to comment.