<div dir="ltr">I don't know if this is good idea, but it works in my tests on IDP v3.   Define a DOCTYPE at the top of the attribute-filter.xml and include the ENTITY which includes another file with the xml block  you want to duplicate.    Then further down reference that entity in XML.   It's the equivalent of copying and pasting the same block of XML everywhere you put the entity reference.<br><br>attribute-filter.xml<br><br><!DOCTYPE root<br>[<br>  <!ENTITY extra-attributes SYSTEM "extra-attributes.xml"><br>]><br><br><br><afp:AttributeFilterPolicyGroup id="ShibbolethFilterPolicy"<br>        xmlns:afp="urn:mace:shibboleth:2.0:afp"<br>        xmlns:basic="urn:mace:shibboleth:2.0:afp:mf:basic"<br>        xmlns:saml="urn:mace:shibboleth:2.0:afp:mf:saml"<br>        xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"<br>        xsi:schemaLocation="urn:mace:shibboleth:2.0:afp <a href="http://shibboleth.net/schema/idp/shibboleth-afp.xsd">http://shibboleth.net/schema/idp/shibboleth-afp.xsd</a><br>                            urn:mace:shibboleth:2.0:afp:mf:basic <a href="http://shibboleth.net/schema/idp/shibboleth-afp-mf-basic.xsd">http://shibboleth.net/schema/idp/shibboleth-afp-mf-basic.xsd</a><br>                            urn:mace:shibboleth:2.0:afp:mf:saml <a href="http://shibboleth.net/schema/idp/shibboleth-afp-mf-saml.xsd">http://shibboleth.net/schema/idp/shibboleth-afp-mf-saml.xsd</a>"><br>...<br><afp:AttributeFilterPolicy id="releaseTest"><br>   <afp:PolicyRequirementRule xsi:type="basic:OR"><br>         <basic:Rule xsi:type="basic:AttributeRequesterString" value="<a href="https://test.example.com/shibboleth">https://test.example.com/shibboleth</a>" /><br>   </afp:PolicyRequirementRule><br><br>    &extra-attributes;<br><br><afp:AttributeRule attributeID="uid"><br>      <afp:PermitValueRule xsi:type="basic:ANY" /><br></afp:AttributeRule><br><br></afp:AttributeFilterPolicy><br><br>extra-attributes.xml (in the conf directory with the attribute-filter.xml file)<br><br><afp:AttributeRule attributeID="cn"><br>      <afp:PermitValueRule xsi:type="basic:ANY" /><br></afp:AttributeRule><br><br><afp:AttributeRule attributeID="telephoneNumber"><br>     <afp:PermitValueRule xsi:type="basic:ANY" /><br></afp:AttributeRule><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 26, 2016 at 1:46 PM, cneberg <span dir="ltr"><<a href="mailto:cneberg@gmail.com" target="_blank">cneberg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you use an xml entity in config files?  If so that might solve the cut and paste issue.<span></span><div><br></div><div>Christopher <div><div class="h5"><br><br>On Friday, February 26, 2016, Baron Fujimoto <<a href="mailto:baron@hawaii.edu" target="_blank">baron@hawaii.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Feb 26, 2016 at 09:43:50AM -0000, Rod Widdowson wrote:<br>
>> Is there a way to make an IdP AttributeFilterPolicy more modular by<br>
>> defining a named attribute bundle and then incorporating and possibly<br>
>> supplementing it in a particular AttributeFilterPolicy?<br>
><br>
>I see exactly what you mean (and why) but No.<br>
><br>
>The (implied) namespaces for attributes are already complicated enough that<br>
>I wouldn't want to add them.<br>
><br>
>For completeness I'll mention that the attribute filter language does have<br>
>hooks to allow PolicyRequirementRules to be shared, but it was only (badly<br>
>&) partially implemented in V2 and we have withdrawn support in V3 (it turns<br>
>out that the semantics become almost impossible).<br>
><br>
>So I'm afraid that cut & paste is your friend.<br>
>If you feel strongly you could pop in an RFE to make PolicyRequirementRef<br>
>work.  But it may well be a breaking change (at the edges) and so that would<br>
>need to wait for 4.0.<br>
<br>
Ok, thanks. I mainly wanted to make sure I wasn't missing an opportunity<br>
to factor this out and perhaps simplify the configs. I think it would be<br>
useful, for all the usual reasons you might want to factor something like<br>
that out, but understand if it's not cards for the foreseeable future.<br>
<br>
-baron<br>
--<br>
Baron Fujimoto <<a>baron@hawaii.edu</a>> :: UH Information Technology Services<br>
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum<br>
--<br>
To unsubscribe from this list send an email to <a>users-unsubscribe@shibboleth.net</a><br>
</blockquote></div></div></div>
</blockquote></div><br></div>