Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistency in attribute naming #76

Open
norfas opened this issue Jan 31, 2024 · 0 comments
Open

inconsistency in attribute naming #76

norfas opened this issue Jan 31, 2024 · 0 comments

Comments

@norfas
Copy link

norfas commented Jan 31, 2024

There is an inconsistency in attribute naming in \dk.nita.saml20\dk.nita.saml20\Profiles\DKSaml20\Attributes.
Some attributes are named in what I assume is a "BASIC" naming format, for example:

    public class DKSaml20CvrNumberAttribute : DKSaml20Attribute
    {
        /// <summary>
        /// Attribute name
        /// </summary>
        public const string NAME = "dk:gov:saml:attribute:CvrNumberIdentifier";

        /// <summary>
        /// Creates an attribute with the specified value.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <returns></returns>
        public static SamlAttribute Create(string value)
        {
            return Create(NAME, null, value);
        }
    }

But then it sets it to "URI" format in NameFormat property which, I assume, is wrong:

protected static SamlAttribute Create(string name, string friendlyName, string value)
  {
      SamlAttribute att = new SamlAttribute();
      att.NameFormat = SamlAttribute.NAMEFORMAT_URI;

Some other attributes are named in URI format, and this is consistent with att.NameFormat = SamlAttribute.NAMEFORMAT_URI:

{
    /// <summary>
    /// Attribute name
    /// </summary>
    public const string NAME = "https://data.gov.dk/concept/core/nsis/loa";

On top of this, the medatdata file generated requests all attributes in URI format, fx.:
<q1:RequestedAttribute Name="https://data.gov.dk/model/core/eid/professional/cvr" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant