From 0ca1cf6b76d2a9251607f2d7b7b786a867a1a47c Mon Sep 17 00:00:00 2001 From: haburger Date: Thu, 28 Nov 2024 16:36:35 +0000 Subject: [PATCH] new configuration version --- .../etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml | 2 +- .../var/opt/nevisauth/default/conf/askMobileNumber.groovy | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml index 6b9a21f..296aecc 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/etc/nevis/k8s-nevisauth-7022472ae407577ae604bbb8.yaml @@ -45,7 +45,7 @@ spec: podDisruptionBudget: maxUnavailable: "50%" git: - tag: "r-232522f88238bad6e4221f000cd94670545f5bf5" + tag: "r-68d22c8461fae1d86f92dc91331b67bf7ad55703" dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth" credentials: "git-credentials" keystores: diff --git a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy index ac540dd..64194fa 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/askMobileNumber.groovy @@ -3,6 +3,8 @@ import ch.nevis.idm.client.IdmRestClient import ch.nevis.idm.client.IdmRestClientFactory import ch.nevis.idm.client.HTTPRequestWrapper +import java.time.Duration + import groovy.json.JsonSlurper import groovy.xml.XmlSlurper @@ -51,7 +53,7 @@ if (inargs['submit'] && (!inargs['mobile'] || inargs['mobile'].isEmpty()) && ina LOG.info("Event='NOMOBILENUMBER', Requester='${requester}', RequestId='${requestId}', User=${user}, SourceIp=${sourceIp}, UserAgent='${userAgent}'") response.setCookie("testcookie", "testvalue", "/path", "Thu, 01 Jan 2025 00:00:00 GMT", - -1, true, false); + Duration.ofDays(1), true, false); def agovSkipAskingMobileCookie = "agovSkipAskingMobile=true; Domain=${parameters.get('cookie.domain')}; Path=/; Max-Age=86400; SameSite=Strict; Secure; HttpOnly" response.setHeader('Set-Cookie', agovSkipAskingMobileCookie) response.setResult('done')