[java-identity-provider] 02/02: IDP-2189 - Warning flow should not delete cookie for dynamic conditions

Scott Cantor cantor.2 at osu.edu
Thu Nov 16 21:09:06 UTC 2023


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=0d8dd7c1b09e6c4a0470e999800922dc7f733a29

commit 0d8dd7c1b09e6c4a0470e999800922dc7f733a29
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Nov 16 16:09:01 2023 -0500

    IDP-2189 - Warning flow should not delete cookie for dynamic conditions
    
    https://shibboleth.atlassian.net/browse/IDP-2189
---
 .../resources/net/shibboleth/idp/flows/intercept/warning-beans.xml | 7 ++++++-
 .../resources/net/shibboleth/idp/flows/intercept/warning-flow.xml  | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-beans.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-beans.xml
index 21a7e9cc3..1dfbe6334 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-beans.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-beans.xml
@@ -14,6 +14,10 @@
 
     <!-- Empty map to override in config file. -->
     <util:map id="shibboleth.warning.ConditionMap" />
+    
+    <!-- Default condition bean controlling cookie behavior. -->
+    <bean id="shibboleth.warning.CookieCondition" parent="shibboleth.Conditions.Constant"
+        c:_0="%{idp.warning.unsetCookieWhenFalse:true}" />
 
     <import resource="conditional:%{idp.home}/conf/intercept/warning-intercept-config.xml" />
 
@@ -23,6 +27,7 @@
 
     <!-- Simplifies flow definition expressions. -->
     <alias name="shibboleth.warning.ConditionMap" alias="WarningConditionMap" />
+    <alias name="shibboleth.warning.CookieCondition" alias="WarningCookieCondition" />
     <alias name="shibboleth.PersistentCookieManager" alias="WarningCookieManager" />
-
+    
 </beans>
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-flow.xml b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-flow.xml
index 8ec542c50..d03b67316 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-flow.xml
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/flows/intercept/warning-flow.xml
@@ -25,7 +25,7 @@
     </decision-state>
 
     <decision-state id="ShouldUnsetCookie">
-        <if test="WarningCookieManager.getCookieValue(WarningCookieName, null) != null"
+        <if test="WarningCookieCondition.test(WarningEntry.getKey()) and WarningCookieManager.getCookieValue(WarningCookieName, null) != null"
             then="UnsetCookie" else="CheckIterator" />
     </decision-state>
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list