[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/system/flows/saml/saml-abstract-beans.xml idp-...

noreply at shibboleth.net noreply at shibboleth.net
Thu Nov 13 20:33:50 EST 2014


Author: scantor
Date: Thu Nov 13 20:33:50 2014
New Revision: 6895

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6895&view=rev
Log:
IDP-418 - SAML 2 query filtering

Added:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/FilterByQueriedAttributes.java   (with props)
Modified:
    trunk/idp-conf/src/main/resources/system/flows/saml/saml-abstract-beans.xml
    trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml
    trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml2/SAML2AttributeQueryFlowTest.java
    trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributeDesignatorMapper.java
    trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AbstractSAMLAttributeMapper.java
    trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/mapping/AttributeMapper.java

Modified: trunk/idp-conf/src/main/resources/system/flows/saml/saml-abstract-beans.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/saml/saml-abstract-beans.xml?rev=6895&r1=6894&r2=6895&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/saml/saml-abstract-beans.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/saml/saml-abstract-beans.xml Thu Nov 13 20:33:50 2014
@@ -209,6 +209,10 @@
         class="net.shibboleth.idp.saml.saml1.profile.impl.FilterByQueriedAttributeDesignators" scope="prototype"
         c:mapper-ref="shibboleth.SAML1AttributeDesignatorsMapperService" />
 
+    <bean id="FilterByQueriedAttributes"
+        class="net.shibboleth.idp.saml.saml2.profile.impl.FilterByQueriedAttributes" scope="prototype"
+        c:mapper-ref="shibboleth.SAML2AttributesMapperService" />
+
     <bean id="PopulatePostAuthnInterceptContext"
             class="net.shibboleth.idp.profile.interceptor.impl.PopulateProfileInterceptorContext" scope="prototype"
             p:availableFlows-ref="shibboleth.AvailableInterceptFlows">

Modified: trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml?rev=6895&r1=6894&r2=6895&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/saml/saml2/attribute-query-flow.xml Thu Nov 13 20:33:50 2014
@@ -17,6 +17,7 @@
     <action-state id="DoProfileWork">
         <evaluate expression="ResolveAttributes" />
         <evaluate expression="FilterAttributes" />
+        <evaluate expression="FilterByQueriedAttributes" />
 
         <evaluate expression="AddResponseShell" />
         <evaluate expression="AddInResponseToToResponse" />

Modified: trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml2/SAML2AttributeQueryFlowTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml2/SAML2AttributeQueryFlowTest.java?rev=6895&r1=6894&r2=6895&view=diff
==============================================================================
--- trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml2/SAML2AttributeQueryFlowTest.java (original)
+++ trunk/idp-conf/src/test/java/net/shibboleth/idp/test/flows/saml2/SAML2AttributeQueryFlowTest.java Thu Nov 13 20:33:50 2014
@@ -25,7 +25,13 @@
 import net.shibboleth.utilities.java.support.xml.SerializeSupport;
 
 import org.joda.time.DateTime;
+import org.opensaml.core.xml.XMLObjectBuilder;
+import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
+import org.opensaml.core.xml.schema.XSAny;
+import org.opensaml.saml.common.SAMLObjectBuilder;
+import org.opensaml.saml.saml2.core.Attribute;
 import org.opensaml.saml.saml2.core.AttributeQuery;
+import org.opensaml.saml.saml2.core.AttributeValue;
 import org.opensaml.saml.saml2.core.NameID;
 import org.opensaml.saml.saml2.core.StatusCode;
 import org.opensaml.saml.saml2.core.Subject;
@@ -74,7 +80,26 @@
      */
     @Test public void testSAML2AttributeQueryFlow() throws Exception {
 
-        buildRequest();
+        buildRequest(false);
+
+        request.setAttribute(ServletRequestX509CredentialAdapter.X509_CERT_REQUEST_ATTRIBUTE,
+                new X509Certificate[] {certFactoryBean.getObject()});
+
+        overrideEndStateOutput(FLOW_ID);
+
+        final FlowExecutionResult result = flowExecutor.launchExecution(FLOW_ID, null, externalContext);
+
+        validateResult(result, FLOW_ID, validator);
+    }
+
+    /**
+     * Test the SAML 2 Attribute Query flow with designators.
+     * 
+     * @throws Exception if an error occurs
+     */
+    @Test public void testSAML2AttributeQueryFlowWithDesignators() throws Exception {
+
+        buildRequest(true);
 

[... 194 lines stripped ...]


More information about the commits mailing list