nameid-format:unspecified for relying party

Baron Fujimoto baron at
Wed Jul 11 23:01:28 EDT 2018

On Tue, Jul 10, 2018 at 12:43:41PM +0000, Cantor, Scott wrote:
>> Ultimately, I was able to produce something that appears to work. It still
>> doesn't seem to be in accordance with the documentation at
>> <>
>> documentation though.
>I don't know what to say to that except that I guess I don't feel like I should be spending my time creating it if people aren't going to use it. It takes a lot of time that I could be better spending on something more useful.

Since I had something that appeared to work before seeing that documentation, I was mostly operating along the lines of "if it ain't broke..." Your response was persuasive though that it probably was broke, or at least liable to break, so I am now using the documented method. Thank you very much for providing it.

Am I misunderstanding though that I should be able to specify the NameIDFormat via a RelyingParty override rather than specifying it in the SP's metadata?

Per your ArcGIS documentation this works as expected.

I have the following in saml-nameid.xml:

   <!-- SAML 2 NameID Generation -->
    <util:list id="shibboleth.SAML2NameIDGenerators">

        <ref bean="shibboleth.SAML2TransientGenerator" />

        <bean parent="shibboleth.SAML2AttributeSourcedGenerator"
            p:attributeSourceIds="#{ {'uid'} }" />


The attribute definition for uid in attribute-resolver.xml:

    <!-- uid -->
    <resolver:AttributeDefinition xsi:type="ad:Simple"

        <resolver:Dependency ref="LDAP" />

        <resolver:AttributeEncoder xsi:type="enc:SAML1String"
                name="urn:mace:dir:attribute-def:uid" />

        <resolver:AttributeEncoder xsi:type="enc:SAML2String"
                friendlyName="uid" />

    <!-- /uid -->

NameIDFormat specified in the ArcGIS metadata:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="">
    <md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol">
        <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location=""/>
        <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="" index="1"/>
        <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="" index="2"/>
    <md:Organization xml:lang="en">
        <md:OrganizationName xml:lang="en">ArcGIS Enterprise</md:OrganizationName>
        <md:OrganizationDisplayName xml:lang="en">ArcGIS Enterprise</md:OrganizationDisplayName>
        <md:OrganizationURL xml:lang="en"></md:OrganizationURL>

However, if instead I do not include the NameIDFormat element in the metadata, but instead use a nameIDFormatPrecedence attribute in the ArcGIS relying-party entry such as:

    <RelyingParty id=""
        <ProfileConfiguration xsi:type="saml:SAML2SSOProfile" encryptAssertions="never" encryptNameIds="never" />

It generates a transient format NameID in the Subject once again. The documentation I'm using as references 
describes the RelyingParty nameIDFormatPrecedence attribute as "A space delimited, ordered list of name identifier formats" [1] and the logic (I think) to select the NameIDFormat [2][3].

[1] <>
[2] <>
[3] <> 

I don't know what I'm missing, misuing, or misunderstanding here.

>> Empiricallyurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified, we appear to require both an appropriate relying party entry:
>That's because you're still trying to use that Format, but it isn't even being used because that isn't how you're passing them the data. You should get the same result without it.
>> Without the nameid-format specified here, the SP appears to pick up a value
>> that looks like a transient id.
>Yes, because that's the only way to trigger that Format. Other Formats are possible to handle with metadata.
>> And an attribute-resolver definition:
>That's the V2 mechanism for producing NameIDs and is deprecated, and that encoder also doesn't produce an actual NameID, it builds a SAML Attribute whose AttributeValue has a NameID element stuffed inside it. I would not expect ArcGIS to understand that, but anything's possible. You most assuredly shouldn't do it, and it has no relationship to the nameIDFormatPrecedence property and the Format selection logic. That's why you're still getting a transient ID in the subject.
>> The SP also seems to expect an attribute specifically called NAME_ID, of type
>> SAML2NameID, else it complains that no NAME_ID is found.
>They may *support* that weird approach but they don't require it. If you keep sending them a transient ID, then no, they're not going to handle that alone and they apparently have some kind of support for attribute access that I didn't run across. I would never deploy a NameID-valued Attribute anyway, so that's not at all a practical alternative that would be "better" than just producing a NameID in the Subject.
>> Where the SP appears to use the NameID from the <AttributeStatement>
>> and ignores the one in the <Subject>. None of configuration changes in the
>> course of experimentation seem to have had any effect on the Subject
>> NameID, though I'm not sure if that is expected.
>Selecting a Format is only half the work, there has to something in place that provdies that Format either in the resolver in the deprecated fashion or in the saml-nameid.xml config.

Baron Fujimoto <baron at> :: UH Information Technology Services
minutas cantorum, minutas balorum, minutas carboratum desendus pantorum

More information about the users mailing list