dodona
dodona copied to clipboard
Remove SAML metadata monkeypatches
Belnet requires that specific fields are present in the SAML metadata. The gem we used didn't support this so we monkeypatched the code that generated the metadata to add these fields:
<md:Organization>
<md:OrganizationName xml:lang="en">UGent - Dodona</md:OrganizationName>
<md:OrganizationName xml:lang="nl">UGent - Dodona</md:OrganizationName>
<md:OrganizationName xml:lang="fr">UGent - Dodona</md:OrganizationName>
<md:OrganizationDisplayName xml:lang="en">UGent - Dodona</md:OrganizationDisplayName>
<md:OrganizationDisplayName xml:lang="nl">UGent - Dodona</md:OrganizationDisplayName>
<md:OrganizationDisplayName xml:lang="fr">UGent - Dodona</md:OrganizationDisplayName>
<md:OrganizationURL xml:lang="en">https://dodona.ugent.be</md:OrganizationURL>
<md:OrganizationURL xml:lang="nl">https://dodona.ugent.be</md:OrganizationURL>
<md:OrganizationURL xml:lang="fr">https://dodona.ugent.be</md:OrganizationURL>
</md:Organization>
<md:ContactPerson contactType="technical">
<md:GivenName>Dodona</md:GivenName>
<md:SurName>Helpdesk</md:SurName>
<md:EmailAddress>[email protected]</md:EmailAddress>
</md:ContactPerson>
In a recent version, ruby saml added support for custom metadata fields. This means that the monkeypatch can probably be removed.
More specifically, I think lib/SAML/metadata.rb
can be removed (after inspecting the edit history to check if other changes weren't made). The fields that are added in line 128 till 166 should be moved to separate class as is shown in https://github.com/onelogin/ruby-saml/pull/602
The change should be validated by comparing the generated metadata at /users/saml/metadata
before and after the fix, and by signing in into ugent from naos.