From 480cfef2aa6ba2a8547c1396307387f89c856ea7 Mon Sep 17 00:00:00 2001 From: haburger Date: Thu, 23 Jan 2025 07:27:16 +0000 Subject: [PATCH] new configuration version --- ...8s-nevisauth-7022472ae407577ae604bbb8.yaml | 2 +- .../default/conf/recovery_ongoing.groovy | 24 ++++++++++++++++--- 2 files changed, 22 insertions(+), 4 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 d803fc0..4e4c48d 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-e1c8fb676d3cb1b89262d9f0a54f74c6fe4b3a00" + tag: "r-b14743723ffdec93c57595edef5e2386d20ea798" 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/recovery_ongoing.groovy b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/recovery_ongoing.groovy index f1ad8b2..9cad0da 100644 --- a/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/recovery_ongoing.groovy +++ b/DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth/var/opt/nevisauth/default/conf/recovery_ongoing.groovy @@ -1,4 +1,22 @@ +import ch.nevis.esauth.auth.engine.AuthResponse + if (inargs['recovery'] != null && inargs['recovery'] == 'recovery' ) { - response.setResult('ok') - return -} \ No newline at end of file + // clean up SAML state, to make sure the redirect will really be processed + // IdentityProviderState sets session attributes as follows + // -session-participants. = + // State name contains the name of the pattern 'Recovery_redirectAgovMe' + def s = request.getAuthSession(true) + def sessionKeySet = new HashSet(session.keySet()) + sessionKeySet.each { key -> + if ( key ==~ /.*Recovery_redirectAgovMe-session-participants\.*/ ) { + LOG.info("Deleted session attribute '${key}'") + s.removeAttribute(key) + } + } + response.setResult('ok') + return +} + +// if we reach this, display the GUI again +response.setStatus(AuthResponse.AUTH_CONTINUE) +return \ No newline at end of file