[java-identity-provider COMMIT] /trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resol...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Feb 16 11:53:02 EST 2017
Author: rdw
Date: Thu Feb 16 11:53:01 2017
New Revision: 8622
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8622&view=rev
Log:
IDP-680 deprecate sourceAttributeID
https://issues.shibboleth.net/jira/browse/IDP-680
Given the new world of attribute inputs and dataconnector inputs this
problematic configuration attribute becomes pointless.
Warn on it and do as muh as is feasible to unpick the structures we
used to use to warn about odd uses of it.
Modified:
trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/BaseAttributeDefinitionParser.java
Modified: trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/BaseAttributeDefinitionParser.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/BaseAttributeDefinitionParser.java?rev=8622&r1=8621&r2=8622&view=diff
==============================================================================
--- trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/BaseAttributeDefinitionParser.java (original)
+++ trunk/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/ad/BaseAttributeDefinitionParser.java Thu Feb 16 11:53:01 2017
@@ -27,6 +27,8 @@
import net.shibboleth.ext.spring.util.SpringSupport;
import net.shibboleth.idp.attribute.resolver.spring.BaseResolverPluginParser;
import net.shibboleth.idp.attribute.resolver.spring.impl.AttributeResolverNamespaceHandler;
+import net.shibboleth.idp.attribute.resolver.spring.impl.InputAttributeDefinitionParser;
+import net.shibboleth.idp.attribute.resolver.spring.impl.InputDataConnectorParser;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
import net.shibboleth.utilities.java.support.xml.AttributeSupport;
@@ -115,12 +117,9 @@
final String sourceAttributeId = config.getAttributeNodeNS(null, "sourceAttributeID").getValue();
log.debug("{} Setting sourceAttributeID {}", getLogPrefix(), sourceAttributeId);
builder.addPropertyValue("sourceAttributeId", sourceAttributeId);
- if (!needsAttributeSourceID()) {
- log.warn("{} sourceAttributeID was specified but is meaningless, add {} as a <Dependency> instead",
- getLogPrefix(), sourceAttributeId);
- }
- } else if (needsAttributeSourceID()) {
- log.warn("{} sourceAttributeID was not specified but is required", getLogPrefix());
+ log.warn("{} sourceAttributeID was specified. It is no longer required. Use "+
+ InputAttributeDefinitionParser.ELEMENT_NAME.getLocalPart() +" or " +
+ InputDataConnectorParser.ELEMENT_NAME.getLocalPart() + ">");
}
final List<Element> attributeEncoders =
@@ -165,10 +164,13 @@
}
/**
- * Ask the specific parser of it needs attributeSourceID. We use this to log several misconfiguration possibilities.
+ * Ask the specific parser of it needs attributeSourceID. We used to use this to log several misconfiguration possibilities,
+ * These days the attribute is irrelevant if you avoid <Dependency> so this is here purely for backwards API compatibility.
*
* @return Whether the attribute definition for this parser meeds attributeSourceID.
*/
- protected abstract boolean needsAttributeSourceID();
+ protected boolean needsAttributeSourceID() {
+ return false;
+ }
}
More information about the commits
mailing list