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

aicam pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git


The following commit(s) were added to refs/heads/main by this push:
     new 8808571833 fix: separate user activity window from jwt expiration 
(#3731)
8808571833 is described below

commit 88085718337e80552047d52820c9038baa4034f7
Author: Victor Fawole <[email protected]>
AuthorDate: Thu Sep 18 10:55:09 2025 -0400

    fix: separate user activity window from jwt expiration (#3731)
---
 .../scala/edu/uci/ics/texera/service/resource/ConfigResource.scala    | 1 +
 core/config/src/main/resources/auth.conf                              | 2 +-
 core/config/src/main/resources/gui.conf                               | 4 ++++
 core/config/src/main/scala/edu/uci/ics/texera/config/GuiConfig.scala  | 2 ++
 core/gui/src/app/common/service/gui-config.service.mock.ts            | 3 ++-
 core/gui/src/app/common/type/gui-config.ts                            | 1 +
 .../src/app/dashboard/component/admin/user/admin-user.component.ts    | 4 ++--
 7 files changed, 13 insertions(+), 4 deletions(-)

diff --git 
a/core/config-service/src/main/scala/edu/uci/ics/texera/service/resource/ConfigResource.scala
 
b/core/config-service/src/main/scala/edu/uci/ics/texera/service/resource/ConfigResource.scala
index bdd560a4f6..3270e39af1 100644
--- 
a/core/config-service/src/main/scala/edu/uci/ics/texera/service/resource/ConfigResource.scala
+++ 
b/core/config-service/src/main/scala/edu/uci/ics/texera/service/resource/ConfigResource.scala
@@ -54,6 +54,7 @@ class ConfigResource {
         "username" -> GuiConfig.guiLoginDefaultLocalUserUsername,
         "password" -> GuiConfig.guiLoginDefaultLocalUserPassword
       ),
+      "activeTimeInMinutes" -> 
GuiConfig.guiWorkflowWorkspaceActiveTimeInMinutes,
       // flags from the auth.conf if needed
       "expirationTimeInMinutes" -> AuthConfig.jwtExpirationMinutes
     )
diff --git a/core/config/src/main/resources/auth.conf 
b/core/config/src/main/resources/auth.conf
index ecff350c65..ef82fc8ace 100644
--- a/core/config/src/main/resources/auth.conf
+++ b/core/config/src/main/resources/auth.conf
@@ -19,7 +19,7 @@
 # Configuration for JWT Authentication. Currently it is used by the 
FileService to parse the given JWT Token
 auth {
     jwt {
-        expiration-in-minutes = 15
+        expiration-in-minutes = 2880
         expiration-in-minutes = ${?AUTH_JWT_EXPIRATION_IN_MINUTES}
 
         256-bit-secret = "8a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d"
diff --git a/core/config/src/main/resources/gui.conf 
b/core/config/src/main/resources/gui.conf
index 14d3c69403..9619707d55 100644
--- a/core/config/src/main/resources/gui.conf
+++ b/core/config/src/main/resources/gui.conf
@@ -100,5 +100,9 @@ gui {
     # whether to send email notification when workflow execution is 
completed/failed/paused/killed
     workflow-email-notification-enabled = false
     workflow-email-notification-enabled = 
${?GUI_WORKFLOW_WORKSPACE_WORKFLOW_EMAIL_NOTIFICATION_ENABLED}
+
+    # amount of time to be elapsed in minutes before user is detected as 
inactive
+    active-time-in-minutes = 15
+    active-time-in-minutes = ${?GUI_WORKFLOW_WORKSPACE_ACTIVE_TIME_IN_MINUTES}
   }
 }
\ No newline at end of file
diff --git 
a/core/config/src/main/scala/edu/uci/ics/texera/config/GuiConfig.scala 
b/core/config/src/main/scala/edu/uci/ics/texera/config/GuiConfig.scala
index b64edcfe41..65951afa5e 100644
--- a/core/config/src/main/scala/edu/uci/ics/texera/config/GuiConfig.scala
+++ b/core/config/src/main/scala/edu/uci/ics/texera/config/GuiConfig.scala
@@ -65,4 +65,6 @@ object GuiConfig {
     conf.getInt("gui.workflow-workspace.operator-console-message-buffer-size")
   val guiWorkflowWorkspaceWorkflowEmailNotificationEnabled: Boolean =
     
conf.getBoolean("gui.workflow-workspace.workflow-email-notification-enabled")
+  val guiWorkflowWorkspaceActiveTimeInMinutes: Int =
+    conf.getInt("gui.workflow-workspace.active-time-in-minutes")
 }
diff --git a/core/gui/src/app/common/service/gui-config.service.mock.ts 
b/core/gui/src/app/common/service/gui-config.service.mock.ts
index 2012505ef5..f16a3697f0 100644
--- a/core/gui/src/app/common/service/gui-config.service.mock.ts
+++ b/core/gui/src/app/common/service/gui-config.service.mock.ts
@@ -47,7 +47,8 @@ export class MockGuiConfigService {
     sharingComputingUnitEnabled: false,
     operatorConsoleMessageBufferSize: 1000,
     defaultLocalUser: { username: "", password: "" },
-    expirationTimeInMinutes: 15,
+    expirationTimeInMinutes: 2880,
+    activeTimeInMinutes: 15,
   };
 
   get env(): GuiConfig {
diff --git a/core/gui/src/app/common/type/gui-config.ts 
b/core/gui/src/app/common/type/gui-config.ts
index 8598693ac3..f7c1181b18 100644
--- a/core/gui/src/app/common/type/gui-config.ts
+++ b/core/gui/src/app/common/type/gui-config.ts
@@ -39,6 +39,7 @@ export interface GuiConfig {
   operatorConsoleMessageBufferSize: number;
   defaultLocalUser?: { username?: string; password?: string };
   expirationTimeInMinutes: number;
+  activeTimeInMinutes: number;
 }
 
 export interface SidebarTabs {
diff --git 
a/core/gui/src/app/dashboard/component/admin/user/admin-user.component.ts 
b/core/gui/src/app/dashboard/component/admin/user/admin-user.component.ts
index d9a1577406..7662e84213 100644
--- a/core/gui/src/app/dashboard/component/admin/user/admin-user.component.ts
+++ b/core/gui/src/app/dashboard/component/admin/user/admin-user.component.ts
@@ -190,8 +190,8 @@ export class AdminUserComponent implements OnInit {
     if (!user.lastLogin) {
       return false;
     }
-    // Active window set to expiration-in-minutes from auth.conf
-    const active_window = this.config.env.expirationTimeInMinutes * 60 * 1000;
+    // Active window set to active-time-in-minutes from gui.conf
+    const active_window = this.config.env.activeTimeInMinutes * 60 * 1000;
     const lastMs = user.lastLogin * 1000;
     return Date.now() - lastMs < active_window;
   }

Reply via email to