[java-identity-provider] branch master updated: IDP-1200 - Logout templates lacking rpUIContext for initiating SP

Scott Cantor cantor.2 at osu.edu
Thu Sep 6 22:10:08 EDT 2018


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

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

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

The following commit(s) were added to refs/heads/master by this push:
       new  12c3016   IDP-1200 - Logout templates lacking rpUIContext for initiating SP
12c3016 is described below

commit 12c3016025273bbcdee7c0d87085454ff7e565fe
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Sep 6 22:09:16 2018 -0400

    IDP-1200 - Logout templates lacking rpUIContext for initiating SP
    
    https://issues.shibboleth.net/jira/browse/IDP-1200
---
 .../flows/saml/saml2/slo-front-abstract-beans.xml  | 38 +++++++++++++++++++++-
 .../flows/saml/saml2/slo-front-abstract-flow.xml   |  1 +
 .../resources/system/messages/messages.properties  |  1 +
 idp-conf/src/main/resources/views/logout.vm        | 16 +++++++++
 4 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-beans.xml b/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-beans.xml
index d721c14..077e30f 100644
--- a/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-beans.xml
+++ b/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-beans.xml
@@ -39,6 +39,42 @@
     
     <bean id="LogoutPopulateAuditContext" parent="shibboleth.AbstractPopulateAuditContext"
         p:fieldExtractors="#{getObject('shibboleth.LogoutRequestAuditExtractors') ?: getObject('shibboleth.DefaultLogoutRequestAuditExtractors')}" />
+
+    <bean id="SetIssuerRPUIInformation"
+            class="net.shibboleth.idp.ui.impl.SetRPUIInformation" scope="prototype"
+            p:activationCondition="%{idp.logout.elaboration:false}"
+            p:httpServletRequest-ref="shibboleth.HttpServletRequest">
+        <property name="fallbackLanguages">
+            <bean parent="shibboleth.CommaDelimStringArray" c:_0="#{'%{idp.ui.fallbackLanguages:}'.trim()}" />
+        </property>
+        <property name="metadataContextLookupStrategy">
+            <bean class="com.google.common.base.Functions" factory-method="compose">
+                <constructor-arg name="g">
+                    <bean class="com.google.common.base.Functions" factory-method="compose">
+                        <constructor-arg name="g">
+                            <ref bean="shibboleth.ChildLookup.SAMLMetadataContext" />
+                        </constructor-arg>
+                        <constructor-arg name="f">
+                            <ref bean="shibboleth.ChildLookup.SAMLPeerEntityContext" />
+                        </constructor-arg>
+                    </bean>
+                </constructor-arg>
+                <constructor-arg name="f">
+                    <ref bean="shibboleth.MessageContextLookup.Inbound" />
+                </constructor-arg>
+            </bean>
+        </property>
+        <property name="RPUIContextCreateStrategy">
+            <bean class="com.google.common.base.Functions" factory-method="compose">
+                <constructor-arg name="g">
+                    <ref bean="shibboleth.ChildLookupOrCreate.RelyingPartyUIContext" />
+                </constructor-arg>
+                <constructor-arg name="f">
+                    <ref bean="shibboleth.ChildLookup.RelyingParty" />
+                </constructor-arg>
+            </bean>
+        </property>
+    </bean>
         
     <bean id="PopulateMultiRPContextFromLogoutContext"
         class="net.shibboleth.idp.session.impl.PopulateMultiRPContextFromLogoutContext" scope="prototype"
@@ -51,7 +87,7 @@
             p:activationCondition="%{idp.logout.elaboration:false}"
             p:httpServletRequest-ref="shibboleth.HttpServletRequest">
         <property name="fallbackLanguages">
-            <bean parent="shibboleth.CommaDelimStringArray" c:_0="%{idp.ui.fallbackLanguages:}" />
+            <bean parent="shibboleth.CommaDelimStringArray" c:_0="#{'%{idp.ui.fallbackLanguages:}'.trim()}" />
         </property>
         <property name="metadataContextLookupStrategy">
             <bean class="com.google.common.base.Functions" factory-method="compose">
diff --git a/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-flow.xml b/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-flow.xml
index f9e6c4c..833fc91 100644
--- a/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-flow.xml
+++ b/idp-conf/src/main/resources/system/flows/saml/saml2/slo-front-abstract-flow.xml
@@ -87,6 +87,7 @@
     <!-- Continue the logout process. -->
 
     <action-state id="CompleteLogout">
+        <evaluate expression="SetIssuerRPUIInformation" />
         <evaluate expression="LogoutPopulateAuditContext" />
         <evaluate expression="PopulateMultiRPContextFromLogoutContext" />
         <evaluate expression="'proceed'" />
diff --git a/idp-conf/src/main/resources/system/messages/messages.properties b/idp-conf/src/main/resources/system/messages/messages.properties
index 3f71609..86d1986 100644
--- a/idp-conf/src/main/resources/system/messages/messages.properties
+++ b/idp-conf/src/main/resources/system/messages/messages.properties
@@ -122,6 +122,7 @@ idp.userprefs.no-js = This feature requires Javascript.
 
 # Logout-related messages
 
+idp.logout.sp-initiated = You have been logged out of the following service:
 idp.logout.ask = Would you like to attempt to log out of all services accessed during your session? \
                     Please select <strong>Yes</strong> or <strong>No</strong> to ensure the logout \
                     operation completes, or wait a few seconds for Yes.
diff --git a/idp-conf/src/main/resources/views/logout.vm b/idp-conf/src/main/resources/views/logout.vm
index 2342855..d31ae0e 100644
--- a/idp-conf/src/main/resources/views/logout.vm
+++ b/idp-conf/src/main/resources/views/logout.vm
@@ -14,6 +14,10 @@
 ## environment - Spring Environment object for property resolution
 ## custom - arbitrary object injected by deployer
 ##
+#set ($rpContext = $profileRequestContext.getSubcontext("net.shibboleth.idp.profile.context.RelyingPartyContext"))
+#if ($rpContext)
+#set ($rpUIContext = $rpContext.getSubcontext("net.shibboleth.idp.ui.context.RelyingPartyUIContext"))
+#end
 <!DOCTYPE html>
 <html>
     <head>
@@ -40,6 +44,18 @@
             decision, and we don't have a good suggestion for a default.</p>
             <br>
     
+            #if ($rpContext)
+                <p>#springMessageText("idp.logout.sp-initiated", "You have been logged out of the following service:")</p>
+                <blockquote>
+                #if ($rpUIContext)
+                    $encoder.encodeForHTML($rpUIContext.getServiceName())
+                #else
+                    $encoder.encodeForHTML($rpContext.getRelyingPartyId())
+                #end
+                </blockquote>
+                <br>
+            #end
+
             #if ( $logoutContext and !$logoutContext.getSessionMap().isEmpty() )
                 <p>#springMessageText("idp.logout.ask", "Would you like to attempt to log out of all services accessed during your session? Please select <strong>Yes</strong> or <strong>No</strong> to ensure the logout operation completes, or wait a few seconds for Yes.")</p>
                 <br>

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


More information about the commits mailing list