This is an automated email from the ASF dual-hosted git repository.

lahirujayathilake pushed a commit to branch dev-refactoring
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git


The following commit(s) were added to refs/heads/dev-refactoring by this push:
     new 98c4166b8 upgraded the Keycloak version to 20.0.3 and several other 
dependency upgrades
98c4166b8 is described below

commit 98c4166b8b1a9aac3fa6dd28eeced1c983559e49
Author: lahiruj <[email protected]>
AuthorDate: Fri Apr 19 17:03:50 2024 -0400

    upgraded the Keycloak version to 20.0.3 and several other dependency 
upgrades
---
 .../src/main/resources/application.properties      |  7 +++--
 .../credential-store-core-service/pom.xml          |  8 ++---
 .../resource-secret-core-service/pom.xml           |  9 +++++-
 .../services/clients/keycloak/KeycloakUtils.java   | 30 +++++++++---------
 .../src/main/resources/application.properties      |  6 ++--
 .../src/main/containers/docker-compose.yml         | 27 ++++++++--------
 pom.xml                                            | 36 ++++++++++++++--------
 7 files changed, 74 insertions(+), 49 deletions(-)

diff --git 
a/custos-services/custos-core-services-server/src/main/resources/application.properties
 
b/custos-services/custos-core-services-server/src/main/resources/application.properties
index ed649758a..1973462b5 100644
--- 
a/custos-services/custos-core-services-server/src/main/resources/application.properties
+++ 
b/custos-services/custos-core-services-server/src/main/resources/application.properties
@@ -25,7 +25,7 @@ spring.main.allow-bean-definition-overriding=true
 
 ## Hibernate Properties
 # The SQL dialect makes Hibernate generate better SQL for the chosen database
-spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL55Dialect
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
 spring.jpa.properties.hibernate.dialect.storage_engine=innodb
 spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
 # Hibernate ddl auto (create, create-drop, validate, update)
@@ -46,8 +46,8 @@ spring.profiles.active=local
 #Keycloak properties
 iam.server.admin.username=admin
 iam.server.admin.password=admin
-iam.server.url=https://host.docker.internal/auth/
-#iam.server.url=https://localhost/auth/
+iam.server.url=http://host.docker.internal:8080/
+#iam.server.url=http://localhost:8080/
 
 mail.sender.password=test
 enable.messaging.service=false
@@ -59,6 +59,7 @@ ciLogon.admin.client.secret=1234
 spring.cloud.vault.token=00000000-0000-0000-0000-000000000000
 spring.cloud.vault.scheme=http
 spring.cloud.vault.host=host.docker.internal
+#spring.cloud.vault.host=localhost
 spring.cloud.vault.port=8200
 #spring.cloud.vault.uri=http://localhost:8201
 spring.cloud.vault.uri=http://host.docker.internal:8201
diff --git 
a/custos-services/custos-core-services/credential-store-core-service/pom.xml 
b/custos-services/custos-core-services/credential-store-core-service/pom.xml
index 972083fa6..89bbf472c 100644
--- a/custos-services/custos-core-services/credential-store-core-service/pom.xml
+++ b/custos-services/custos-core-services/credential-store-core-service/pom.xml
@@ -152,10 +152,10 @@
             <groupId>com.google.protobuf</groupId>
             <artifactId>protobuf-java-util</artifactId>
         </dependency>
-<!--        <dependency>-->
-<!--            <groupId>javax.persistence</groupId>-->
-<!--            <artifactId>persistence-api</artifactId>-->
-<!--        </dependency>-->
+        <dependency>
+            <groupId>org.springframework.vault</groupId>
+            <artifactId>spring-vault-core</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
diff --git 
a/custos-services/custos-core-services/resource-secret-core-service/pom.xml 
b/custos-services/custos-core-services/resource-secret-core-service/pom.xml
index 38bf89470..1eeb8cbdd 100644
--- a/custos-services/custos-core-services/resource-secret-core-service/pom.xml
+++ b/custos-services/custos-core-services/resource-secret-core-service/pom.xml
@@ -170,7 +170,14 @@
             <groupId>org.json</groupId>
             <artifactId>json</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.vault</groupId>
+            <artifactId>spring-vault-core</artifactId>
+        </dependency>
 
     </dependencies>
 
diff --git 
a/custos-services/custos-federated-services-clients/src/main/java/org/apache/custos/federated/services/clients/keycloak/KeycloakUtils.java
 
b/custos-services/custos-federated-services-clients/src/main/java/org/apache/custos/federated/services/clients/keycloak/KeycloakUtils.java
index fd7c8e1ed..759793b2c 100644
--- 
a/custos-services/custos-federated-services-clients/src/main/java/org/apache/custos/federated/services/clients/keycloak/KeycloakUtils.java
+++ 
b/custos-services/custos-federated-services-clients/src/main/java/org/apache/custos/federated/services/clients/keycloak/KeycloakUtils.java
@@ -19,8 +19,6 @@
 
 package org.apache.custos.federated.services.clients.keycloak;
 
-import org.jboss.resteasy.client.jaxrs.ResteasyClient;
-import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
 import org.keycloak.admin.client.Keycloak;
 import org.keycloak.admin.client.KeycloakBuilder;
 import org.slf4j.Logger;
@@ -29,6 +27,8 @@ import org.slf4j.LoggerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
 import java.security.KeyManagementException;
 import java.security.KeyStore;
 import java.security.KeyStoreException;
@@ -38,8 +38,6 @@ import java.util.concurrent.TimeUnit;
 
 public class KeycloakUtils {
 
-    private final static int POOL_SIZE = 10;
-
     private static final Logger LOGGER = 
LoggerFactory.getLogger(KeycloakUtils.class);
 
 
@@ -67,18 +65,22 @@ public class KeycloakUtils {
     }
 
 
-    private static ResteasyClient getRestClient() {
+    private static Client getRestClient() {
         try {
-            return new ResteasyClientBuilder()
-                    .establishConnectionTimeout(100, TimeUnit.SECONDS)
-                    .socketTimeout(10, TimeUnit.SECONDS)
-                    .connectionPoolSize(POOL_SIZE)
-                    
.trustStore(KeyStore.getInstance(KeyStore.getDefaultType()))
-                    .build();
+            TrustManagerFactory tmf = 
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+            tmf.init((KeyStore) null);
 
-        } catch (KeyStoreException e) {
-            LOGGER.error("Failed to load trust store KeyStore instance");
-            throw new RuntimeException("Failed to load trust store KeyStore 
instance", e);
+            SSLContext sslContext = SSLContext.getInstance("TLS");
+            sslContext.init(null, tmf.getTrustManagers(), null);
+
+            return ClientBuilder.newBuilder()
+                    .sslContext(sslContext)
+                    .connectTimeout(100, TimeUnit.SECONDS)
+                    .readTimeout(10, TimeUnit.SECONDS)
+                    .build();
+        } catch (Exception e) {
+            LOGGER.error("Error configuring the rest client", e);
+            throw new RuntimeException("Failed to configure the REST client", 
e);
         }
     }
 
diff --git 
a/custos-services/custos-integration-services-server/src/main/resources/application.properties
 
b/custos-services/custos-integration-services-server/src/main/resources/application.properties
index 4127bf457..caaa4ec16 100644
--- 
a/custos-services/custos-integration-services-server/src/main/resources/application.properties
+++ 
b/custos-services/custos-integration-services-server/src/main/resources/application.properties
@@ -29,10 +29,10 @@ 
scim.user.schema.location=/home/ubuntu/custos_user_schema_extention.json
 
 core.services.server.port=7001
 core.services.server.hostname=host.docker.internal
-iam.server.url=https://host.docker.internal/auth/
+iam.server.url=http://host.docker.internal:8080/
 
tenant.base.uri=http://host.docker.internal/apiserver/tenant-management/v1.0.0/oauth2/tenant
-#
+
 #core.services.server.hostname=localhost
-#iam.server.url=https://localhost/auth/
+#iam.server.url=http://localhost:8080/
 
#tenant.base.uri=http://localhost/apiserver/tenant-management/v1.0.0/oauth2/tenant
 
diff --git 
a/custos-utilities/ide-integration/src/main/containers/docker-compose.yml 
b/custos-utilities/ide-integration/src/main/containers/docker-compose.yml
index 847dfc533..fa98fc98a 100644
--- a/custos-utilities/ide-integration/src/main/containers/docker-compose.yml
+++ b/custos-utilities/ide-integration/src/main/containers/docker-compose.yml
@@ -1,21 +1,24 @@
 version: "3.3"
 services:
     keycloak:
-      image: quay.io/keycloak/keycloak:9.0.2
-      container_name: keycloak
-      ports:
-        - "8080:8080"
+      image: quay.io/keycloak/keycloak:20.0.3
       environment:
-        KEYCLOAK_USER: admin
-        KEYCLOAK_PASSWORD: admin
-        PROXY_ADDRESS_FORWARDING: 'true'
-        DB_VENDOR: mysql
-        DB_ADDR: my_sql_local
-        DB_DATABASE: keycloak
-        DB_USER: admin
-        DB_PASSWORD: admin
+        KC_HOSTNAME: host.docker.internal # or 'localhost' if you're running 
custos_core_server and custos_integration_server locally
+        KC_HOSTNAME_PORT: 8080
+        KC_HOSTNAME_STRICT_BACKCHANNEL: "true"
+        KC_DB: mysql
+        KC_DB_URL: 
jdbc:mysql://my_sql_local:3306/keycloak?characterEncoding=UTF-8
+        KC_DB_USERNAME: admin
+        KC_DB_PASSWORD: admin
+        KEYCLOAK_ADMIN: admin
+        KEYCLOAK_ADMIN_PASSWORD: admin
       depends_on:
         - my_sql_local
+      ports:
+        - "8080:8080"
+      command:
+        - start-dev
+      restart: unless-stopped
 
     vault:
       image: vault:1.7.0
diff --git a/pom.xml b/pom.xml
index c2b645e6e..0fb6f3918 100644
--- a/pom.xml
+++ b/pom.xml
@@ -109,7 +109,7 @@
             <dependency>
                 <groupId>org.springframework.cloud</groupId>
                 <artifactId>spring-cloud-starter-vault-config</artifactId>
-                <version>${spring.boot.version}</version>
+                <version>${spring.cloud.vault.config.version}</version>
             </dependency>
 
             <dependency>
@@ -155,22 +155,22 @@
             <dependency>
                 <groupId>org.jboss.resteasy</groupId>
                 <artifactId>resteasy-client</artifactId>
-                <version>${reasteasy.client.version}</version>
+                <version>${resteasy.client.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.resteasy</groupId>
                 <artifactId>resteasy-jackson2-provider</artifactId>
-                <version>${reasteasy.client.version}</version>
+                <version>${resteasy.client.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.resteasy</groupId>
                 <artifactId>resteasy-jaxrs</artifactId>
-                <version>${reasteasy.client.version}</version>
+                <version>${resteasy.jaxrs.version}</version>
             </dependency>
             <dependency>
                 <groupId>org.jboss.resteasy</groupId>
                 <artifactId>resteasy-multipart-provider</artifactId>
-                <version>${reasteasy.client.version}</version>
+                <version>${resteasy.client.version}</version>
             </dependency>
             <dependency>
                 <groupId>com.google.protobuf</groupId>
@@ -261,6 +261,11 @@
                 <artifactId>commons-io</artifactId>
                 <version>${io.commons.version}</version>
             </dependency>
+            <dependency>
+                <groupId>commons-codec</groupId>
+                <artifactId>commons-codec</artifactId>
+                <version>${codec.commons.version}</version>
+            </dependency>
 
             <!-- Secret handling dependencies -->
             <dependency>
@@ -305,8 +310,11 @@
                 <artifactId>slf4j-simple</artifactId>
                 <version>${org.slf4j.version}</version>
             </dependency>
-
-
+            <dependency>
+                <groupId>org.springframework.vault</groupId>
+                <artifactId>spring-vault-core</artifactId>
+                <version>${spring.vault.core}</version>
+            </dependency>
 
         </dependencies>
     </dependencyManagement>
@@ -456,12 +464,14 @@
         <os.maven.plugin>1.5.0.Final</os.maven.plugin>
 
         <!-- Spring dependencies -->
-        <spring.boot.version>3.0.1</spring.boot.version>
+        <spring.boot.version>3.2.2</spring.boot.version>
         <spring.cloud.version>2022.0.2</spring.cloud.version>
+        <spring.vault.core>3.0.2</spring.vault.core>
         <grpc.spring.boot.version>5.0.0</grpc.spring.boot.version>
 
         
<spring.cloud.stream.version>2.0.0.RELEASE</spring.cloud.stream.version>
         
<spring.cloud.slueth.version>2.1.6.RELEASE</spring.cloud.slueth.version>
+        
<spring.cloud.vault.config.version>4.0.1</spring.cloud.vault.config.version>
 
         <io.grpc.version>1.51.0</io.grpc.version>
         <google.common.protos>1.17.0</google.common.protos>
@@ -479,9 +489,10 @@
         <javax.persistance>1.0.2</javax.persistance>
         <jakarta.persistance>3.1.0</jakarta.persistance>
 
-        <keycloak.admin.version>9.0.2</keycloak.admin.version>
+        <keycloak.admin.version>20.0.3</keycloak.admin.version>
 
-        <reasteasy.client.version>3.9.1.Final</reasteasy.client.version>
+        <resteasy.client.version>4.7.7.Final</resteasy.client.version>
+        <resteasy.jaxrs.version>3.15.6.Final</resteasy.jaxrs.version>
 
         <com.google.protobuf.util>3.21.11</com.google.protobuf.util>
 
@@ -502,7 +513,8 @@
 
         <com.jcraft.version>0.1.55</com.jcraft.version>
 
-        <io.commons.version>2.7</io.commons.version>
+        <io.commons.version>2.11.0</io.commons.version>
+        <codec.commons.version>1.16.1</codec.commons.version>
 
         <com.codahale.version>0.7.0</com.codahale.version>
 
@@ -526,7 +538,7 @@
 
         <javax.version>2.0.1.Final</javax.version>
 
-        <jackson.version>2.14.2</jackson.version>
+        <jackson.version>2.15.3</jackson.version>
 
 
     </properties>

Reply via email to