janus-ssp / janus

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

Support for data-lookup in metadata field #585

Open baszoetekouw opened 9 years ago

baszoetekouw commented 9 years ago

Currently, we record the owner of a metadata entry in Janus using a free text field called coin:institution_id. This field contains a (human readable) reference to our CRM (for example, UNIVEGHEL refers to the "University of Veghel" organisation in CRM).

However, a new CRM has recently been deployed, which uses uuid-like identifiers (41640424-a615-f411-80e0-006056956c1a) rather than human-readable ids. To support entering these in Janus, I propose the following:

    metadatafields:
        saml20-idp:
            'coin:institution_crmid':
                type: lookup
                select_values:
                    - 'none': 'Not specified' 
                    - '398c5842-3ffb-4f51-9b5c-3c1192c11a90': 'Universiteit van Harderwijk'
                    - 'aa214b77-49c0-49f8-8e8c-add06c3e90c6': 'Universiteit van Monnikendam'
                    - '0b7fdde7-3f9f-45bd-894c-2cdc15ff6c2e': 'Universiteit van IJlst'
                    - '1a6480d9-f247-4600-b3f6-c8b0845c6b17': 'Universiteit van Veghel'
                    - '025abcd5-0fc2-4237-acf6-b7c8d682b5d4': 'Universiteit van Beuningen'
                    - '8889a595-7b3a-4916-9c62-d4c4e43d0dcd': 'Universiteit van Schiedam'
                default: 'none'
                default_allow: false
                required: false
{
    "updatedByUserName": "urn:collab:person:surfguest.nl:pino",
    "updatedFromIp": "125.227.221.133",
    "id": 43,
    "name": "https:\/\/foo.surfnet.nl\/federate\/metadata\/",
    "revisionNr": 56,
    "state": "testaccepted",
    "type": "saml20-idp",
    "metadataUrl": "https:\/\/foo.surfnet.nl\/federate\/metadata\/",
    "allowAllEntities": false,
    "manipulationCode": "",
    "parentRevisionNr": 55,
    "revisionNote": "Set to test status Migration (CXT-2923)",
    "isActive": true,
    "createdAtDate": "2013-09-27T15:19:36+0200",
    "updatedAtDate": "2013-09-27T15:19:36+0200",
    "metadata": {
        "certData": "xxx",
        "coin": {
            "guest_qualifier": "None",
            "hidden": true,
            "institution_id": "UNIVEGHEL",
            "institution_crmid": { "1a6480d9-f247-4600-b3f6-c8b0845c6b17" : "Universiteit van Veghel" }
        }
    }
}