[java-shib-common COMMIT] in /branches/REL_1/src/main: java/edu/internet2/middleware/shibboleth/common/attribute/filt...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Mar 19 20:06:55 EDT 2013
Author: scantor
Date: Tue Mar 19 20:06:55 2013
New Revision: 1063
URL: http://svn.shibboleth.net/view/java-shib-common?rev=1063&view=rev
Log:
Option limiting AttributeInMetadata matching where an actual ACS descriptor exists.
Modified:
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/match/saml/AttributeInMetadataMatchFunctor.java
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/filtering/match/saml/AttributeInMetadataMatchFunctorBeanDefinitionParser.java
branches/REL_1/src/main/resources/schema/shibboleth-2.0-afp-mf-saml.xsd
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/match/saml/AttributeInMetadataMatchFunctor.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/match/saml/AttributeInMetadataMatchFunctor.java?rev=1063&r1=1062&r2=1063&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/match/saml/AttributeInMetadataMatchFunctor.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/match/saml/AttributeInMetadataMatchFunctor.java Tue Mar 19 20:06:55 2013
@@ -59,6 +59,9 @@
/** Whether optionally requested attributes should be matched. */
private boolean onlyIfRequired;
+
+ /** Whether to return a match if the metadata does not contain an ACS descriptor. */
+ private boolean matchIfMetadataSilent;
/**
* Gets whether optionally requested attributes should be matched.
@@ -78,6 +81,24 @@
onlyIfRequired = flag;
}
+ /**
+ * Gets whether to matched if the metadata contains no AttributeConsumingService.
+ *
+ * @return whether to match if the metadata contains no AttributeConsumingService
+ */
+ public boolean isMatchIfMetadataSilent() {
+ return matchIfMetadataSilent;
+ }
+
+ /**
+ * Sets whether to match if the metadata contains no AttributeConsumingService.
+ *
+ * @param flag whether to match if the metadata contains no AttributeConsumingService
+ */
+ public void setMatchIfMetadataSilent(final boolean flag) {
+ matchIfMetadataSilent = flag;
+ }
+
/** {@inheritDoc} */
protected boolean doEvaluatePolicyRequirement(final ShibbolethFilteringContext filterContext)
throws FilterProcessingException {
@@ -117,7 +138,7 @@
}
}
if (service == null) {
- log.warn("Incoming AuthnRequest's AttributeConsumingServiceIndex did not match the peer's metadata");
+ log.warn("Incoming AuthnRequest's AttributeConsumingServiceIndex did not match peer's metadata");
return false;
}
}
@@ -128,7 +149,7 @@
}
if (service == null) {
log.debug("The peer's metadata did not contain an AttributeConsumingService descriptor");
- return false;
+ return matchIfMetadataSilent;
}
log.debug("Using AttributeConsumingService descriptor with index {}", service.getIndex());
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/filtering/match/saml/AttributeInMetadataMatchFunctorBeanDefinitionParser.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/filtering/match/saml/AttributeInMetadataMatchFunctorBeanDefinitionParser.java?rev=1063&r1=1062&r2=1063&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/filtering/match/saml/AttributeInMetadataMatchFunctorBeanDefinitionParser.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/config/attribute/filtering/match/saml/AttributeInMetadataMatchFunctorBeanDefinitionParser.java Tue Mar 19 20:06:55 2013
@@ -39,12 +39,18 @@
protected void doParse(final Element configElement, final BeanDefinitionBuilder builder) {
super.doParse(configElement, builder);
- boolean onlyIfRequired = true;
+ boolean flag = true;
if (configElement.hasAttributeNS(null, "onlyIfRequired")) {
- onlyIfRequired =
- XMLHelper.getAttributeValueAsBoolean(configElement.getAttributeNodeNS(null, "onlyIfRequired"));
+ flag = XMLHelper.getAttributeValueAsBoolean(configElement.getAttributeNodeNS(null, "onlyIfRequired"));
}
- builder.addPropertyValue("onlyIfRequired", onlyIfRequired);
+ builder.addPropertyValue("onlyIfRequired", flag);
+
+ flag = false;
[... 30 lines stripped ...]
More information about the commits
mailing list