<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 11pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p>Hi All,</p>
<p><br>
</p>
<p>I'm currently attempting to write an Activation Condition predicate to test if an attribute is empty. The approach that I've taken, modeled off the documentation [1] is to wrap a wildcard SimpleAttributePredicate in a NOT condition like so:<br>
</p>
<div><br>
</div>
<div><!-- Ensure that mail is not already populated --><br>
<bean parent="shibboleth.Conditions.NOT"><br>
<constructor-arg><br>
<bean class="net.shibboleth.idp.profile.logic.SimpleAttributePredicate"><br>
<property name="attributeValueMap"><br>
<map><br>
<entry key="mail"><br>
<list><br>
<value>*</value><br>
</list><br>
</entry><br>
</map><br>
</property><br>
</bean><br>
</constructor-arg><br>
</bean></div>
<br>
Unfortunately, in so doing, I discovered that SimpleAttributePredicate wildcarding returns true, even for empty attributes (that get pulled out of the connected data source as EmptyAttributeValue objects). This seems like a bug to me, and I've filed a report
here [2].
<p></p>
<p><br>
</p>
<p>As a stop-gap, does anybody have a good approach (outside of writing a custom predicate bean myself) to return true only if an attribute is empty or non-existent?</p>
<p><br>
</p>
<p>Many thanks in advance,</p>
<p>Michael<br>
<br>
[1] <a href="https://wiki.shibboleth.net/confluence/display/IDP30/ActivationConditions" class="OWAAutoLink" id="LPlnk638571" previewremoved="true">https://wiki.shibboleth.net/confluence/display/IDP30/ActivationConditions</a></p>
<p>[2] <a href="https://issues.shibboleth.net/jira/browse/IDP-1206" class="OWAAutoLink" id="LPlnk442295" previewremoved="true">https://issues.shibboleth.net/jira/browse/IDP-1206</a></p>
<br>
<p></p>
</div>
</body>
</html>