Skip to content

Add a debug endpoint to list current authz providers

Administrator requested to merge 14891-authz-providers into main

Created by: flying-robot

This adds an endpoint to the repo-updater's debug server that will describe the current authz providers and provide a link into Sourcegraph's site admin accordingly:

$ curl -s http://localhost:6074/list-authz-providers | jq
[
  {
    "service_type": "github",
    "service_id": "https://github.com/",
    "external_service_url": "https://sourcegraph.test:3443/site-admin/external-services/RXh0ZXJuYWxTZXJ2aWNlOjg="
  },
  {
    "service_type": "gitlab",
    "service_id": "https://gitlab.sgdev.org/",
    "external_service_url": "https://sourcegraph.test:3443/site-admin/external-services/RXh0ZXJuYWxTZXJ2aWNlOjM="
  }
]

Additionally, tests are added for encoding/decoding URNs. The decoding portion is new, but the encoding portion also had no unit tests previously.

fixes https://github.com/sourcegraph/sourcegraph/issues/14891

Merge request reports

Loading