Auth Server

Create a new auth server

Changed on

Create a new auth server. Each auth server has a unique, randomly generated, public issuer URL.

post/v1/auth-servers

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Request body

object required
name, string required

The name of the auth server

description, string

The description of the auth server

audience, string required

The recipients that the tokens are intended for. This becomes the 'aud' claim in an access token

signing_algorithm, 'RS256' | 'RS384' | 'RS512' | 'PS256' | 'PS384' | 'PS512'

Algorithm used in the key signing process

labels, Labels

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

trusted_origins, TrustedOrigin[]

A list or trusted origins to apply the CORS header on for the auth server

dcr, CreateDcrSettings

Dynamic Client Registration settings for the auth server. Both fields are optional; an omitted field falls back to its default.

open_dcr_enabled, boolean

Whether open (unauthenticated) Dynamic Client Registration is enabled for the auth server

Example request

{
  "labels": {
    "env": "test"
  },
  "trusted_origins": [
    "https://example.com"
  ],
  "dcr": {
    "redirect_uri_allowlist": [
      "https://example.com/callback"
    ]
  }
}

Response

An auth server

AuthServer required
id, string uuid required

The ID of the auth server

name, string required

The name of the auth server

description, string required

The description of the auth server

audience, string required

The recipients that the tokens are intended for. This becomes the 'aud' claim in an access token

signing_algorithm, 'RS256' | 'RS384' | 'RS512' | 'PS256' | 'PS384' | 'PS512' required

Algorithm used in the key signing process

issuer, string required

The complete URL for the custom authorization server. This becomes the 'iss' claim in an access token.

metadata_uri, string uri required

The URI of the metadata document for the auth server

jwks_uri, string uri

The URI of the JWKS endpoint for the auth server

labels, Labels required

Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

created_at, string date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_at, string date-time required

An ISO-8601 timestamp representation of entity update date.

trusted_origins, TrustedOrigin[]

A list or trusted origins to apply the CORS header on for the auth server

dcr, DcrSettings

Dynamic Client Registration settings for the auth server

open_dcr_enabled, boolean

Whether open (unauthenticated) Dynamic Client Registration is enabled for the auth server

Example response

{
  "labels": {
    "env": "test"
  },
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z",
  "trusted_origins": [
    "https://example.com"
  ],
  "dcr": {
    "redirect_uri_allowlist": [
      "https://example.com/callback"
    ]
  }
}

Changes

    • breaking

      the response's body type changed from no type to object for status

    • breaking

      the response's body type changed from no type to object for status

    • info

      removed subschema #2 from the response body allOf list for the response status

    12 more changes in this revision