<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On 16 Apr 2019, at 22:46, Wessel, Keith <<a href="mailto:kwessel@illinois.edu" class="">kwessel@illinois.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I want to add an entity attribute to every entity from the InCommon MDQ preview to know that it came from InCommon or eduGAIN.</span></div></blockquote></div><div class=""><br class=""></div><div class="">You should find that every entity you access via the MDQ preview already includes a couple of different metadata elements that are relevant:</div><div class="">  </div><div class="">    <Extensions></div><div class=""><pre class="">    <mdrpi:RegistrationInfo xmlns:mdrpi="urn:oasis:names:tc:SAML:metadata:rpi" registrationAuthority="<a href="https://incommon.org" class="">https://incommon.org</a>"/>
    <mdattr:EntityAttributes xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute">
      <saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Name="<a href="http://macedir.org/entity-category" class="">http://macedir.org/entity-category</a>" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
        <saml:AttributeValue><a href="http://id.incommon.org/category/registered-by-incommon</saml:AttributeValue>" class="">http://id.incommon.org/category/registered-by-incommon</saml:AttributeValue></a>
      </saml:Attribute>
    </mdattr:EntityAttributes>
  </Extensions>
</pre></div><div class=""><br class=""></div><div class="">The first is the EntityDescriptor/Extensions/RegistrationInfo/@registrationAuthority. Anything "from" (i.e., registered by) InCommon will have one registrationAuthority value, and anything "from" eduGAIN would have some other value, but the specific value will differ depending on which original registrar was involved.</div><div class=""><br class=""></div><div class="">The other thing you can see in the above example is that there's already an entity attribute which specifically indicates that an entity was registered by InCommon, which sounds like exactly what you want. To a first approximation, certainly right now, if that's missing then the metadata is "from" eduGAIN.</div><div class=""><br class=""></div><div class=""><span class="Apple-style-span" style="border-collapse: separate; font-variant-ligatures: normal; font-variant-east-asian: normal; font-variant-position: normal; line-height: normal; border-spacing: 0px; -webkit-text-decorations-in-effect: none;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div class="">    -- Ian<br class=""></div><div class=""><span class="Apple-style-span" style="font-size: medium;"><br class=""></span></div></span></div></span><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>