<div dir="ltr"><div dir="ltr"><div dir="ltr">Cool, only one thing - it doesn't work for me in this way.<br><div dir="ltr"></div><div dir="ltr"><br></div><div>Full SP metadata is:<br></div><div dir="ltr"><?xml version="1.0" encoding="UTF-8"?><br><md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>" entityID="IAMShowcase" validUntil="2025-12-09T09:13:31.006Z"><br>   <md:SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="true" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol"><br>
      <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat><br>

</div><div>      <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat><br>      <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="<a href="https://sptest.iamshowcase.com/acs">https://sptest.iamshowcase.com/acs</a>" index="0" isDefault="true"/><br>   </md:SPSSODescriptor><br></md:EntityDescriptor><br></div><div><br></div><div>saml-nameid.xml contains the following as you said:<br></div><div><bean parent="shibboleth.SAML2AttributeSourcedGenerator"<br>      p:format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"<br>      p:attributeSourceIds="#{ {'mail'} }"><br></bean><br><br></div><div>log contains:</div><div>2019-04-19 10:12:40,193 - 127.0.0.1 - WARN [org.opensaml.saml.common.profile.logic.MetadataNameIdentifierFormatStrategy:74] - Ignoring NameIDFormat metadata that includes the 'unspecified' format<br></div><div><br></div><div>Resulting SAMLResponse doesn't include any NameID.</div><div><br></div><div>If I remove explicitly <br></div><div>
<div dir="ltr">      <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat><br>

</div>

from metadata it works properly and I can see NameID filled with mail.<br></div><div><br></div><div>What have I broken?</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 18 Apr 2019 at 19:26, Andrew Morgan <<a href="mailto:morgan@orst.edu">morgan@orst.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 18 Apr 2019, Yakov Revyakin wrote:<br>
<br>
> Hi guys, thanks to you I have done some steps forward.<br>
><br>
> Could you help me understand how the IdP manages the following related case<br>
> to get NameID in format of emailAddress:<br>
> 1) SP metadata includes<br>
><br>
> <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat><br>
><br>
> <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat><br>
<br>
The unspecified format is ignored in metadata.  In this case, only the <br>
emailAddress format will be used.<br>
<br>
> 2) authnrequest doesn't include any NameIDPolicy records<br>
> 3) AttributeResolver&Filter provide 'mail'<br>
> (urn:oid:0.9.2342.19200300.100.1.3)<br>
><br>
> Is next step to modify saml-nameid.xml in the following way?<br>
><br>
> <util:list id="shibboleth.SAML2NameIDGenerators"><br>
>    <bean parent="shibboleth.SAML2AttributeSourcedGenerator"<br>
>      p:format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"<br>
>      p:attributeSourceIds="#{ {'mail'} }"><br>
><br>
>      <property name="activationCondition"><br>
>          <bean parent="shibboleth.Conditions.RelyingPartyId"<br>
> c:candidate="IAMShowcase" /><br>
>      </property><br>
>    </bean><br>
> </util:list><br>
<br>
You don't need an activationCondition here, unless you really only want to <br>
release the 'mail' attribute to emailAddress NameID format request for <br>
this specific SP.  If you want to release the 'mail' attribute as the <br>
NameID when *any* SP requests emailAddress format, leave out the <br>
activationCondition.<br>
<br>
> And relying-party.xml in the following way? (As the request doesn't include<br>
> NameIDPolicy)<br>
>    <util:list id="shibboleth.RelyingPartyOverrides"><br>
>        <bean parent="RelyingPartyByName" c:relyingPartyIds="IAMShowcase"><br>
>            <property name="profileConfigurations"><br>
>                <list><br>
>                    <bean parent="SAML2.SSO"<br>
> p:nameIDFormatPrecedence="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"<br>
> /><br>
>                </list><br>
>            </property><br>
>        </bean><br>
>    </util:list><br>
<br>
You don't need a nameIDFormatPrecedence override in relying-party.xml if <br>
the NameID format is specified in metadata or in the SAML authn request.<br>
<br>
> Is there any way to automate the behavior using information about<br>
> NameIDFormat presented in metadata and exclude 2 last steps?<br>
<br>
Yes.  You don't need an override in relying-party.xml when the metadata <br>
contains a NameID Format.<br>
<br>
You do need to add a NameID generator to saml-nameid.xml so that the <br>
Shibboleth IDP can response to emailAddress NameID formats, but it doesn't <br>
need an activationCondition specific to a single SP.<br>
<br>
Thanks,<br>
        Andy<br>
-- <br>
For Consortium Member technical support, see <a href="https://wiki.shibboleth.net/confluence/x/coFAAg" rel="noreferrer" target="_blank">https://wiki.shibboleth.net/confluence/x/coFAAg</a><br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net" target="_blank">users-unsubscribe@shibboleth.net</a><br>
</blockquote></div>