<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-mailStijl17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi Everybody,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">We are trying to release a new scoped attribute from one of our federations&#8217; IdPs. &nbsp;To this end we added the following<o:p></o:p></p>
<p class="MsoNormal">code to the IdPs attribute-resolver.xml:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;resolver:AttributeDefinition id=&quot;NewAttribute&quot; xsi:type=&quot;Scoped&quot; xmlns=&quot;urn:mace:shibboleth:2.0:resolver:ad&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scope=&quot;kuleuven.be&quot; sourceAttributeID=&quot;SourceAttribute&quot;&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;resolver:Dependency ref=&quot;myLDAP&quot; /&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;resolver:AttributeEncoder xsi:type=&quot;SAML1ScopedString&quot; xmlns=&quot;urn:mace:shibboleth:2.0:attribute:encoder&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name=&quot;urn:mace:dir:attribute-def:NewAttribute&quot; /&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;resolver:AttributeEncoder xsi:type=&quot;SAML2ScopedString&quot; xmlns=&quot;urn:mace:shibboleth:2.0:attribute:encoder&quot;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name=&quot;urn:mace:kuleuven.be:dir:attribute-def:NewAttribute&quot; friendlyName=&quot;NewAttribute&quot; /&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="NL-BE" style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;/resolver:AttributeDefinition&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="NL-BE" style="font-family:&quot;Courier New&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">We also updated the attribute-filter.xml to release the attribute, and added a line to the metadata to enable this IdP to use the &#8216;kuleuven.be&#8217; scope:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;EntityDescriptor entityID=&quot;IdPEntityID&quot;&gt;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;IDPSSODescriptor protocolSupportEnumeration=&quot;urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol urn:mace:shibboleth:1.0&quot;&gt;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;Extensions&gt;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-indent:36.0pt"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;shibmd:Scope regexp=&quot;false&quot;&gt;otherscope&lt;/shibmd:Scope&gt;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:72.0pt;text-indent:36.0pt"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;shibmd:Scope regexp=&quot;false&quot;&gt;kuleuven.be&lt;/shibmd:Scope&gt;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;/Extensions&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230;<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">On the IdPs side, everything seems ok, the IdP release the attribute correctly as we have confirmed by<o:p></o:p></p>
<p class="MsoNormal">inspecting the logs.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Next we configured a test SP to receive this new attribute. Adding a rule to the attribute-policy.xml:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;afp:PermitValueRule id=&quot;ScopingRules&quot; xsi:type=&quot;AND&quot;&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rule xsi:type=&quot;NOT&quot;&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rule xsi:type=&quot;AttributeValueRegex&quot; regex=&quot;@&quot;/&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Rule&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rule xsi:type=&quot;saml:AttributeScopeMatchesShibMDScope&quot; xmlns:saml=&quot;urn:mace:shibboleth:2.0:afp:mf:saml&quot;/&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;/afp:PermitValueRule&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;afp:AttributeRule attributeID=&quot;NewAttribute&quot;&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;afp:PermitValueRuleReference ref=&quot;ScopingRules&quot;/&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">&lt;/afp:AttributeRule&gt;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">Now according to the SP logs, the attribute is successfully received. The problem is that it is filtered out by the SPs filtering policy:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">2013-02-20 11:19:16 DEBUG Shibboleth.AttributeFilter [3]: applying filtering rule(s) for attribute (NewAttribute) from (IdPEntityID)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;">2013-02-20 11:19:16 WARN Shibboleth.AttributeFilter [3]: removed value at position (0) of attribute (NewAttribute) from (IdPEntityID)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:&quot;Courier New&quot;,&quot;serif&quot;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal">It seems the scope is not properly applied. When I change the SPs filter to only allow values containing an &#8216;@&#8217;, the attribute passes just fine. We are releasing other attributes that are scoped with<o:p></o:p></p>
<p class="MsoNormal">the &#8216;otherscope&#8217; defined in our attribute-filter.xml, and these are also passing the SPs filter without a problem. I can&#8217;t find a difference between the old attributes that work and the new attribute that doesn&#8217;t
<o:p></o:p></p>
<p class="MsoNormal">anywhere&#8230;<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Can anyone spot any obvious errors here, or tell me other places I could look for configuration mistakes?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Thanks!<o:p></o:p></p>
<p class="MsoNormal">Joep<o:p></o:p></p>
</div>
</body>
</html>