janus-ssp / janus

Fully featured metadata registration administration module built on top of simpleSAMLphp.
Other
13 stars 8 forks source link

Janus XML export is missing many fields, including Name, Dislayname, Description, logo URL #521

Open surfnet-niels opened 9 years ago

surfnet-niels commented 9 years ago

When I export an entity using the XML export option in the export tab, most information is missing. The information is shown in the json exported format.

JSON format:

{
  "url": {
    "nl": "https://inacademia.org/about",
    "en": "https://inacademia.org/about"
  },
  "name": {
    "nl": "InAcademia.org - TEST",
    "en": "InAcademia.org - TEST"
  },
  "logo": [
    {
      "width": 120,
      "url": "https://inacadenia.org/static/logo.png",
      "height": 60
    }
  ],
  "displayName": {
    "nl": "InAcademia.org - TEST",
    "en": "InAcademia.org - TEST"
  },
  "description": {
    "nl": "The InAcademia Simple validation Sevice allows for the easy validation of affiliation (Student, Faculty, Staff) of a user in Academia. This is a TEST instance",
    "en": "The InAcademia Simple validation Sevice allows for the easy validation of affiliation (Student, Faculty, Staff) of a user in Academia. This is a TEST instance"
  },
  "contacts": {
    "0": {
      "surName": "Technical Support",
      "givenName": "InAcademia",
      "emailAddress": "tech@inacademia.org",
      "contactType": "technical"
    },
    "1": {
      "surName": "Administrative Support",
      "givenName": "InAcademia",
      "emailAddress": "admin@inacademia.org",
      "contactType": "technical"
    },
    "2": {
      "surName": "Enduser Support",
      "givenName": "InAcademia",
      "emailAddress": "help@inacademia.org",
      "contactType": "support"
    }
  },
  "AssertionConsumerService": {
    "0": {
      "Location": " https://t02.t.inacademia.org/svs/acs/post",
      "Binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
    },
    "1": {
      "Location": " https://t02.t.inacademia.org/svs/acs/redirect",
      "Binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
    }
  },
  "NameIDFormat": "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent",
  "redirect.sign": false,
  "entityid": "https://inacademia.org/metadata",
  "metadata-set": "saml20-sp-remote",
  "eid": "1677"
}

XML format for the same entity:

<?xml version="1.0"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://inacademia.org/metadata">
  <md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
    <md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</md:NameIDFormat>
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location=" https://t02.t.inacademia.org/svs/acs/redirect" index="0"/>
    <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location=" https://t02.t.inacademia.org/svs/acs/post" index="1"/>
  </md:SPSSODescriptor>
  <md:ContactPerson contactType="support">
    <md:GivenName>InAcademia</md:GivenName>
    <md:SurName>Enduser Support</md:SurName>
    <md:EmailAddress>help@inacademia.org</md:EmailAddress>
  </md:ContactPerson>
  <md:ContactPerson contactType="technical">
    <md:GivenName>InAcademia</md:GivenName>
    <md:SurName>Administrative Support</md:SurName>
    <md:EmailAddress>admin@inacademia.org</md:EmailAddress>
  </md:ContactPerson>
  <md:ContactPerson contactType="technical">
    <md:GivenName>InAcademia</md:GivenName>
    <md:SurName>Technical Support</md:SurName>
    <md:EmailAddress>tech@inacademia.org</md:EmailAddress>
  </md:ContactPerson>
</md:EntityDescriptor>
relaxnow commented 9 years ago

This is why we created the JSON export in the first place. The exporting is done by SimpleSAMLphp and at the time we did not want to refactor such a large and critical part of SimpleSAMLphp. Having done bigger and more critical parts (simplesamlphp/saml2) we should take a look at refactoring the export code and putting it in simplesamlphp/saml2.