From fc32a4d7eb035c18c3fe3df818c03d9c688bf7a6 Mon Sep 17 00:00:00 2001
From: Test User <test_user@mail.com>
Date: Wed, 22 Jan 2025 16:15:25 +0200
Subject: [PATCH] [MDTUDDM-0000] Change kong lifetime cookie to 7200

Change-Id: Ibb0b8ca92896c347442c58f46ccf71bb1087ac6f
---
 .../kong-oidc-nopublic-api-plugin.yaml        |  2 +-
 .../templates/kong-oidc-nopublic-plugin.yaml  |  2 +-
 deploy-templates/values.yaml                  | 26 +++++++++----------
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/deploy-templates/templates/kong-oidc-nopublic-api-plugin.yaml b/deploy-templates/templates/kong-oidc-nopublic-api-plugin.yaml
index cd4b43cc..f40f580d 100644
--- a/deploy-templates/templates/kong-oidc-nopublic-api-plugin.yaml
+++ b/deploy-templates/templates/kong-oidc-nopublic-api-plugin.yaml
@@ -32,7 +32,7 @@ config:
             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
             "connect_timeout":250}}'
   {{- else }}
-  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
             "connect_timeout":250}}'
diff --git a/deploy-templates/templates/kong-oidc-nopublic-plugin.yaml b/deploy-templates/templates/kong-oidc-nopublic-plugin.yaml
index 6cf5a42a..47212368 100644
--- a/deploy-templates/templates/kong-oidc-nopublic-plugin.yaml
+++ b/deploy-templates/templates/kong-oidc-nopublic-plugin.yaml
@@ -28,7 +28,7 @@ config:
           "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
           "connect_timeout":250}}'
   {{- else}}
-  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
           "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
           "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
           "connect_timeout":250}}'
diff --git a/deploy-templates/values.yaml b/deploy-templates/values.yaml
index 4ee82201..c576da72 100644
--- a/deploy-templates/values.yaml
+++ b/deploy-templates/values.yaml
@@ -429,7 +429,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -454,7 +454,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -479,7 +479,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -504,7 +504,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -531,7 +531,7 @@ portals:
                 additionalParameters:
                   access_token_header_name: Authorization
                   bearer_access_token: 'yes'
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                                        "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                                        "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                                        "connect_timeout":250}}'
@@ -902,7 +902,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -928,7 +928,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -954,7 +954,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -980,7 +980,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -1006,7 +1006,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -1032,7 +1032,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -1058,7 +1058,7 @@ portals:
                 plugin: oidc
                 additionalParameters:
                   unauth_action: redirect
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                             "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                             "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                             "connect_timeout":250}}'
@@ -1086,7 +1086,7 @@ portals:
                 additionalParameters:
                   access_token_header_name: Authorization
                   bearer_access_token: 'yes'
-                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"3600"},"storage":"sentinel",
+                  session_opts: '{"cookie":{"samesite":"Lax","secure":true,"lifetime":"7200"},"storage":"sentinel",
                                           "sentinel":{"sentinel_master_name":"mymaster", "sentinel_db":"sessions",
                                           "sentinel_host":"{{- template "sentinel.host" $ -}}", "sentinel_port":"{{- template "sentinel.port" $ -}}","uselocking":false,
                                           "connect_timeout":250}}'
-- 
2.31.1

