Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading keycloak support to v24 #443

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airavata-api/airavata-api-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.0</version>
<version>7.0.0</version>
</dependency>
<dependency>
<groupId>aopalliance</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,11 @@
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api -->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.resteasy/resteasy-client -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.14.Final</version>
<version>${rest.easy.client.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jboss.resteasy/resteasy-jackson2-provider -->
<dependency>
Expand All @@ -74,7 +68,7 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>2.5.5.Final</version>
<version>${keycloak.admin.client.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/
package org.apache.airavata.service.profile.iam.admin.services.core.impl;

import jakarta.ws.rs.core.Response;
import org.apache.airavata.common.exception.ApplicationSettingsException;
import org.apache.airavata.common.utils.SecurityUtil;
import org.apache.airavata.common.utils.ServerSettings;
Expand All @@ -30,6 +31,7 @@
import org.apache.airavata.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.admin.client.resource.RoleResource;
Expand All @@ -43,7 +45,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.ws.rs.core.Response;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
Expand Down Expand Up @@ -86,7 +87,7 @@ private static Keycloak getClient(String adminUrl, String realm, String accessTo

private static ResteasyClient getResteasyClient() {

ResteasyClientBuilder builder = new ResteasyClientBuilder().connectionPoolSize(10);
ResteasyClientBuilder builder = new ResteasyClientBuilderImpl().connectionPoolSize(10);
try {
if (ServerSettings.isTrustStorePathDefined()) {
builder.trustStore(loadKeyStore());
Expand Down
5 changes: 1 addition & 4 deletions modules/commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
Expand Down
17 changes: 1 addition & 16 deletions modules/distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,22 +256,7 @@
<artifactId>icu4j</artifactId>
<version>3.4.4</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<!-- Hadoop provider related dependencies -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
Expand Down Expand Up @@ -330,7 +315,7 @@
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.0</version>
<version>${zk.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
<include>javax.annotation:javax.annotation-api:jar</include>
<include>org.glassfish.jersey.bundles.repackaged:jersey-guava:jar</include>
<include>org.glassfish.hk2:osgi-resource-locator:jar</include>
<include>javax.ws.rs:javax.ws.rs-api:jar</include>
<include>org.apache.httpcomponents:httpcore:jar</include>
<include>org.glassfish.jersey.core:jersey-client:jar</include>
<include>org.glassfish.hk2:hk2-api:jar</include>
Expand Down
3 changes: 3 additions & 0 deletions modules/ide-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ Using this module, you can setup a full Airavata installation inside Intelij IDE

### Starting API Server

#### Note: For JDK 11+
you have to add ``--add-opens java.base/java.lang=ALL-UNNAMED`` as a JVM argument

* Go to org.apache.airavata.ide.integration.APIServerStarter class and right click on the editor and click Run option. This will start Airavata server

### Starting Job Execution Engine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function authenticate($username, $password){

// Assemble POST parameters for the request.
$post_fields = "client_id=" . urlencode($this->client_id) . "&client_secret=" . urlencode($this->client_secret) . "&grant_type=password";
$post_fields .= "&username=" . urlencode($username) . "&password=" . urlencode($password);
$post_fields .= "&username=" . urlencode($username) . "&password=" . urlencode($password) . '&scope=openid';

// Obtain and return the access token from the response.
curl_setopt($r, CURLOPT_POST, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
Expand Down
Binary file not shown.
21 changes: 12 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,12 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<derby.version>10.13.1.1</derby.version>
<org.slf4j.version>2.0.13</org.slf4j.version>
<log4j2.version>2.23.1</log4j2.version>
<org.slf4j.version>2.0.16</org.slf4j.version>
<log4j2.slf4j.impl>2.18.0</log4j2.slf4j.impl>
<log4j2.version>2.24.0</log4j2.version>
<surefire.version>3.0.0-M4</surefire.version>
<junit.version>4.12</junit.version>
<curator.version>2.8.0</curator.version>
<curator.version>5.7.0</curator.version>
<groovy.version>2.4.7</groovy.version>
<xpp3.version>1.1.6</xpp3.version>
<xpp5.version>1.2.8</xpp5.version>
Expand All @@ -131,7 +132,7 @@
<mysql.connector.version>5.1.34</mysql.connector.version>
<skipTests>false</skipTests>
<google.gson.version>2.10.1</google.gson.version>
<zk.version>3.4.0</zk.version>
<zk.version>3.9.2</zk.version>
<amqp.client.version>3.5.1</amqp.client.version>
<snakeyaml.version>1.15</snakeyaml.version>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
Expand All @@ -140,7 +141,7 @@
<kafka-clients.version>1.0.0</kafka-clients.version>
<json.version>20160212</json.version>
<commons.io.version>2.11.0</commons.io.version>
<google.guava.version>20.0</google.guava.version>
<google.guava.version>33.2.1-jre</google.guava.version>
<jacoco.version>0.8.1</jacoco.version>
<openjpa.version>3.1.0</openjpa.version>
<dozer.version>5.4.0</dozer.version>
Expand All @@ -150,6 +151,8 @@
<commons.lang.version>2.6</commons.lang.version>
<org.apache.commons.pool2.version>2.7.0</org.apache.commons.pool2.version>
<helix.version>0.9.7</helix.version>
<keycloak.admin.client.version>24.0.4</keycloak.admin.client.version>
<rest.easy.client.version>6.2.8.Final</rest.easy.client.version>
</properties>

<dependencies>
Expand All @@ -168,7 +171,7 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<artifactId>log4j-slf4j18-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down Expand Up @@ -200,8 +203,8 @@
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
<artifactId>log4j-slf4j18-impl</artifactId>
<version>${log4j2.slf4j.impl}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down Expand Up @@ -367,7 +370,7 @@
<!-- Integration tests are run using the fail-safe plugin in the module
pom -->
<useSystemClassLoader>false</useSystemClassLoader>
<argLine>-Xmx1024m -XX:MaxPermSize=256m
<argLine>-Xmx1024m -XX:MaxPermSize=256m --add-opens java.base/java.lang=ALL-UNNAMED
-javaagent:${settings.localRepository}/org/jmockit/jmockit/${jmockit.version}/jmockit-${jmockit.version}.jar
</argLine>

Expand Down
4 changes: 2 additions & 2 deletions tools/load-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.14.Final</version>
<version>${rest.easy.client.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>2.5.5.Final</version>
<version>${keycloak.admin.client.version}</version>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
Expand Down