metadata/requestedAttributes produces hardcoded ServiceName in AttributeConsumingService metadata response

Nov 18, 2013 at 4:36 PM
When a requested attribute is added to the metadata:
    <add name="urn:cn" />
The metadata output includes:
<q1:AttributeConsumingService index="0" isDefault="true">
  <q1:ServiceName xml:lang="en">SP</q1:ServiceName>
  <q1:RequestedAttribute Name="urn:cn" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic" />
The ServiceName is hardcoded on line 507 of Saml20MetadataDocument.cs
attConsumingService.ServiceName = new[] { new LocalizedName("SP", "en") };
Is this the desired behaviour? It means ServiceName cannot be set.
Nov 20, 2013 at 12:46 AM
This area of the code came over from OIOSAML.NET wholesale, and I have to profess to not knowing as much about it as the other areas because I haven't used the attribute consuming service stuff.

However, just reading through the specification, It seems the name and description fields are more for human consumption than machine consumption, so the values aren't necessarily HURTING anything this way... I'm hesitant to change it unless someone can make a cognizant argument for doing so since I don't want to break things for anyone without a reason.

I'd be open to adding an option to change it, though. I'm just unsure of what the configuration should look like for this (i.e. I don't want to just throw in configuration options without forethought), or if we could reuse other configuration options to have something more specific, etc.? If you want to propose something in an Issue, and discuss some options for implementation here, I'd be happy to consider options though.