DIRACGrid / diracx

The neXt DIRAC incarnation
GNU General Public License v3.0
9 stars 20 forks source link

Add .well-known/diracx-metadata #137

Closed chrisburr closed 1 year ago

chrisburr commented 1 year ago

For the new CLI and webapp it would be useful to have a metadata route to expose information like:

{
    "virtual_organisations": {
        "gridpp": {
            "groups": {
                "gridpp_user": {
                    "properties": ["NormalUser"]
                },
                "gridpp_admin": {
                    "properties": ["NormalUser", "JobAdmin"]
                }
            },
            "support_message": "For support ask the guinea pigs via snail mail.",
            "default_group": "user"
        }
    },
    # The rest of these sections are ideas for future enchantements
    "request_proxies": [],
    "available_routers": {
        "auth": {
            "enabled": true,
            "info": null,
        },
        "jobs": {
            "enables": false,
            "info": "Jobs are currently unavailable due to us having got distracted by"
        }
    }
}

Plan of work

  1. Add a new route to the well-known router
  2. Modify the Config model to include support metadata (helpdesk mail, mattermost channel, etc)
  3. Modify the legacy CS exporter to add the support metadata (in the VO section of the current CS, or in the DiracX section of the current CS, or in the conversion script yaml config)
  4. Make the CLI automatically suggest the available VOs if a valid one isn’t given when logging in
  5. Make the CLI show the support URL if something goes wrong