[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/metadata/example-metadata.xml idp-conf/src/mai...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Sep 22 15:05:55 EDT 2014
Author: scantor
Date: Mon Sep 22 15:05:55 2014
New Revision: 6552
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6552&view=rev
Log:
IDP-341 - Testing use of tag predicate with relying party config.
Modified:
trunk/idp-conf/src/main/resources/metadata/example-metadata.xml
trunk/idp-conf/src/main/resources/system/conf/relying-party-system.xml
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/relyingparty/impl/RelyingPartyConfigurationSupport.java
Modified: trunk/idp-conf/src/main/resources/metadata/example-metadata.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/metadata/example-metadata.xml?rev=6552&r1=6551&r2=6552&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/metadata/example-metadata.xml (original)
+++ trunk/idp-conf/src/main/resources/metadata/example-metadata.xml Mon Sep 22 15:05:55 2014
@@ -7,7 +7,7 @@
<mdattr:EntityAttributes xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">
<saml:Attribute Name="http://macedir.org/entity-category"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
- <saml:AttributeValue>http://id.incommon.org/category/research-and-scholarship
+ <saml:AttributeValue>http://refeds.org/category/research-and-scholarship
</saml:AttributeValue>
</saml:Attribute>
</mdattr:EntityAttributes>
Modified: trunk/idp-conf/src/main/resources/system/conf/relying-party-system.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/conf/relying-party-system.xml?rev=6552&r1=6551&r2=6552&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/conf/relying-party-system.xml (original)
+++ trunk/idp-conf/src/main/resources/system/conf/relying-party-system.xml Mon Sep 22 15:05:55 2014
@@ -41,6 +41,15 @@
<bean id="RelyingPartyByGroup" abstract="true"
class="net.shibboleth.idp.saml.relyingparty.impl.RelyingPartyConfigurationSupport" factory-method="byGroup"
p:responderId-ref="entityID" p:detailedErrors="%{idp.errors.detailed:false}" />
+
+ <!-- Parent bean for RelyingParty overrides based on activation by group. -->
+ <bean id="RelyingPartyByTag" abstract="true"
+ class="net.shibboleth.idp.saml.relyingparty.impl.RelyingPartyConfigurationSupport" factory-method="byTag"
+ p:responderId-ref="entityID" p:detailedErrors="%{idp.errors.detailed:false}" c:trim="false" />
+
+ <bean id="TagCandidate" abstract="true"
+ class="org.opensaml.saml.common.profile.logic.EntityAttributesPredicate.Candidate"
+ c:format="#{null}" />
<!-- Default Profile Configurations, also usable as parent beans in overrides. -->
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/relyingparty/impl/RelyingPartyConfigurationSupport.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/relyingparty/impl/RelyingPartyConfigurationSupport.java?rev=6552&r1=6551&r2=6552&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/relyingparty/impl/RelyingPartyConfigurationSupport.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/relyingparty/impl/RelyingPartyConfigurationSupport.java Mon Sep 22 15:05:55 2014
@@ -23,6 +23,8 @@
import org.opensaml.profile.context.ProfileRequestContext;
import org.opensaml.saml.common.messaging.context.navigate.EntityDescriptorLookupFunction;
+import org.opensaml.saml.common.profile.logic.EntityAttributesPredicate;
+import org.opensaml.saml.common.profile.logic.EntityAttributesPredicate.Candidate;
import org.opensaml.saml.common.profile.logic.EntityGroupNamePredicate;
import org.opensaml.saml.saml2.metadata.EntityDescriptor;
@@ -52,6 +54,7 @@
* <p>If a single ID is supplied, then the ID is also set as the identifier for the configuration.</p>
*
* @param relyingPartyIds the relying parties for which the configuration should be active
+ *
* @return a default-constructed configuration with the appropriate condition set
*/
@Nonnull public static RelyingPartyConfiguration byName(
@@ -77,6 +80,7 @@
* one or more {@link org.opensaml.saml.saml2.metadata.EntitiesDescriptor} groups.
*
* @param groupNames the group names
+ *
* @return a default-constructed configuration with the appropriate condition set
*/
@Nonnull public static RelyingPartyConfiguration byGroup(
@@ -104,4 +108,32 @@
return config;
}
+
+ /**
+ * A shorthand method for constructing a {@link RelyingPartyConfiguration} with an activation condition based on
+ * an {@link EntityAttributesPredicate}.
+ *
+ * @param candidates the candidate rules
[... 24 lines stripped ...]
More information about the commits
mailing list