Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-6263

Add OIDC Health Check

XMLWordPrintable

      Fixes #47861.

      This is a copy and paste of @jmartisk and @geoand work in Quarkus LangChain4j MCP Client, adapted to Quarkus OIDC

      This PR is meant to offer a simple OIDC Provider Health Check for all OIDC and OAuth2 providers.

      It pings the `discovery` endpoint, if it is available. Other endpoints, either MP Health compliant (to deal with ##47791) or other ones, for ex, some GitHub url, can be supported later as `quarkus.oidc.health-url`.

      The JSON looks like this:

      ```json
      {
      "checks": [
      {
      "name": "OIDC Provider Health Check",
      "status": "UP",
      "data":

      { "tenant-id-refresh-token": "OK", "tenant-https": "OK", "tenant-listener": "OK", "tenant-split-tokens": "OK" }

      }
      ]
      }
      ```

      Status will be `UP` if at least a single provider is `OK`, and `DOWN` otherwise.
      Tenant statuses: `OK`, `Error`, `Disabled`, `Not Ready Yet`, `Unknown`.

      This is only a start and it will definitely require some more tuning,but it is high time `quarkus-oidc` started supporting health checks, as well as telemetry.

      I'll need to do a bit more testing and add more docs

              sbiarozk Sergey Beryozkin
              blafond Barry LaFond
              Jose Carranza Jose Carranza
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: