[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-beans.xml...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Apr 12 21:33:18 EDT 2016
Author: scantor
Date: Tue Apr 12 21:33:17 2016
New Revision: 8200
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8200&view=rev
Log:
Allow ECP profile to bypass SOAP fault for certain events.
Added:
trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/
trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/SOAPErrorPredicate.java (with props)
trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/logic/package-info.java (with props)
Modified:
trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-beans.xml
trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-flow.xml
trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java
Modified: trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-beans.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-beans.xml?rev=8200&r1=8199&r2=8200&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-beans.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-beans.xml Tue Apr 12 21:33:17 2016
@@ -143,6 +143,13 @@
</bean>
<!-- These are used for ECP error handling. -->
+
+ <bean id="SOAPErrorPredicate"
+ class="net.shibboleth.idp.saml.saml2.profile.config.logic.SOAPErrorPredicate">
+ <property name="eventContextLookupStrategy">
+ <bean class="net.shibboleth.idp.profile.context.navigate.WebFlowCurrentEventLookupFunction" />
+ </property>
+ </bean>
<bean id="AddSOAPFault"
class="org.opensaml.soap.soap11.profile.impl.AddSOAPFault" scope="prototype"
Modified: trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-flow.xml?rev=8200&r1=8199&r2=8200&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/saml/saml2/sso-abstract-flow.xml Tue Apr 12 21:33:17 2016
@@ -167,7 +167,8 @@
<!-- For ECP, local errors mean SOAP faults. -->
<decision-state id="HandleErrorLocally">
- <if test="opensamlProfileRequestContext.isBrowserProfile()" then="HandleErrorWithView" else="SOAPFault" />
+ <if test="opensamlProfileRequestContext.isBrowserProfile() or !SOAPErrorPredicate.apply(opensamlProfileRequestContext)"
+ then="HandleErrorWithView" else="SOAPFault" />
</decision-state>
<!-- We need to trap non-proceed transitions in these actions to avoid an infinite loop. -->
Modified: trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java?rev=8200&r1=8199&r2=8200&view=diff
==============================================================================
--- trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java (original)
+++ trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/ECPProfileConfiguration.java Tue Apr 12 21:33:17 2016
@@ -17,9 +17,24 @@
package net.shibboleth.idp.saml.saml2.profile.config;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.opensaml.profile.context.ProfileRequestContext;
+
+import com.google.common.base.Function;
+import com.google.common.collect.ImmutableSet;
+
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
+import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
+import net.shibboleth.utilities.java.support.primitive.StringSupport;
/** Configuration support for SAML 2 ECP. */
public class ECPProfileConfiguration extends BrowserSSOProfileConfiguration {
@@ -27,9 +42,17 @@
/** ID for this profile configuration. */
public static final String PROFILE_ID = "http://shibboleth.net/ns/profiles/saml2/sso/ecp";
+ /** Lookup function to supply {@link #localEvents} property. */
+ @Nullable private Function<ProfileRequestContext,Set<String>> localEventsLookupStrategy;
+
+ /** Local error events to handle without a SOAP fault. */
+ @Nonnull @NonnullElements private Set<String> localEvents;
+
[... 54 lines stripped ...]
More information about the commits
mailing list